pwn 0.4.423 → 0.4.424
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/bin/pwn_nessus_cloud_create_scan +12 -20
- data/bin/pwn_nessus_cloud_vulnscan +1 -1
- data/lib/pwn/plugins/nessus_cloud.rb +6 -6
- 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: fac5757a167e6313ef8eba620e32f4cf59e19e24b7588583d65a4e2570b40f96
|
4
|
+
data.tar.gz: '083b60cc0345807d15006fd7c5751d3369b7594b5b264f9169d98fa8bd4c2896'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0da827f39f7837dbd1fcc75399105db089ff76f113a9ee3e1e17d70554638267b79500972c6d5eec7a0875ab49b4ab9012a6d5a94172c0d41fcc62497e0a3f53
|
7
|
+
data.tar.gz: ebe8ad516eb1ac0eff953e4ce8136016d4b377612fa6475e03105a31f8ead791605ca14f58ef160e633e4be26efd5eaff0ea1b9ad73b140b8468a7ba1e7efed9
|
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.424]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](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.424]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
@@ -15,16 +15,8 @@ OptionParser.new do |options|
|
|
15
15
|
opts[:yaml_config] = c
|
16
16
|
end
|
17
17
|
|
18
|
-
options.on('-nVALUE', '--scan-name=VALUE', '<
|
19
|
-
opts[:
|
20
|
-
end
|
21
|
-
|
22
|
-
options.on('-rRPATH', '--report-path=RPATH', '<Required - Path / Filename of Report>') do |r|
|
23
|
-
opts[:path_to_export] = r
|
24
|
-
end
|
25
|
-
|
26
|
-
options.on('-fFORMAT', '--report-format=FORMAT', '<Optional - Report Format :csv|:db|:html|:nessus|:pdf (defaults to :csv)>') do |f|
|
27
|
-
opts[:format] = f
|
18
|
+
options.on('-nVALUE', '--scan-template-name=VALUE', '<Optional - Name of Canned Scan Template to Use for Scan Creation (Defaults to "Basic Network Scan">') do |n|
|
19
|
+
opts[:scan_template_name] = n
|
28
20
|
end
|
29
21
|
end.parse!
|
30
22
|
|
@@ -45,27 +37,27 @@ begin
|
|
45
37
|
|
46
38
|
access_key = yaml[:access_key]
|
47
39
|
secret_key = yaml[:secret_key]
|
48
|
-
|
49
|
-
|
50
|
-
|
40
|
+
|
41
|
+
scan_template_name = opts[:scan_template_name]
|
42
|
+
scan_template_name = 'Basic Network Scan' unless scan_template_name
|
51
43
|
|
52
44
|
nessus_obj = PWN::Plugins::NessusCloud.login(
|
53
45
|
access_key: access_key,
|
54
46
|
secret_key: secret_key
|
55
47
|
)
|
56
48
|
|
57
|
-
|
49
|
+
canned_scan_template_list = PWN::Plugins::NessusCloud.get_canned_scan_templates(
|
58
50
|
nessus_obj: nessus_obj
|
59
51
|
)
|
60
52
|
|
61
53
|
puts scan_template_list.inspect
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
54
|
+
selected_scan_template = scan_template_list[:templates].select do |scan_template|
|
55
|
+
scan_template[:title] == scan_template_name
|
56
|
+
end
|
57
|
+
puts selected_scan_template.inspect
|
66
58
|
|
67
|
-
|
68
|
-
|
59
|
+
scan_template_id = selected_scan_template.first[:uuid]
|
60
|
+
puts scan_template_id
|
69
61
|
rescue Interrupt
|
70
62
|
puts 'CTRL+C detected...goodbye.'
|
71
63
|
rescue StandardError => e
|
@@ -93,11 +93,11 @@ module PWN
|
|
93
93
|
end
|
94
94
|
|
95
95
|
# Supported Method Parameters::
|
96
|
-
# PWN::Plugins::NessusCloud.
|
96
|
+
# PWN::Plugins::NessusCloud.get_canned_scan_templates(
|
97
97
|
# nessus_obj: 'required - nessus_obj returned from #login method'
|
98
98
|
# )
|
99
99
|
|
100
|
-
public_class_method def self.
|
100
|
+
public_class_method def self.get_canned_scan_templates(opts = {})
|
101
101
|
nessus_obj = opts[:nessus_obj]
|
102
102
|
|
103
103
|
scan_templates_resp = nessus_cloud_rest_call(
|
@@ -111,11 +111,11 @@ module PWN
|
|
111
111
|
end
|
112
112
|
|
113
113
|
# Supported Method Parameters::
|
114
|
-
# PWN::Plugins::NessusCloud.
|
114
|
+
# PWN::Plugins::NessusCloud.get_scans(
|
115
115
|
# nessus_obj: 'required - nessus_obj returned from #login method'
|
116
116
|
# )
|
117
117
|
|
118
|
-
public_class_method def self.
|
118
|
+
public_class_method def self.get_scans(opts = {})
|
119
119
|
nessus_obj = opts[:nessus_obj]
|
120
120
|
|
121
121
|
scans_resp = nessus_cloud_rest_call(
|
@@ -301,11 +301,11 @@ module PWN
|
|
301
301
|
secret_key: 'required - API secret key (will prompt if blank)'
|
302
302
|
)
|
303
303
|
|
304
|
-
#{self}.
|
304
|
+
#{self}.get_scan_templates(
|
305
305
|
nessus_obj: 'required - nessus_obj returned from #login method'
|
306
306
|
)
|
307
307
|
|
308
|
-
#{self}.
|
308
|
+
#{self}.get_scans(
|
309
309
|
nessus_obj: 'required - nessus_obj returned from #login method'
|
310
310
|
)
|
311
311
|
|
data/lib/pwn/version.rb
CHANGED