pwn 0.4.436 → 0.4.437
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/pwn_nessus_cloud_create_scan +22 -14
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f220a459e04c5fcc8ac36203f16e53b09ee7d1449e26fa7875b9f7556b1a7ced
|
4
|
+
data.tar.gz: 1f1cc564d106d5938daaa78e3bd24b539a1d1d72c2cb7b34a285876db1239ccd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44fe1d205b902cda0678807efaf7af11bf79aef43a2c464fdcd2779ae091a2304aa4f77f32cf351f274fffce1243156e31539fea268903c97ca2c02774703f5a
|
7
|
+
data.tar.gz: 97889b333295b20f3d5210c81c624197567422ad787ba35a6536d2ca5136f564ba30516c28ed77d3e5caac33a22d5c596abdcc6670e2f8216347c8069f03f7b0
|
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.
|
40
|
+
pwn[v0.4.437]: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.
|
55
|
+
pwn[v0.4.437]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
@@ -70,6 +70,10 @@ OptionParser.new do |options|
|
|
70
70
|
options.on('-zTIMEZONE', '--timezone=TIMEZONE', '<Optional - Timezone of the scheduled start time for the scan - (Defaults to "UTC")>') do |t|
|
71
71
|
opts[:timezone] = t
|
72
72
|
end
|
73
|
+
|
74
|
+
options.on('-gGROUPS', '--target-groups=GROUPS', '<Optional - Comma-delimited list of target group IDs to scan>') do |t|
|
75
|
+
opts[:timezone] = t
|
76
|
+
end
|
73
77
|
end.parse!
|
74
78
|
|
75
79
|
if opts.empty?
|
@@ -79,6 +83,7 @@ end
|
|
79
83
|
|
80
84
|
begin
|
81
85
|
# Get Options Passed to pwn_nessus_cloud_create_scan
|
86
|
+
# Required Arguments
|
82
87
|
yaml_config = opts[:yaml_config]
|
83
88
|
|
84
89
|
raise "YAML Config Not Found: #{yaml_config}" unless File.exist?(yaml_config)
|
@@ -92,6 +97,11 @@ begin
|
|
92
97
|
secret_key = yaml[:secret_key]
|
93
98
|
|
94
99
|
scan_name = opts[:scan_name]
|
100
|
+
|
101
|
+
text_targets = opts[:text_targets]
|
102
|
+
raise 'ERROR: --text-targets (i.e. List of targets to scan) is required.' unless text_targets
|
103
|
+
|
104
|
+
# Optional Arguments
|
95
105
|
scan_desc = opts[:scan_desc]
|
96
106
|
|
97
107
|
scan_template = opts[:scan_template]
|
@@ -130,9 +140,6 @@ begin
|
|
130
140
|
timezone = opts[:timezone]
|
131
141
|
timezone ||= 'UTC'
|
132
142
|
|
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
143
|
target_groups = opts[:target_groups]
|
137
144
|
|
138
145
|
file_targets = opts[:file_targets]
|
@@ -200,7 +207,7 @@ begin
|
|
200
207
|
# Part 2: Populate settings object from options passed to driver
|
201
208
|
settings = {}
|
202
209
|
settings[:name] = scan_name
|
203
|
-
settings[:description] = scan_desc
|
210
|
+
settings[:description] = scan_desc if scan_desc
|
204
211
|
|
205
212
|
policy = PWN::Plugins::NessusCloud.get_policies(
|
206
213
|
nessus_obj: nessus_obj,
|
@@ -240,27 +247,28 @@ begin
|
|
240
247
|
|
241
248
|
settings[:text_targets] = text_targets
|
242
249
|
|
243
|
-
|
250
|
+
# Example array on https://developer.tenable.com/reference/scans-create is really just a string.
|
251
|
+
settings[:target_groups] = "[#{target_groups}]" if target_groups
|
244
252
|
|
245
|
-
settings[:file_targets] = file_targets
|
253
|
+
settings[:file_targets] = file_targets if file_targets
|
246
254
|
|
247
|
-
settings[:tag_targets] = tag_targets_arr
|
255
|
+
settings[:tag_targets] = tag_targets_arr if tag_targets_arr
|
248
256
|
|
249
|
-
settings[:agent_group_id] = agent_group_id_arr
|
257
|
+
settings[:agent_group_id] = agent_group_id_arr if agent_group_id_arr.any?
|
250
258
|
|
251
|
-
settings[:agent_scan_launch_type] = agent_scan_launch_type
|
259
|
+
settings[:agent_scan_launch_type] = agent_scan_launch_type if agent_scan_launch_type
|
252
260
|
|
253
|
-
settings[:triggers] = triggers_arr
|
261
|
+
settings[:triggers] = triggers_arr if triggers_arr.any?
|
254
262
|
|
255
|
-
settings[:emails] = emails
|
263
|
+
settings[:emails] = emails if emails
|
256
264
|
|
257
|
-
settings[:acls] = acls
|
265
|
+
settings[:acls] = acls if acls
|
258
266
|
|
259
267
|
# Part 3: Populate credentials object from YAML config (optional)
|
260
|
-
credentials = yaml[:credentials]
|
268
|
+
credentials = yaml[:credentials] if yaml[:credentials]
|
261
269
|
|
262
270
|
# Part 4: Populate plugins object from YAML config (optional)
|
263
|
-
plugins = yaml[:plugins]
|
271
|
+
plugins = yaml[:plugins] if yaml[:plugins]
|
264
272
|
|
265
273
|
create_scan_resp = PWN::Plugins::NessusCloud.create_scan(
|
266
274
|
nessus_obj: nessus_obj,
|
data/lib/pwn/version.rb
CHANGED