pwn 0.5.408 → 0.5.410
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 +3 -3
- data/bin/pwn_burp_suite_pro_active_rest_api_scan +1 -2
- data/bin/pwn_burp_suite_pro_active_scan +1 -2
- data/bin/pwn_zaproxy_active_rest_api_scan +2 -1
- data/bin/pwn_zaproxy_active_scan +1 -3
- data/lib/pwn/plugins/burp_suite.rb +7 -1
- data/lib/pwn/plugins/zaproxy.rb +6 -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: 47f802f58c91581bb6ff43b3d03cbd951207e8768fdc2fd54688f0d2e2552131
|
4
|
+
data.tar.gz: 3168fd3fa3ca83e0950885d1901694b37b0710d62987ac6ae0c1af50409c0a37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f1f19eebb20125b2bf3764eb4278a01c68ef94d8045e354e7846a205b0377f58e5b735b0f95333e42cb4ba7a8f0ac2f0d6053e9c146da8b71e1360a718a795e
|
7
|
+
data.tar.gz: b71d97f350f6aa08a62c2d0b0abbfec20e351a61fb36ccd68b7c1d8944d05b1db53a46449a889e9b7a5dfb8840d8f9a14cd870b20375fe6ac192c6138ca380d2
|
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.410]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.4.4@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.410]: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.4.4@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.410]: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:
|
@@ -85,7 +85,6 @@ begin
|
|
85
85
|
burp_jar_path = opts[:burp_jar_path]
|
86
86
|
headless = opts[:headless] || false
|
87
87
|
browser_type = opts[:browser_type] ||= :firefox
|
88
|
-
browser_type = browser_type.to_s.downcase.to_sym unless browser_type.is_a?(Symbol)
|
89
88
|
debug = opts[:debug] || false
|
90
89
|
|
91
90
|
swagger_defs_arr = swagger_definitions.split(',').map(&:strip)
|
@@ -121,7 +120,7 @@ begin
|
|
121
120
|
if headless
|
122
121
|
burp_obj = PWN::Plugins::BurpSuite.start(
|
123
122
|
burp_jar_path: burp_jar_path,
|
124
|
-
|
123
|
+
headless: headless
|
125
124
|
)
|
126
125
|
else
|
127
126
|
burp_obj = PWN::Plugins::BurpSuite.start(
|
@@ -66,7 +66,6 @@ begin
|
|
66
66
|
burp_jar_path = opts[:burp_jar_path]
|
67
67
|
headless = opts[:headless] || false
|
68
68
|
browser_type = opts[:browser_type] ||= :firefox
|
69
|
-
browser_type = browser_type.to_s.downcase.to_sym unless browser_type.is_a?(Symbol)
|
70
69
|
spider = opts[:spider] || false
|
71
70
|
navigation_instruct = opts[:navigation_instruct]
|
72
71
|
in_scope = opts[:in_scope] ||= target_url
|
@@ -76,7 +75,7 @@ begin
|
|
76
75
|
if headless
|
77
76
|
burp_obj = PWN::Plugins::BurpSuite.start(
|
78
77
|
burp_jar_path: burp_jar_path,
|
79
|
-
|
78
|
+
headless: headless
|
80
79
|
)
|
81
80
|
else
|
82
81
|
burp_obj = PWN::Plugins::BurpSuite.start(
|
@@ -85,7 +85,6 @@ begin
|
|
85
85
|
zap_bin_path = opts[:zap_bin_path]
|
86
86
|
headless = opts[:headless] || false
|
87
87
|
browser_type = opts[:browser_type] ||= :firefox
|
88
|
-
browser_type = browser_type.to_s.downcase.to_sym unless browser_type.is_a?(Symbol)
|
89
88
|
debug = opts[:debug] || false
|
90
89
|
|
91
90
|
swagger_defs_arr = swagger_definitions.split(',').map(&:strip)
|
@@ -116,11 +115,13 @@ begin
|
|
116
115
|
if headless
|
117
116
|
zap_obj = PWN::Plugins::Zaproxy.start(
|
118
117
|
zap_bin_path: zap_bin_path,
|
118
|
+
api_key: api_key,
|
119
119
|
headless: headless
|
120
120
|
)
|
121
121
|
else
|
122
122
|
zap_obj = PWN::Plugins::Zaproxy.start(
|
123
123
|
zap_bin_path: zap_bin_path,
|
124
|
+
api_key: api_key,
|
124
125
|
browser_type: browser_type
|
125
126
|
)
|
126
127
|
end
|
data/bin/pwn_zaproxy_active_scan
CHANGED
@@ -73,7 +73,6 @@ begin
|
|
73
73
|
zap_bin_path = opts[:zap_bin_path].to_s.strip.chomp.scrub if File.exist?(opts[:zap_bin_path].to_s.strip.chomp.scrub)
|
74
74
|
headless = opts[:headless] || false
|
75
75
|
browser_type = opts[:browser_type] ||= :firefox
|
76
|
-
browser_type = browser_type.to_s.downcase.to_sym unless browser_type.is_a?(Symbol)
|
77
76
|
spider = opts[:spider] || false
|
78
77
|
navigation_instruct = opts[:navigation_instruct]
|
79
78
|
in_scope = opts[:in_scope] ||= "#{target_url}.*"
|
@@ -84,8 +83,7 @@ begin
|
|
84
83
|
zap_obj = PWN::Plugins::Zaproxy.start(
|
85
84
|
zap_bin_path: zap_bin_path,
|
86
85
|
api_key: api_key,
|
87
|
-
headless: headless
|
88
|
-
browser_type: :headless
|
86
|
+
headless: headless
|
89
87
|
)
|
90
88
|
else
|
91
89
|
zap_obj = PWN::Plugins::Zaproxy.start(
|
@@ -62,7 +62,10 @@ module PWN
|
|
62
62
|
|
63
63
|
burp_root = File.dirname(burp_jar_path)
|
64
64
|
|
65
|
+
headless = opts[:headless] || false
|
65
66
|
browser_type = opts[:browser_type] ||= :firefox
|
67
|
+
browser_type = browser_type.to_s.downcase.to_sym unless browser_type.is_a?(Symbol)
|
68
|
+
browser_type = :headless if headless
|
66
69
|
burp_ip = opts[:burp_ip] ||= '127.0.0.1'
|
67
70
|
burp_port = opts[:burp_port] ||= PWN::Plugins::Sock.get_random_unused_port
|
68
71
|
|
@@ -70,7 +73,7 @@ module PWN
|
|
70
73
|
pwn_burp_port = opts[:pwn_burp_port] ||= PWN::Plugins::Sock.get_random_unused_port
|
71
74
|
|
72
75
|
burp_cmd_string = 'java -Xms4G -Xmx16G'
|
73
|
-
burp_cmd_string = "#{burp_cmd_string} -Djava.awt.headless=true" if
|
76
|
+
burp_cmd_string = "#{burp_cmd_string} -Djava.awt.headless=true" if headless
|
74
77
|
burp_cmd_string = "#{burp_cmd_string} -Dproxy.address=#{burp_ip} -Dproxy.port=#{burp_port}"
|
75
78
|
burp_cmd_string = "#{burp_cmd_string} -Dserver.address=#{pwn_burp_ip} -Dserver.port=#{pwn_burp_port}"
|
76
79
|
burp_cmd_string = "#{burp_cmd_string} -jar #{burp_jar_path}"
|
@@ -485,6 +488,9 @@ module PWN
|
|
485
488
|
|
486
489
|
debug = opts[:debug] || false
|
487
490
|
|
491
|
+
openapi_spec_root = File.dirname(openapi_spec)
|
492
|
+
Dir.chdir(openapi_spec_root)
|
493
|
+
|
488
494
|
# Parse the OpenAPI JSON or YAML specification file
|
489
495
|
# If the openapi_spec is YAML, convert it to JSON
|
490
496
|
openapi = if openapi_spec.end_with?('.json')
|
data/lib/pwn/plugins/zaproxy.rb
CHANGED
@@ -93,6 +93,8 @@ module PWN
|
|
93
93
|
|
94
94
|
headless = opts[:headless] || false
|
95
95
|
browser_type = opts[:browser_type] ||= :firefox
|
96
|
+
browser_type = browser_type.to_s.downcase.to_sym unless browser_type.is_a?(Symbol)
|
97
|
+
browser_type = :headless if headless
|
96
98
|
zap_ip = opts[:zap_ip] ||= '127.0.0.1'
|
97
99
|
zap_port = opts[:zap_port] ||= PWN::Plugins::Sock.get_random_unused_port
|
98
100
|
|
@@ -728,7 +730,10 @@ module PWN
|
|
728
730
|
session_path = zap_obj[:session_path]
|
729
731
|
session_path_files = Dir.glob("#{session_path}*")
|
730
732
|
# Remove session files - need to add a slight delay between each unlink to work around file locks
|
731
|
-
session_path_files.each
|
733
|
+
session_path_files.each do |f|
|
734
|
+
FileUtils.rm_f(f)
|
735
|
+
sleep 0.3
|
736
|
+
end
|
732
737
|
|
733
738
|
zap_obj = nil
|
734
739
|
rescue StandardError, SystemExit, Interrupt => e
|
data/lib/pwn/version.rb
CHANGED