pwn 0.5.61 → 0.5.63
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +8 -13
- data/Gemfile +1 -1
- data/README.md +3 -3
- data/bin/pwn +7 -7
- data/bin/pwn_gqrx_scanner +11 -3
- data/etc/pwn.yaml.EXAMPLE +1 -1
- data/lib/pwn/plugins/ollama.rb +853 -0
- data/lib/pwn/plugins/vault.rb +199 -0
- data/lib/pwn/plugins.rb +2 -1
- data/lib/pwn/version.rb +1 -1
- data/spec/lib/pwn/plugins/{ansible_vault_spec.rb → ollama_spec.rb} +3 -3
- data/spec/lib/pwn/plugins/vault_spec.rb +15 -0
- metadata +8 -6
- data/lib/pwn/plugins/ansible_vault.rb +0 -73
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0fc6d58c74aac204b6229e60d2f99f7921ed433e3555153f8847567d73f3c01
|
4
|
+
data.tar.gz: 02d72e88c53863d7dc49b50d4c29814aaca74a132ed3e5c7252c7684694214a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed13a5207890b9b882480ce2c59f37ae5ca2d13d4f0fd7ebfc2e0bed826b2038cd8779f6995df9900c8730448fc8541b5ae979432a74d568bfcf663a99ef39a8
|
7
|
+
data.tar.gz: 324e69a0d7bad8d43656dc6f593917af2322b9cd863be08ad861a65b22e27757a19f259399579d9e3c3645516f47e73bec959fd6886893bb7f65c67044d95820
|
data/.rubocop_todo.yml
CHANGED
@@ -1,18 +1,11 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2024-03-
|
3
|
+
# on 2024-03-25 22:25:57 UTC using RuboCop version 1.62.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count: 1
|
10
|
-
# Configuration parameters: Severity, Include.
|
11
|
-
# Include: **/*.gemspec
|
12
|
-
Gemspec/RequiredRubyVersion:
|
13
|
-
Exclude:
|
14
|
-
- 'pwn.gemspec'
|
15
|
-
|
16
9
|
# Offense count: 5
|
17
10
|
# This cop supports safe autocorrection (--autocorrect).
|
18
11
|
# Configuration parameters: EnforcedStyle.
|
@@ -24,7 +17,7 @@ Layout/LineContinuationSpacing:
|
|
24
17
|
- 'packer/provisioners/wpscan.rb'
|
25
18
|
- 'vagrant/provisioners/beef.rb'
|
26
19
|
|
27
|
-
# Offense count:
|
20
|
+
# Offense count: 24
|
28
21
|
# This cop supports safe autocorrection (--autocorrect).
|
29
22
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
30
23
|
# URISchemes: http, https
|
@@ -34,6 +27,7 @@ Layout/LineLength:
|
|
34
27
|
- 'bin/pwn_diff_csv_files_w_column_exclude'
|
35
28
|
- 'lib/pwn/banner/jmp_esp.rb'
|
36
29
|
- 'lib/pwn/plugins/mail_agent.rb'
|
30
|
+
- 'lib/pwn/plugins/ollama.rb'
|
37
31
|
- 'lib/pwn/plugins/open_ai.rb'
|
38
32
|
- 'lib/pwn/reports/fuzz.rb'
|
39
33
|
- 'lib/pwn/reports/phone.rb'
|
@@ -41,7 +35,7 @@ Layout/LineLength:
|
|
41
35
|
- 'lib/pwn/reports/uri_buster.rb'
|
42
36
|
- 'lib/pwn/sast/banned_function_calls_c.rb'
|
43
37
|
|
44
|
-
# Offense count:
|
38
|
+
# Offense count: 311
|
45
39
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
46
40
|
# Configuration parameters: AutoCorrect.
|
47
41
|
Lint/UselessAssignment:
|
@@ -80,7 +74,7 @@ Metrics/MethodLength:
|
|
80
74
|
Exclude:
|
81
75
|
- 'lib/pwn/banner/code_cave.rb'
|
82
76
|
|
83
|
-
# Offense count:
|
77
|
+
# Offense count: 9
|
84
78
|
# Configuration parameters: CountComments, Max, CountAsOne.
|
85
79
|
Metrics/ModuleLength:
|
86
80
|
Exclude:
|
@@ -90,6 +84,7 @@ Metrics/ModuleLength:
|
|
90
84
|
- 'lib/pwn/plugins/ibm_appscan.rb'
|
91
85
|
- 'lib/pwn/plugins/msr206.rb'
|
92
86
|
- 'lib/pwn/plugins/nessus_cloud.rb'
|
87
|
+
- 'lib/pwn/plugins/ollama.rb'
|
93
88
|
- 'lib/pwn/plugins/open_ai.rb'
|
94
89
|
- 'lib/pwn/plugins/packet.rb'
|
95
90
|
|
@@ -97,7 +92,7 @@ Metrics/ModuleLength:
|
|
97
92
|
Style/ClassVars:
|
98
93
|
Enabled: false
|
99
94
|
|
100
|
-
# Offense count:
|
95
|
+
# Offense count: 278
|
101
96
|
# This cop supports safe autocorrection (--autocorrect).
|
102
97
|
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
103
98
|
# SupportedStyles: assign_to_condition, assign_inside_condition
|
@@ -134,7 +129,7 @@ Style/RedundantStringEscape:
|
|
134
129
|
- 'lib/pwn/sast/redos.rb'
|
135
130
|
- 'vagrant/provisioners/kali_customize.rb'
|
136
131
|
|
137
|
-
# Offense count:
|
132
|
+
# Offense count: 51
|
138
133
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
139
134
|
Style/SlicingWithRange:
|
140
135
|
Enabled: false
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
|
|
37
37
|
$ ./install.sh
|
38
38
|
$ ./install.sh ruby-gem
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.5.
|
40
|
+
pwn[v0.5.63]: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.3.0@pwn
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
53
53
|
$ gem install --verbose pwn
|
54
54
|
$ pwn
|
55
|
-
pwn[v0.5.
|
55
|
+
pwn[v0.5.63]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
If you're using a multi-user install of RVM do:
|
@@ -62,7 +62,7 @@ $ rvm use ruby-3.3.0@pwn
|
|
62
62
|
$ rvmsudo gem uninstall --all --executables pwn
|
63
63
|
$ rvmsudo gem install --verbose pwn
|
64
64
|
$ pwn
|
65
|
-
pwn[v0.5.
|
65
|
+
pwn[v0.5.63]:001 >>> PWN.help
|
66
66
|
```
|
67
67
|
|
68
68
|
PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
|
data/bin/pwn
CHANGED
@@ -289,7 +289,7 @@ begin
|
|
289
289
|
if opts[:yaml_config_path] && File.exist?(opts[:yaml_config_path])
|
290
290
|
yaml_config_path = opts[:yaml_config_path]
|
291
291
|
yaml_config = YAML.load_file(yaml_config_path, symbolize_names: true)
|
292
|
-
pi.config.pwn_ai_key = yaml_config[:
|
292
|
+
pi.config.pwn_ai_key = yaml_config[:ai_key]
|
293
293
|
Pry.config.pwn_ai_key = pi.config.pwn_ai_key
|
294
294
|
end
|
295
295
|
end
|
@@ -326,19 +326,19 @@ begin
|
|
326
326
|
if pi.config.pwn_ai && !request.chomp.empty?
|
327
327
|
request = pi.input.line_buffer.to_s
|
328
328
|
debug = pi.config.pwn_ai_debug
|
329
|
-
|
330
|
-
|
331
|
-
if
|
332
|
-
|
329
|
+
ai_key = pi.config.pwn_ai_key
|
330
|
+
ai_key ||= ''
|
331
|
+
if ai_key.empty?
|
332
|
+
ai_key = PWN::Plugins::AuthenticationHelper.mask_password(
|
333
333
|
prompt: 'OpenAI API Key'
|
334
334
|
)
|
335
|
-
pi.config.pwn_ai_key =
|
335
|
+
pi.config.pwn_ai_key = ai_key
|
336
336
|
end
|
337
337
|
|
338
338
|
response_history = pi.config.pwn_ai_response_history
|
339
339
|
speak_answer = pi.config.pwn_ai_speak
|
340
340
|
response = PWN::Plugins::OpenAI.chat(
|
341
|
-
token:
|
341
|
+
token: ai_key,
|
342
342
|
request: request.chomp,
|
343
343
|
temp: 1,
|
344
344
|
response_history: response_history,
|
data/bin/pwn_gqrx_scanner
CHANGED
@@ -183,6 +183,14 @@ def gqrx_cmd(opts = {})
|
|
183
183
|
# puts response.length
|
184
184
|
|
185
185
|
response
|
186
|
+
rescue RuntimeError => e
|
187
|
+
puts 'WARNING: RF Gain is not supported by the radio backend.' if e.message.include?('Command: L RF_GAIN')
|
188
|
+
puts 'WARNING: Intermediate Gain is not supported by the radio backend.' if e.message.include?('Command: L IF_GAIN')
|
189
|
+
puts 'WARNING: Baseband Gain is not supported by the radio backend.' if e.message.include?('Command: L BB_GAIN')
|
190
|
+
|
191
|
+
raise e unless e.message.include?('Command: L RF_GAIN') ||
|
192
|
+
e.message.include?('Command: L IF_GAIN') ||
|
193
|
+
e.message.include?('Command: L BB_GAIN')
|
186
194
|
end
|
187
195
|
|
188
196
|
def init_freq(opts = {})
|
@@ -403,7 +411,7 @@ begin
|
|
403
411
|
|
404
412
|
rf_gain = opts[:rf_gain] ||= 0.0
|
405
413
|
rf_gain = rf_gain.to_f
|
406
|
-
|
414
|
+
rf_gain_resp = gqrx_cmd(
|
407
415
|
gqrx_sock: gqrx_sock,
|
408
416
|
cmd: "L RF_GAIN #{rf_gain}",
|
409
417
|
resp_ok: 'RPRT 0'
|
@@ -411,7 +419,7 @@ begin
|
|
411
419
|
|
412
420
|
intermediate_gain = opts[:intermediate_gain] ||= 32.0
|
413
421
|
intermediate_gain = intermediate_gain.to_f
|
414
|
-
|
422
|
+
intermediate_resp = gqrx_cmd(
|
415
423
|
gqrx_sock: gqrx_sock,
|
416
424
|
cmd: "L IF_GAIN #{intermediate_gain}",
|
417
425
|
resp_ok: 'RPRT 0'
|
@@ -419,7 +427,7 @@ begin
|
|
419
427
|
|
420
428
|
baseband_gain = opts[:baseband_gain] ||= 10.0
|
421
429
|
baseband_gain = baseband_gain.to_f
|
422
|
-
|
430
|
+
baseband_resp = gqrx_cmd(
|
423
431
|
gqrx_sock: gqrx_sock,
|
424
432
|
cmd: "L BB_GAIN #{baseband_gain}",
|
425
433
|
resp_ok: 'RPRT 0'
|
data/etc/pwn.yaml.EXAMPLE
CHANGED