pwn 0.4.436 → 0.4.439

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc2f527f6263941fc6c959c7171e7f989df0675e5f6fc38a366b070e7c36de26
4
- data.tar.gz: ebd3ddfe8b1ec00c5161351c7a65570daaf8de62918848ac9de041370995c0b8
3
+ metadata.gz: 0facd8a4831c0b12f3260083f60f42ffa10443a8aeb0d2b6d18e641f720ed237
4
+ data.tar.gz: 630a49786d7e1e9a46a86de3d6d3e2c5a5b9651e274bda12ac0c97bc5e8b0396
5
5
  SHA512:
6
- metadata.gz: e5480c6787f48e418d4dd8fecd8c368e2caf034f93f76bd2b521c57784769ffd3825fcbb00eb3ad380c7109fe72b8f5b206e869d3149ce8d147644fb3092b10b
7
- data.tar.gz: 00da05571d28fe8c38760c70cf07a7ae4993a925a42118764b51ad81fc01c16a0f9d19470910139d39ae4c7f950fec7884662c0b756c857cbfd6c816f25007c3
6
+ metadata.gz: 3508e260eec62e7b95ef6beb940446498d8bb48f17ca6a9e2bab5e106650121095ef9f1655ef882ecda06a27bdcf851c258ba8b8fde73f86f6f72b8ec88d1727
7
+ data.tar.gz: f7e3e804ce8def94d5da144f72ae0557ca107a8506254f2a8c175418f4a635c6bc92b2b677803d675880e653c9633b8844b40498377d92f0e9b19bbf921c5a7f
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.1.2@pwn
37
37
  $ rvm list gemsets
38
38
  $ gem install --verbose pwn
39
39
  $ pwn
