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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30825d3c25308a94b50f04883fa7d6465ab9f76e154d26662955d846a666e8ba
4
- data.tar.gz: 0aa40a7488bab904d6fa53083e33ca1b9676820e9ba5eb79ab4525a91708cb49
3
+ metadata.gz: fac5757a167e6313ef8eba620e32f4cf59e19e24b7588583d65a4e2570b40f96
4
+ data.tar.gz: '083b60cc0345807d15006fd7c5751d3369b7594b5b264f9169d98fa8bd4c2896'
5
5
  SHA512:
6
- metadata.gz: 3dc9eafee7b97039664ef0ff482ac09a0eb3294bd6d705b8a9056f18f4eb2925ee08bd9c11ad14fb530b08033622a6eed895e6151cdfe07963e676d2f1b538c1
7
- data.tar.gz: 4f52f239ee71b472e11a726e61b36d5efcf8519d6f8c39c07826ef64f83f7bfde0d18a80b4e9b39f1084da2bf62bfa9e538d57b260f713f267f137900d3e40b0
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.423]:001 >>> PWN.help
40
+ pwn[v0.4.424]: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.423]:001 >>> PWN.help
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', '<Required - Name of Scan to Launch>') do |n|
19
- opts[:scan_name] = n
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
- scan_name = opts[:scan_name]
49
- path_to_export = opts[:path_to_export]
50
- format = opts[:format]
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
- scan_template_list = PWN::Plugins::NessusCloud.list_scan_templates(
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
- # selected_scan_template = scan_template_list[:scans].select do |scan|
63
- # scan[:name] == scan_name
64
- # end
65
- # puts selected_scan_template.inspect
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
- # scan_template_id = selected_scan_template.first[:id]
68
- # puts scan_template_id
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
@@ -54,7 +54,7 @@ begin
54
54
  secret_key: secret_key
55
55
  )
56
56
 
57
- scan_list = PWN::Plugins::NessusCloud.list_scans(
57
+ scan_list = PWN::Plugins::NessusCloud.get_scans(
58
58
  nessus_obj: nessus_obj
59
59
  )
60
60
 
@@ -93,11 +93,11 @@ module PWN
93
93
  end
94
94
 
95
95
  # Supported Method Parameters::
96
- # PWN::Plugins::NessusCloud.list_scan_templates(
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.list_scan_templates(opts = {})
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.list_scans(
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.list_scans(opts = {})
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}.list_scan_templates(
304
+ #{self}.get_scan_templates(
305
305
  nessus_obj: 'required - nessus_obj returned from #login method'
306
306
  )
307
307
 
308
- #{self}.list_scans(
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.4.423'
4
+ VERSION = '0.4.424'
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.423
4
+ version: 0.4.424
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.