pwn 0.4.422 → 0.4.425

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: cc1e32a44a5b5797d925e464dbc32195f27d20302fe4ec0f0b05f417c5a2b7c2
4
- data.tar.gz: 95f27bf92deba3e9bcc8100024c9d28cceebee21b47a2013d6f1e65489561ab3
3
+ metadata.gz: d4a47ff0bf8350920bc9a2224135122ef4d9d9a36338eb1828fb069d81ad0dca
4
+ data.tar.gz: 87c65009e4c69eea0869f5bdac839b1d7176ab8720664a6464fdfa121e529f37
5
5
  SHA512:
6
- metadata.gz: 5e1b67eea92a2647689bfd6d3b3a2b4ee951e37da0740d8465619cd489679873c8ce2a62bac14cd6d8a1a275e00afd3f906916213734844c3dc806c26956cea9
7
- data.tar.gz: 22d4340100fc68bc36636bb10e78edb8d478b9f53ce8923be8c684ed788cd6930176b175807cd8fcd00815f3539fefe4680a4bc4c71d4f9b7276827290982098
6
+ metadata.gz: 2db5d78bd92f20eb74714e703d375e1a5fe8c7214021e1137550b64aa1df594010cffd8b93abc47909cbd2de826b53c871007b16dc12c145b88a9344c96e9c1b
7
+ data.tar.gz: 631967c3578160bd7b5e14fa2f9a3f45d2966c17deba84f4389dc0e458062f66bc029fef35d2b40a1cb224c683cdc2a2045ce033396e072c1632cde4b3980792
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.422]:001 >>> PWN.help
40
+ pwn[v0.4.425]: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.422]:001 >>> PWN.help
55
+ pwn[v0.4.425]: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,26 +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'
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
- selected_scan_template = scan_template_list[:scans].select do |scan|
62
- scan[:name] == scan_name
53
+ puts scan_template_list.inspect
54
+ selected_scan_template = scan_template_list[:templates].select do |scan_template|
55
+ scan_template[:title] == scan_template_name
63
56
  end
64
57
  puts selected_scan_template.inspect
65
58
 
66
- # scan_template_id = selected_scan_template.first[:id]
67
- # puts scan_template_id
59
+ scan_template_id = selected_scan_template.first[:uuid]
60
+ puts scan_template_id
68
61
  rescue Interrupt
69
62
  puts 'CTRL+C detected...goodbye.'
70
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_canned_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.422'
4
+ VERSION = '0.4.425'
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.422
4
+ version: 0.4.425
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.