pwn 0.5.159 → 0.5.161
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_www_uri_buster +22 -8
- data/lib/pwn/plugins/transparent_browser.rb +28 -20
- data/lib/pwn/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0db3c5760e312a8641c11a69259e8c6209ee153135192bd189ae825be98c9eb3
|
4
|
+
data.tar.gz: 890d0193a300e145505db09b43b84946636b7c3f24cccd039f6b259d174ebcd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e623634c9531d84a51a0024c742d0e983ffd6da3acd28732455d6c4560ff49f9e7e2b8f7253d6e7165e59fbd161f7950d8777ea672a555e4c1df5b5378c2fdf3
|
7
|
+
data.tar.gz: 3b73a023378f7e1ec769a9cf2244a3af7bee4f4f653152f204242487d853232825597bb2d243b8108911486bc1f6a0a9bfc78785133d68c2b65877e3e79cff19
|
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.161]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](https://youtu.be/G7iLUY4FzsI)
|
@@ -52,7 +52,7 @@ $ rvm use ruby-3.3.1@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.161]: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.1@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.161]: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_www_uri_buster
CHANGED
@@ -39,8 +39,12 @@ OptionParser.new do |options|
|
|
39
39
|
opts[:http_request_headers] = h
|
40
40
|
end
|
41
41
|
|
42
|
-
options.on('-
|
43
|
-
opts[:
|
42
|
+
options.on('-ICODES', '--include-response-codes=CODES', '<Optional - Comma-Delimited List of Response Codes to Include in Report)>') do |i|
|
43
|
+
opts[:include_http_response_codes] = i
|
44
|
+
end
|
45
|
+
|
46
|
+
options.on('-ECODES', '--exclude-response-codes=CODES', '<Optional - Comma-Delimited List of Response Codes to Exclude in Report)>') do |e|
|
47
|
+
opts[:exclude_http_response_codes] = e
|
44
48
|
end
|
45
49
|
|
46
50
|
options.on('-dDIR', '--dir-path=DIR', '<Optional - Report Output Directory (Defaults to ".")>') do |w|
|
@@ -114,6 +118,7 @@ def request_path(opts = {})
|
|
114
118
|
rescue Errno::ECONNREFUSED
|
115
119
|
raise 'ERROR: Connection(s) Refused. Try lowering the --max-threads value.'
|
116
120
|
rescue Errno::ECONNRESET,
|
121
|
+
NoMethodError,
|
117
122
|
OpenSSL::SSL::SSLError,
|
118
123
|
RestClient::Exceptions::ReadTimeout,
|
119
124
|
RestClient::Exceptions::OpenTimeout,
|
@@ -128,7 +133,7 @@ def request_path(opts = {})
|
|
128
133
|
http_resp_code: e.class,
|
129
134
|
http_resp_length: 'N/A',
|
130
135
|
http_resp_headers: 'N/A',
|
131
|
-
http_resp: e.
|
136
|
+
http_resp: "ERROR: #{e.message}"
|
132
137
|
}
|
133
138
|
rescue RestClient::ExceptionWithResponse => e
|
134
139
|
if e.respond_to?(:response)
|
@@ -190,8 +195,14 @@ begin
|
|
190
195
|
max_threads ||= 25
|
191
196
|
|
192
197
|
http_request_headers = opts[:http_request_headers]
|
193
|
-
|
194
|
-
|
198
|
+
|
199
|
+
include_http_response_codes = opts[:include_http_response_codes]
|
200
|
+
include_http_response_codes = include_http_response_codes.delete("\s").split(',') if include_http_response_codes
|
201
|
+
|
202
|
+
exclude_http_response_codes = opts[:exclude_http_response_codes]
|
203
|
+
exclude_http_response_codes = exclude_http_response_codes.delete("\s").split(',') if exclude_http_response_codes
|
204
|
+
|
205
|
+
raise 'ERROR: Flags --include-response-codes and --exclude-response-codes cannot be used together.' if include_http_response_codes && exclude_http_response_codes
|
195
206
|
|
196
207
|
dir_path = opts[:dir_path]
|
197
208
|
dir_path ||= '.'
|
@@ -219,7 +230,7 @@ begin
|
|
219
230
|
|
220
231
|
next if wordlist_line.match?(/^#/)
|
221
232
|
|
222
|
-
|
233
|
+
http_methods = %i[DELETE GET HEAD OPTIONS PATCH POST PUT TRACE].shuffle
|
223
234
|
http_methods.each do |http_method|
|
224
235
|
rest_client_resp_hash = request_path(
|
225
236
|
target_url: target_url,
|
@@ -230,9 +241,12 @@ begin
|
|
230
241
|
)
|
231
242
|
|
232
243
|
mutex.synchronize do
|
233
|
-
if
|
244
|
+
if include_http_response_codes
|
245
|
+
ret_http_resp_code = rest_client_resp_hash[:http_resp_code].to_s
|
246
|
+
results_hash[:data].push(rest_client_resp_hash) if include_http_response_codes.include?(ret_http_resp_code)
|
247
|
+
elsif exclude_http_response_codes
|
234
248
|
ret_http_resp_code = rest_client_resp_hash[:http_resp_code].to_s
|
235
|
-
results_hash[:data].push(rest_client_resp_hash)
|
249
|
+
results_hash[:data].push(rest_client_resp_hash) unless exclude_http_response_codes.include?(ret_http_resp_code)
|
236
250
|
else
|
237
251
|
results_hash[:data].push(rest_client_resp_hash)
|
238
252
|
end
|
@@ -45,6 +45,15 @@ module PWN
|
|
45
45
|
# Let's crank up the default timeout from 30 seconds to 15 min for slow sites
|
46
46
|
Watir.default_timeout = 900
|
47
47
|
|
48
|
+
args = []
|
49
|
+
args.push('--start-maximized')
|
50
|
+
args.push('--disable-notifications')
|
51
|
+
|
52
|
+
unless browser_type == :rest
|
53
|
+
logger = Selenium::WebDriver.logger
|
54
|
+
logger.level = :error
|
55
|
+
end
|
56
|
+
|
48
57
|
case browser_type
|
49
58
|
when :firefox
|
50
59
|
this_profile = Selenium::WebDriver::Firefox::Profile.new
|
@@ -98,10 +107,11 @@ module PWN
|
|
98
107
|
end
|
99
108
|
end
|
100
109
|
|
101
|
-
args = []
|
102
|
-
|
103
110
|
args.push('--devtools') if with_devtools
|
104
|
-
options = Selenium::WebDriver::Firefox::Options.new(
|
111
|
+
options = Selenium::WebDriver::Firefox::Options.new(
|
112
|
+
args: args,
|
113
|
+
accept_insecure_certs: true
|
114
|
+
)
|
105
115
|
options.profile = this_profile
|
106
116
|
# driver = Selenium::WebDriver.for(:firefox, capabilities: options)
|
107
117
|
driver = Selenium::WebDriver.for(:firefox, options: options)
|
@@ -112,22 +122,18 @@ module PWN
|
|
112
122
|
this_profile['download.prompt_for_download'] = false
|
113
123
|
this_profile['download.default_directory'] = '~/Downloads'
|
114
124
|
|
115
|
-
switches = []
|
116
|
-
switches.push('--start-maximized')
|
117
|
-
switches.push('--disable-notifications')
|
118
|
-
|
119
125
|
if proxy
|
120
|
-
|
121
|
-
|
126
|
+
args.push("--host-resolver-rules='MAP * 0.0.0.0 , EXCLUDE #{tor_obj[:ip]}'") if tor_obj
|
127
|
+
args.push("--proxy-server=#{proxy}")
|
122
128
|
end
|
123
129
|
|
124
130
|
if with_devtools
|
125
|
-
|
126
|
-
|
131
|
+
args.push('--auto-open-devtools-for-tabs')
|
132
|
+
args.push('--disable-hang-monitor')
|
127
133
|
end
|
128
134
|
|
129
135
|
options = Selenium::WebDriver::Chrome::Options.new(
|
130
|
-
args:
|
136
|
+
args: args,
|
131
137
|
accept_insecure_certs: true
|
132
138
|
)
|
133
139
|
|
@@ -188,7 +194,12 @@ module PWN
|
|
188
194
|
end
|
189
195
|
end
|
190
196
|
|
191
|
-
|
197
|
+
args.push('--headless')
|
198
|
+
options = Selenium::WebDriver::Firefox::Options.new(
|
199
|
+
args: args,
|
200
|
+
accept_insecure_certs: true
|
201
|
+
)
|
202
|
+
|
192
203
|
options.profile = this_profile
|
193
204
|
driver = Selenium::WebDriver.for(:firefox, options: options)
|
194
205
|
browser_obj[:browser] = Watir::Browser.new(driver)
|
@@ -198,18 +209,15 @@ module PWN
|
|
198
209
|
this_profile['download.prompt_for_download'] = false
|
199
210
|
this_profile['download.default_directory'] = '~/Downloads'
|
200
211
|
|
201
|
-
|
202
|
-
switches.push('--headless')
|
203
|
-
switches.push('--start-maximized')
|
204
|
-
switches.push('--disable-notifications')
|
212
|
+
args.push('--headless')
|
205
213
|
|
206
214
|
if proxy
|
207
|
-
|
208
|
-
|
215
|
+
args.push("--host-resolver-rules='MAP * 0.0.0.0 , EXCLUDE #{tor_obj[:ip]}'") if tor_obj
|
216
|
+
args.push("--proxy-server=#{proxy}")
|
209
217
|
end
|
210
218
|
|
211
219
|
options = Selenium::WebDriver::Chrome::Options.new(
|
212
|
-
args:
|
220
|
+
args: args,
|
213
221
|
accept_insecure_certs: true
|
214
222
|
)
|
215
223
|
|
data/lib/pwn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.161
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|