40
- pwn[v0.4.436]:001 >>> PWN.help
40
+ pwn[v0.4.439]:001 >>> PWN.help
41
41
  ```
42
42
 
43
43
  [![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
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.4.436]:001 >>> PWN.help
55
+ pwn[v0.4.439]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -55,19 +55,27 @@ OptionParser.new do |options|
55
55
  opts[:launch] = l
56
56
  end
57
57
 
58
- options.on('-wTIMEWINDOW', '--scan-time-window=TIMEWINDOW', '<Optional - Scan Time Window in Minutes - (Defaults to 0)>') do |t|
58
+ options.on('-wTIMEWINDOW', '--scan-time-window=TIMEWINDOW', '<Optional - Scan Time Window in Minutes (Defaults to 0)>') do |t|
59
59
  opts[:scan_time_window] = t
60
60
  end
61
61
 
62
- options.on('-STIME', '--start-time=TIME', '<Optional - For One-Time Scans, the Starting Time and Date for the Scan - (Defaults to Time.now.strftime("%Y%m%dT%H%M%S")>') do |t|
62
+ options.on('-STIME', '--start-time=TIME', '<Optional - For One-Time Scans, the Starting Time and Date for the Scan (Defaults to Time.now.strftime("%Y%m%dT%H%M%S")>') do |t|
63
63
  opts[:starttime] = t
64
64
  end
65
65
 
66
- options.on('-rRRULES', '--rrules=RRULES', '<Optional - For One-Time Scans, the Starting Time and Date for the Scan - (Defaults to "FREQ=ONETIME;INTERVAL=0;BYDAY=null")>') do |r|
66
+ options.on('-rRRULES', '--rrules=RRULES', '<Optional - For One-Time Scans, the Starting Time and Date for the Scan (Defaults to "FREQ=ONETIME;INTERVAL=0;BYDAY=null")>') do |r|
67
67
  opts[:rrules] = r
68
68
  end
69
69
 
70
- options.on('-zTIMEZONE', '--timezone=TIMEZONE', '<Optional - Timezone of the scheduled start time for the scan - (Defaults to "UTC")>') do |t|
70
+ options.on('-xTAGS', '--tag-targets=TAGS', '<Optional - Comma-delimited list of tags to add to targets in scan>') do |x|
71
+ opts[:tag_targets] = x
72
+ end
73
+
74
+ options.on('-zTIMEZONE', '--timezone=TIMEZONE', '<Optional - Timezone of the scheduled start time for the scan (Defaults to "UTC")>') do |t|
75
+ opts[:timezone] = t
76
+ end
77
+
78
+ options.on('-gGROUPS', '--target-groups=GROUPS', '<Optional - Comma-delimited list of target group IDs to scan>') do |t|
71
79
  opts[:timezone] = t
72
80
  end
73
81
  end.parse!
@@ -79,6 +87,7 @@ end
79
87
 
80
88
  begin
81
89
  # Get Options Passed to pwn_nessus_cloud_create_scan
90
+ # Required Arguments
82
91
  yaml_config = opts[:yaml_config]
83
92
 
84
93
  raise "YAML Config Not Found: #{yaml_config}" unless File.exist?(yaml_config)
@@ -92,6 +101,11 @@ begin
92
101
  secret_key = yaml[:secret_key]
93
102
 
94
103
  scan_name = opts[:scan_name]
104
+
105
+ text_targets = opts[:text_targets]
106
+ raise 'ERROR: --text-targets (i.e. List of targets to scan) is required.' unless text_targets
107
+
108
+ # Optional Arguments
95
109
  scan_desc = opts[:scan_desc]
96
110
 
97
111
  scan_template = opts[:scan_template]
@@ -130,9 +144,6 @@ begin
130
144
  timezone = opts[:timezone]
131
145
  timezone ||= 'UTC'
132
146
 
133
- text_targets = opts[:text_targets]
134
- raise 'ERROR: --text-targets (i.e. List of targets to scan) is required.' unless text_targets
135
-
136
147
  target_groups = opts[:target_groups]
137
148
 
138
149
  file_targets = opts[:file_targets]
@@ -200,7 +211,7 @@ begin
200
211
  # Part 2: Populate settings object from options passed to driver
201
212
  settings = {}
202
213
  settings[:name] = scan_name
203
- settings[:description] = scan_desc
214
+ settings[:description] = scan_desc if scan_desc
204
215
 
205
216
  policy = PWN::Plugins::NessusCloud.get_policies(
206
217
  nessus_obj: nessus_obj,
@@ -240,27 +251,28 @@ begin
240
251
 
241
252
  settings[:text_targets] = text_targets
242
253
 
243
- settings[:target_groups] = target_groups
254
+ # Example array on https://developer.tenable.com/reference/scans-create is really just a string.
255
+ settings[:target_groups] = "[#{target_groups}]" if target_groups
244
256
 
245
- settings[:file_targets] = file_targets
257
+ settings[:file_targets] = file_targets if file_targets
246
258
 
247
- settings[:tag_targets] = tag_targets_arr
259
+ settings[:tag_targets] = tag_targets_arr if tag_targets_arr.any?
248
260
 
249
- settings[:agent_group_id] = agent_group_id_arr
261
+ settings[:agent_group_id] = agent_group_id_arr if agent_group_id_arr.any?
250
262
 
251
- settings[:agent_scan_launch_type] = agent_scan_launch_type
263
+ settings[:agent_scan_launch_type] = agent_scan_launch_type if agent_scan_launch_type
252
264
 
253
- settings[:triggers] = triggers_arr
265
+ settings[:triggers] = triggers_arr if triggers_arr.any?
254
266
 
255
- settings[:emails] = emails
267
+ settings[:emails] = emails if emails
256
268
 
257
- settings[:acls] = acls
269
+ # settings[:acls] = acls if acls
258
270
 
259
271
  # Part 3: Populate credentials object from YAML config (optional)
260
- credentials = yaml[:credentials]
272
+ credentials = yaml[:credentials] if yaml[:credentials]
261
273
 
262
274
  # Part 4: Populate plugins object from YAML config (optional)
263
- plugins = yaml[:plugins]
275
+ plugins = yaml[:plugins] if yaml[:plugins]
264
276
 
265
277
  create_scan_resp = PWN::Plugins::NessusCloud.create_scan(
266
278
  nessus_obj: nessus_obj,
data/lib/pwn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.4.436'
4
+ VERSION = '0.4.439'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.436
4
+ version: 0.4.439
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.