@@ -458,7 +458,7 @@ module NessusCloud
458
458
# Supported Method Parameters::
459
459
# PWN::Plugins::NessusCloud.update_scan(
460
460
# nessus_obj: 'required - nessus_obj returned from #login method',
461
- # scan_uuid : 'required - the scan UUID to update. Run #get_scans for a list of UUIDs ',
461
+ # scan_id : 'required - the scan id to update. Run #get_scans for a list',
462
462
# scan_template_uuid: 'required - the UUID for the Tenable-provided scan template to use. Run #get_canned_scan_templates for a list of UUIDs',
463
463
# settings: 'required - settings object as defined by https://developer.tenable.com/reference/scans-create',
464
464
# credentials: 'required - credentials object as defined by https://developer.tenable.com/reference/scans-create',
@@ -467,7 +467,7 @@ module NessusCloud
467
467
468
468
public_class_method def self . update_scan ( opts = { } )
469
469
nessus_obj = opts [ :nessus_obj ]
470
- scan_uuid = opts [ :scan_uuid ]
470
+ scan_id = opts [ :scan_id ]
471
471
scan_template_uuid = opts [ :scan_template_uuid ]
472
472
settings = opts [ :settings ]
473
473
credentials = opts [ :credentials ]
@@ -483,7 +483,7 @@ module NessusCloud
483
483
update_scan_resp = nessus_cloud_rest_call (
484
484
http_method : :put ,
485
485
nessus_obj : nessus_obj ,
486
- rest_call : "scans/#{ scan_uuid } " ,
486
+ rest_call : "scans/#{ scan_id } " ,
487
487
http_body : http_body
488
488
) . body
489
489
@@ -495,17 +495,17 @@ module NessusCloud
495
495
# Supported Method Parameters::
496
496
# PWN::Plugins::NessusCloud.launch_scan(
497
497
# nessus_obj: 'required - nessus_obj returned from #login method',
498
- # scan_uuid : 'required - scan uuid to launch'
498
+ # scan_id : 'required - scan uuid to launch'
499
499
# )
500
500
501
501
public_class_method def self . launch_scan ( opts = { } )
502
502
nessus_obj = opts [ :nessus_obj ]
503
- scan_uuid = opts [ :scan_uuid ]
503
+ scan_id = opts [ :scan_id ]
504
504
505
505
launch_scan_resp = nessus_cloud_rest_call (
506
506
http_method : :post ,
507
507
nessus_obj : nessus_obj ,
508
- rest_call : "scans/#{ scan_uuid } /launch"
508
+ rest_call : "scans/#{ scan_id } /launch"
509
509
) . body
510
510
511
511
JSON . parse ( launch_scan_resp , symbolize_names : true )
@@ -516,16 +516,16 @@ module NessusCloud
516
516
# Supported Method Parameters::
517
517
# PWN::Plugins::NessusCloud.get_scan_status(
518
518
# nessus_obj: 'required - nessus_obj returned from #login method',
519
- # scan_uuid : 'required - scan uuid to retrieve status'
519
+ # scan_id : 'required - scan uuid to retrieve status'
520
520
# )
521
521
522
522
public_class_method def self . get_scan_status ( opts = { } )
523
523
nessus_obj = opts [ :nessus_obj ]
524
- scan_uuid = opts [ :scan_uuid ]
524
+ scan_id = opts [ :scan_id ]
525
525
526
526
scan_status_resp = nessus_cloud_rest_call (
527
527
nessus_obj : nessus_obj ,
528
- rest_call : "scans/#{ scan_uuid } /latest-status"
528
+ rest_call : "scans/#{ scan_id } /latest-status"
529
529
) . body
530
530
531
531
JSON . parse ( scan_status_resp , symbolize_names : true )
@@ -568,16 +568,16 @@ module NessusCloud
568
568
# Supported Method Parameters::
569
569
# PWN::Plugins::NessusCloud.get_scan_history(
570
570
# nessus_obj: 'required - nessus_obj returned from #login method'
571
- # scan_uuid : 'required - scan uuid to launch'
571
+ # scan_id : 'required - scan uuid to launch'
572
572
# )
573
573
574
574
public_class_method def self . get_scan_history ( opts = { } )
575
575
nessus_obj = opts [ :nessus_obj ]
576
- scan_uuid = opts [ :scan_uuid ]
576
+ scan_id = opts [ :scan_id ]
577
577
578
578
scan_hist_resp = nessus_cloud_rest_call (
579
579
nessus_obj : nessus_obj ,
580
- rest_call : "scans/#{ scan_uuid } /history"
580
+ rest_call : "scans/#{ scan_id } /history"
581
581
) . body
582
582
583
583
JSON . parse ( scan_hist_resp , symbolize_names : true )
@@ -588,22 +588,22 @@ module NessusCloud
588
588
# Supported Method Parameters::
589
589
# PWN::Plugins::NessusCloud.export_scan_results(
590
590
# nessus_obj: 'required - nessus_obj returned from #login method',
591
- # scan_uuid : 'required - scan uuid to export',
591
+ # scan_id : 'required - scan uuid to export',
592
592
# path_to_export: 'required - filename to export results',
593
593
# history_id: 'optional - defaults to last scan',
594
594
# format: 'optional - :csv|:db|:html|:nessus|:pdf (defaults to :csv')
595
595
# )
596
596
597
597
public_class_method def self . export_scan_results ( opts = { } )
598
598
nessus_obj = opts [ :nessus_obj ]
599
- scan_uuid = opts [ :scan_uuid ]
599
+ scan_id = opts [ :scan_id ]
600
600
path_to_export = opts [ :path_to_export ]
601
601
if opts [ :history_id ]
602
602
history_id = opts [ :history_id ]
603
603
else
604
604
scan_history_resp = get_scan_history (
605
605
nessus_obj : nessus_obj ,
606
- scan_uuid : scan_uuid
606
+ scan_id : scan_id
607
607
)
608
608
609
609
if scan_history_resp [ :history ] . empty?
@@ -618,15 +618,15 @@ module NessusCloud
618
618
format = opts [ :format ] . to_s . to_sym if opts [ :format ]
619
619
620
620
http_body = {
621
- scan_uuid : scan_uuid ,
621
+ scan_id : scan_id ,
622
622
history_id : history_id ,
623
623
format : format
624
624
} . to_json
625
625
626
626
export_scan_resp = nessus_cloud_rest_call (
627
627
http_method : :post ,
628
628
nessus_obj : nessus_obj ,
629
- rest_call : "scans/#{ scan_uuid } /export" ,
629
+ rest_call : "scans/#{ scan_id } /export" ,
630
630
http_body : http_body
631
631
) . body
632
632
@@ -637,7 +637,7 @@ module NessusCloud
637
637
638
638
download_export_resp = nessus_cloud_rest_call (
639
639
nessus_obj : nessus_obj ,
640
- rest_call : "scans/#{ scan_uuid } /export/#{ file_id } /download"
640
+ rest_call : "scans/#{ scan_id } /export/#{ file_id } /download"
641
641
) . body
642
642
643
643
File . open ( path_to_export , 'wb' ) do |f |
@@ -720,7 +720,7 @@ module NessusCloud
720
720
721
721
#{ self } .update_scan(
722
722
nessus_obj: 'required - nessus_obj returned from #login method',
723
- scan_uuid : 'required - the scan UUID to update. Run #get_scans for a list of UUIDs ',
723
+ scan_id : 'required - the scan id to update. Run #get_scans for a list',
724
724
scan_template_uuid: 'required - the UUID for the Tenable-provided scan template to use. Run #get_canned_scan_templates for a list of UUIDs',
725
725
settings: 'required - settings object as defined by https://developer.tenable.com/reference/scans-create',
726
726
credentials: 'required - credentials object as defined by https://developer.tenable.com/reference/scans-create',
@@ -729,12 +729,12 @@ module NessusCloud
729
729
730
730
#{ self } .launch_scan(
731
731
nessus_obj: 'required - nessus_obj returned from #login method',
732
- scan_uuid : 'required - scan uuid to launch'
732
+ scan_id : 'required - scan uuid to launch'
733
733
)
734
734
735
735
#{ self } .get_scan_status(
736
736
nessus_obj: 'required - nessus_obj returned from #login method',
737
- scan_uuid : 'required - scan uuid to retrieve status'
737
+ scan_id : 'required - scan uuid to retrieve status'
738
738
)
739
739
740
740
#{ self } .create_tag(
@@ -746,12 +746,12 @@ module NessusCloud
746
746
747
747
#{ self } .get_scan_history(
748
748
nessus_obj: 'required - nessus_obj returned from #login method'
749
- scan_uuid : 'required - scan uuid to launch'
749
+ scan_id : 'required - scan uuid to launch'
750
750
)
751
751
752
752
#{ self } .export_scan_results(
753
753
nessus_obj: 'required - nessus_obj returned from #login method',
754
- scan_uuid : 'required - scan uuid to export',
754
+ scan_id : 'required - scan uuid to export',
755
755
path_to_export: 'required - filename to export results',
756
756
history_id: 'optional - defaults to last scan',
757
757
format: 'optional - :csv|:db|:html|:nessus|:pdf (defaults to :csv')
0 commit comments