pwn 0.4.430 → 0.4.431
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 +8 -8
- data/lib/pwn/plugins/nessus_cloud.rb +12 -1
- 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: 48072b8179bfac8c54e8c436a40414dc482092f73ef06fb3f6f318fde1f27ca7
|
4
|
+
data.tar.gz: 1760f70d5a5e81fb0c5e82606a3019b4de3e374a2a596a1ffd344dba62d2d865
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48b319c619e24c40ec69a45c4ab2470972480400157443470752d0915e93761f3ad0e0a74b33f6d5389034e091d054efa4455ea8943957620d4e98130cb0c598
|
7
|
+
data.tar.gz: d93a09ed3585490878ca297da4be21bcce0a28f80732838eb2ddb436bab7383293aead3628a851bd7fc78f03b4af0a231f01145434132292f6d3ed6e69f088f1
|
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.431]: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.431]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
@@ -35,8 +35,8 @@ OptionParser.new do |options|
|
|
35
35
|
opts[:scanner_name] = s
|
36
36
|
end
|
37
37
|
|
38
|
-
options.on('-
|
39
|
-
opts[:
|
38
|
+
options.on('-TTARGET', '--target-network-name=TARGET', '<Optional if --scanner other than AUTO-ROUTED, Otherwise Required - Network to Scan (Defaults to "Default")>') do |t|
|
39
|
+
opts[:target_network_name] = t
|
40
40
|
end
|
41
41
|
|
42
42
|
options.on('-lWHEN', '--launch=WHEN', '<Optional When to Launch Scan - ON_DEMAND || DAILY || WEEKLY || MONTHLY || YEARLY (Defaults to "ON_DEMAND")>') do |l|
|
@@ -80,9 +80,8 @@ begin
|
|
80
80
|
scanner_name = opts[:scanner_name]
|
81
81
|
scanner_name ||= 'AUTO-ROUTED'
|
82
82
|
|
83
|
-
|
84
|
-
|
85
|
-
target_network = '00000000-0000-0000-0000-000000000000' if target_network == 'default-network'
|
83
|
+
target_network_name = opts[:target_network_name]
|
84
|
+
target_network_name ||= 'Default'
|
86
85
|
|
87
86
|
launch = opts[:launch]
|
88
87
|
launch ||= 'ON_DEMAND'
|
@@ -122,10 +121,11 @@ begin
|
|
122
121
|
scanner_id = scanner[:id]
|
123
122
|
puts scanner_id
|
124
123
|
|
125
|
-
|
126
|
-
nessus_obj: nessus_obj
|
124
|
+
target_network = PWN::Plugins::NessusCloud.get_target_networks(
|
125
|
+
nessus_obj: nessus_obj,
|
126
|
+
name: target_network_name
|
127
127
|
)
|
128
|
-
|
128
|
+
target_network_id = target_network[:uuid]
|
129
129
|
rescue Interrupt
|
130
130
|
puts 'CTRL+C detected...goodbye.'
|
131
131
|
rescue StandardError => e
|
@@ -215,13 +215,24 @@ module PWN
|
|
215
215
|
|
216
216
|
public_class_method def self.get_target_networks(opts = {})
|
217
217
|
nessus_obj = opts[:nessus_obj]
|
218
|
+
name = opts[:name]
|
218
219
|
|
219
220
|
scan_templates_resp = nessus_cloud_rest_call(
|
220
221
|
nessus_obj: nessus_obj,
|
221
222
|
rest_call: 'networks'
|
222
223
|
).body
|
223
224
|
|
224
|
-
JSON.parse(scan_templates_resp, symbolize_names: true)
|
225
|
+
target_networks = JSON.parse(scan_templates_resp, symbolize_names: true)
|
226
|
+
|
227
|
+
if name
|
228
|
+
selected_network = target_networks[:networks].select do |tn|
|
229
|
+
tn[:name] == name
|
230
|
+
end
|
231
|
+
target_networks = selected_network.first if selected_network.any?
|
232
|
+
target_networks ||= {}
|
233
|
+
end
|
234
|
+
|
235
|
+
target_networks
|
225
236
|
rescue StandardError, SystemExit, Interrupt => e
|
226
237
|
raise e
|
227
238
|
end
|
data/lib/pwn/version.rb
CHANGED