Skip to content

Commit c468e7b

Browse files
committed
pwn_nessus_cloud_scan_crud Driver - disable schedule by default
1 parent 45a5eb6 commit c468e7b

File tree

3 files changed

+14
-17
lines changed

3 files changed

+14
-17
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ rvm use ruby-3.1.2@pwn
3737
$ rvm list gemsets
3838
$ gem install --verbose pwn
3939
$ pwn
40-
pwn[v0.4.493]:001 >>> PWN.help
40+
pwn[v0.4.494]:001 >>> PWN.help
4141
```
4242

4343
[![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
@@ -52,7 +52,7 @@ $ rvm use ruby-3.1.2@pwn
5252
$ gem uninstall --all --executables pwn
5353
$ gem install --verbose pwn
5454
$ pwn
55-
pwn[v0.4.493]:001 >>> PWN.help
55+
pwn[v0.4.494]:001 >>> PWN.help
5656
```
5757

5858

bin/pwn_nessus_cloud_scan_crud

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ OptionParser.new do |options|
4747
opts[:scanner_name] = s
4848
end
4949

50-
options.on('-D', '--disable-scan', '<Optional - If true, the schedule for the scan is disabled (Defaults to false)>') do |d|
51-
opts[:disabled] = d
50+
options.on('-E', '--enable-schedule', '<Optional - If true, the schedule for the scan is enabled (Defaults to false)>') do |e|
51+
opts[:enable_schedule] = e
5252
end
5353

5454
options.on('-NTARGET', '--target-network-name=TARGET', '<Optional - If --scanner other than AUTO-ROUTED, Otherwise Required - Network to Scan (Defaults to "Default")>') do |n|
@@ -63,11 +63,11 @@ OptionParser.new do |options|
6363
opts[:scan_time_window] = t
6464
end
6565

66-
options.on('-STIME', '--start-time=TIME', '<Optional - For One-Time Scans, the Starting Time and Date for the Scan>') do |t|
66+
options.on('-STIME', '--start-time=TIME', '<Optional - For One-Time Scans, the Starting Time and Date for the Scan (e.g. "2777-07-07T00:00:00")>') do |t|
6767
opts[:starttime] = t
6868
end
6969

70-
options.on('-rRRULES', '--rrules=RRULES', '<Optional - For One-Time Scans, the Starting Time and Date for the Scan (Defaults to "FREQ=null;INTERVAL=0;BYDAY=null")>') do |r|
70+
options.on('-rRRULES', '--rrules=RRULES', '<Optional - For One-Time Scans, the Starting Time and Date for the Scan (e.g. "FREQ=WEEKLY;INTERVAL=3;BYDAY=MO,WE,FR")>') do |r|
7171
opts[:rrules] = r
7272
end
7373

@@ -79,12 +79,12 @@ OptionParser.new do |options|
7979
opts[:tag_category_name] = y
8080
end
8181

82-
options.on('-zTIMEZONE', '--timezone=TIMEZONE', '<Optional - Timezone of the scheduled start time for the scan>') do |t|
82+
options.on('-zTIMEZONE', '--timezone=TIMEZONE', '<Optional - Timezone of the scheduled start time for the scan (e.g. "US/Eastern")>') do |t|
8383
opts[:timezone] = t
8484
end
8585

86-
options.on('-gGROUPS', '--target-groups=GROUPS', '<Optional - Comma-delimited list of target group IDs to scan>') do |t|
87-
opts[:timezone] = t
86+
options.on('-gGROUPS', '--target-groups=GROUPS', '<Optional - Comma-delimited list of target group IDs to scan>') do |g|
87+
opts[:target_groups] = g
8888
end
8989
end.parse!
9090

@@ -131,11 +131,8 @@ begin
131131
target_network_name = opts[:target_network_name]
132132
target_network_name ||= 'Default'
133133

134-
disabled = true if opts[:disabled]
135-
disabled ||= false
136-
137-
enabled = true
138-
enabled = false if disabled
134+
enable_schedule = true if opts[:enable_schedule]
135+
enable_schedule ||= false
139136

140137
launch = opts[:launch]
141138
launch ||= 'ON_DEMAND'
@@ -147,7 +144,7 @@ begin
147144
# starttime ||= Time.now.strftime('%Y%m%dT%H%M%S')
148145

149146
rrules = opts[:rrules]
150-
rrules ||= 'FREQ=null;INTERVAL=0;BYDAY=null'
147+
# rrules ||= 'FREQ=null;INTERVAL=0;BYDAY=null'
151148

152149
timezone = opts[:timezone]
153150
# timezone ||= 'UTC'
@@ -248,7 +245,7 @@ begin
248245
)
249246
settings[:target_network_uuid] = target_network[:uuid]
250247

251-
settings[:enabled] = enabled
248+
settings[:enabled] = enable_schedule
252249

253250
settings[:launch] = launch
254251

lib/pwn/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module PWN
4-
VERSION = '0.4.493'
4+
VERSION = '0.4.494'
55
end

0 commit comments

Comments
 (0)