pwn 0.4.700 → 0.4.702
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG_BETWEEN_TAGS.txt +492 -108
- data/README.md +2 -2
- data/bin/pwn_burp_suite_pro_active_scan +2 -1
- data/bin/pwn_domain_reversewhois +8 -7
- data/bin/pwn_owasp_zap_active_scan +3 -2
- data/bin/pwn_pastebin_sample_filter +6 -4
- data/bin/pwn_web_cache_deception +11 -8
- data/bin/pwn_www_checkip +6 -5
- data/bin/pwn_www_uri_buster +5 -4
- data/bin/pwn_xss_dom_vectors +12 -9
- data/lib/pwn/plugins/baresip.rb +3 -2
- data/lib/pwn/plugins/beef.rb +5 -2
- data/lib/pwn/plugins/burp_suite.rb +7 -5
- data/lib/pwn/plugins/defect_dojo.rb +5 -3
- data/lib/pwn/plugins/github.rb +2 -1
- data/lib/pwn/plugins/hacker_one.rb +4 -2
- data/lib/pwn/plugins/ibm_appscan.rb +13 -6
- data/lib/pwn/plugins/ip_info.rb +4 -2
- data/lib/pwn/plugins/jira_server.rb +2 -1
- data/lib/pwn/plugins/nessus_cloud.rb +2 -1
- data/lib/pwn/plugins/open_ai.rb +3 -1
- data/lib/pwn/plugins/owasp_zap.rb +2 -1
- data/lib/pwn/plugins/shodan.rb +2 -1
- data/lib/pwn/plugins/transparent_browser.rb +26 -36
- data/lib/pwn/plugins/twitter_api.rb +5 -2
- data/lib/pwn/plugins/vsphere.rb +1 -2
- data/lib/pwn/version.rb +1 -1
- data/lib/pwn/www/app_cobalt_io.rb +19 -13
- data/lib/pwn/www/bing.rb +9 -6
- data/lib/pwn/www/bug_crowd.rb +19 -13
- data/lib/pwn/www/checkip.rb +7 -5
- data/lib/pwn/www/coinbase_pro.rb +18 -12
- data/lib/pwn/www/duckduckgo.rb +15 -8
- data/lib/pwn/www/facebook.rb +16 -10
- data/lib/pwn/www/google.rb +12 -8
- data/lib/pwn/www/hacker_one.rb +16 -10
- data/lib/pwn/www/linkedin.rb +16 -10
- data/lib/pwn/www/pandora.rb +16 -10
- data/lib/pwn/www/pastebin.rb +9 -5
- data/lib/pwn/www/paypal.rb +36 -28
- data/lib/pwn/www/synack.rb +19 -13
- data/lib/pwn/www/torch.rb +12 -7
- data/lib/pwn/www/trading_view.rb +19 -13
- data/lib/pwn/www/twitter.rb +20 -12
- data/lib/pwn/www/uber.rb +16 -10
- data/lib/pwn/www/upwork.rb +16 -10
- data/lib/pwn/www/youtube.rb +9 -6
- metadata +2 -6
- data/bin/pwn_arachni +0 -157
- data/bin/pwn_arachni_rest +0 -174
data/README.md
CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.2.2@pwn
|
|
37
37
|
$ rvm list gemsets
|
38
38
|
$ gem install --verbose pwn
|
39
39
|
$ pwn
|
40
|
-
pwn[v0.4.
|
40
|
+
pwn[v0.4.702]: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.2.2@pwn
|
|
52
52
|
$ gem uninstall --all --executables pwn
|
53
53
|
$ gem install --verbose pwn
|
54
54
|
$ pwn
|
55
|
-
pwn[v0.4.
|
55
|
+
pwn[v0.4.702]:001 >>> PWN.help
|
56
56
|
```
|
57
57
|
|
58
58
|
|
@@ -72,7 +72,8 @@ begin
|
|
72
72
|
# support JavaScript, DOM-based XSS vuln attempts are
|
73
73
|
# possible as well since we have a DOM to interact w/
|
74
74
|
# (Burp's DOM-XSS checks are based on static code analysis)
|
75
|
-
|
75
|
+
browser_obj = burp_obj[:burp_browser]
|
76
|
+
browser = browser_obj[:browser]
|
76
77
|
browser.goto(target_url)
|
77
78
|
|
78
79
|
File.read(navigation_instruct).each_line do |instruction|
|
data/bin/pwn_domain_reversewhois
CHANGED
@@ -20,7 +20,7 @@ OptionParser.new do |options|
|
|
20
20
|
opts[:output_results] = o
|
21
21
|
end
|
22
22
|
|
23
|
-
options.on('-pPROXY', '--proxy=PROXY', '<Optional - HTTP or Socks Proxy ||
|
23
|
+
options.on('-pPROXY', '--proxy=PROXY', '<Optional - HTTP or Socks Proxy || tor>') do |p|
|
24
24
|
opts[:proxy] = p
|
25
25
|
end
|
26
26
|
end.parse!
|
@@ -44,10 +44,11 @@ begin
|
|
44
44
|
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :headless)
|
45
45
|
end
|
46
46
|
|
47
|
-
browser_obj
|
47
|
+
browser = browser_obj[:browser]
|
48
|
+
browser.goto("https://viewdns.info/reversewhois/?q=#{CGI.escape(registrant_filter)}")
|
48
49
|
|
49
50
|
# Consume Results Table and Convert to CSV :)
|
50
|
-
reversewhois_xp_resp = Nokogiri::HTML(
|
51
|
+
reversewhois_xp_resp = Nokogiri::HTML(browser.html).xpath('//*[@id="null"]/tbody/tr[3]/td/font/table/tbody/tr')
|
51
52
|
CSV.open(output_results, 'w', col_sep: ',', quote_char: "'", force_quotes: true) do |csv|
|
52
53
|
reversewhois_xp_resp.each do |row|
|
53
54
|
tarray = []
|
@@ -59,16 +60,16 @@ begin
|
|
59
60
|
end
|
60
61
|
|
61
62
|
# Ok, now let's append domain bigdata.com
|
62
|
-
|
63
|
+
browser.goto('https://domainbigdata.com')
|
63
64
|
|
64
65
|
# Type Registrant Filter in Char-by-Char to Ensure Everyone is Happy ;)
|
65
66
|
PWN::Plugins::TransparentBrowser.type_as_human(string: registrant_filter) do |char|
|
66
|
-
|
67
|
+
browser.text_field(id: 'txtSearchTopPage').wait_until(&:present?).send_keys(char)
|
67
68
|
end
|
68
|
-
|
69
|
+
browser.button(id: 'btnTopSearch').wait_until(&:present?).click
|
69
70
|
|
70
71
|
# Consume Results Table and Convert to CSV :)
|
71
|
-
reversewhois_xp_resp = Nokogiri::HTML(
|
72
|
+
reversewhois_xp_resp = Nokogiri::HTML(browser.html).xpath('//*[@id="domain-same-ip"]/div/div/table/tbody/tr')
|
72
73
|
CSV.open(output_results, 'a', col_sep: ',', quote_char: "'", force_quotes: true) do |csv|
|
73
74
|
reversewhois_xp_resp.each do |row|
|
74
75
|
tarray = []
|
@@ -77,10 +77,11 @@ begin
|
|
77
77
|
|
78
78
|
logger.info(zap_obj)
|
79
79
|
|
80
|
-
|
80
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(
|
81
81
|
browser_type: browser_type,
|
82
82
|
proxy: proxy
|
83
83
|
)
|
84
|
+
browser = browser_obj[:browser]
|
84
85
|
|
85
86
|
if browser_type == :rest
|
86
87
|
browser.get(target_url)
|
@@ -129,5 +130,5 @@ rescue StandardError => e
|
|
129
130
|
raise e
|
130
131
|
ensure
|
131
132
|
PWN::Plugins::OwaspZap.stop(zap_obj: zap_obj) unless zap_obj.nil?
|
132
|
-
|
133
|
+
browser_obj = PWN::Plugins::TransparentBrowser.close(browser_obj: browser_obj) unless browser_obj.nil?
|
133
134
|
end
|
@@ -14,7 +14,7 @@ OptionParser.new do |options|
|
|
14
14
|
opts[:regex] = r
|
15
15
|
end
|
16
16
|
|
17
|
-
options.on('-pPROXY', '--proxy=PROXY', '<Optional - HTTP or Socks Proxy ||
|
17
|
+
options.on('-pPROXY', '--proxy=PROXY', '<Optional - HTTP or Socks Proxy || tor>') do |p|
|
18
18
|
opts[:proxy] = p
|
19
19
|
end
|
20
20
|
end.parse!
|
@@ -32,12 +32,14 @@ browser_obj = PWN::WWW::Pastebin.open(
|
|
32
32
|
proxy: proxy
|
33
33
|
)
|
34
34
|
|
35
|
+
browser = browser_obj[:browser]
|
36
|
+
|
35
37
|
begin
|
36
38
|
loop do
|
37
|
-
|
38
|
-
code_frame =
|
39
|
+
browser.div(id: 'menu_2').links[0].click
|
40
|
+
code_frame = browser.div(id: 'code_frame').text
|
39
41
|
if code_frame.match?(/#{regex}/mi)
|
40
|
-
puts "\nCurrent Link: #{
|
42
|
+
puts "\nCurrent Link: #{browser.url}"
|
41
43
|
puts "#{code_frame}\n\n\n"
|
42
44
|
else
|
43
45
|
print '.'
|
data/bin/pwn_web_cache_deception
CHANGED
@@ -38,7 +38,7 @@ OptionParser.new do |options|
|
|
38
38
|
opts[:mfa] = f
|
39
39
|
end
|
40
40
|
|
41
|
-
options.on('-pPROXY', '--proxy=PROXY', '<Optional - HTTP or Socks Proxy ||
|
41
|
+
options.on('-pPROXY', '--proxy=PROXY', '<Optional - HTTP or Socks Proxy || tor>') do |p|
|
42
42
|
opts[:proxy] = p
|
43
43
|
end
|
44
44
|
end.parse!
|
@@ -92,8 +92,9 @@ begin
|
|
92
92
|
payload = opts[:payload].to_s.scrub.chomp.strip
|
93
93
|
|
94
94
|
# Browse to original page to compare response lengths
|
95
|
-
browser_obj
|
96
|
-
|
95
|
+
browser = browser_obj[:browser]
|
96
|
+
browser.goto(target_url)
|
97
|
+
orig_url_response_length = browser.html.length
|
97
98
|
|
98
99
|
http_result = ''
|
99
100
|
if target_url.include?('?')
|
@@ -102,8 +103,8 @@ begin
|
|
102
103
|
injected_target_url.path = "#{injected_target_url.path.to_s.chomp('/')}/wcd.#{payload}"
|
103
104
|
web_cache_deception_url = injected_target_url.to_s
|
104
105
|
|
105
|
-
|
106
|
-
injected_url_response_length =
|
106
|
+
browser.goto(injected_target_url.to_s)
|
107
|
+
injected_url_response_length = browser.html.length
|
107
108
|
|
108
109
|
if injected_url_response_length == orig_url_response_length
|
109
110
|
# TODO: Add incognito Chrome browser
|
@@ -115,8 +116,8 @@ begin
|
|
115
116
|
end
|
116
117
|
else
|
117
118
|
web_cache_deception_url = "#{target_url.chomp('/')}/wcd.#{payload}"
|
118
|
-
|
119
|
-
wcd_url_response_length =
|
119
|
+
browser.goto(web_cache_deception_url)
|
120
|
+
wcd_url_response_length = browser.html.length
|
120
121
|
|
121
122
|
if orig_url_response_length == wcd_url_response_length
|
122
123
|
# TODO: Add incognito Chrome browser
|
@@ -176,8 +177,10 @@ begin
|
|
176
177
|
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :chrome)
|
177
178
|
end
|
178
179
|
|
180
|
+
browser = browser_obj[:browser]
|
181
|
+
|
179
182
|
puts "#{@green}Navigating to Target URL: #{target_url}#{@end_of_color}\n\n\n"
|
180
|
-
|
183
|
+
browser.goto(target_url)
|
181
184
|
|
182
185
|
web_cache_deception_payload_arr = %w[
|
183
186
|
aif aiff au avi bin bmp cab carb cct cdf class css doc dcr dtd gcf gff gif grv hdml hqx ico ini jpeg jpg js mov mp3 mp4 nc pct ppc pws swa swf txt vbs w32 wav wbmp wml wmlc wmls wmlsc xsd zip
|
data/bin/pwn_www_checkip
CHANGED
@@ -10,7 +10,7 @@ OptionParser.new do |options|
|
|
10
10
|
#{$PROGRAM_NAME} [opts]
|
11
11
|
"
|
12
12
|
|
13
|
-
options.on('-pPROXY', '--proxy=PROXY', '<Optional - HTTP or Socks Proxy ||
|
13
|
+
options.on('-pPROXY', '--proxy=PROXY', '<Optional - HTTP or Socks Proxy || tor>') do |p|
|
14
14
|
opts[:proxy] = p
|
15
15
|
end
|
16
16
|
|
@@ -27,19 +27,20 @@ begin
|
|
27
27
|
browser_obj = PWN::Plugins::TransparentBrowser.open(
|
28
28
|
browser_type: :rest,
|
29
29
|
proxy: proxy
|
30
|
-
)
|
30
|
+
)
|
31
31
|
else
|
32
|
-
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
32
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
33
33
|
end
|
34
|
+
browser = browser_obj[:browser]::Request
|
34
35
|
|
35
36
|
if proxy
|
36
|
-
public_ip_address =
|
37
|
+
public_ip_address = browser.execute(
|
37
38
|
method: :get,
|
38
39
|
url: 'https://checkip.amazonaws.com',
|
39
40
|
verify_ssl: false
|
40
41
|
).to_s.chomp
|
41
42
|
else
|
42
|
-
public_ip_address =
|
43
|
+
public_ip_address = browser.execute(
|
43
44
|
method: :get,
|
44
45
|
url: 'https://checkip.amazonaws.com'
|
45
46
|
).to_s.chomp
|
data/bin/pwn_www_uri_buster
CHANGED
@@ -67,15 +67,16 @@ def request_path(opts = {})
|
|
67
67
|
print '.'
|
68
68
|
http_uri = "#{target_url}/#{wordlist_line}"
|
69
69
|
if proxy
|
70
|
-
|
70
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(
|
71
71
|
browser_type: :rest,
|
72
72
|
proxy: proxy
|
73
|
-
)
|
73
|
+
)
|
74
74
|
else
|
75
|
-
|
75
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(
|
76
76
|
browser_type: :rest
|
77
|
-
)
|
77
|
+
)
|
78
78
|
end
|
79
|
+
rest_client = browser_obj[:browser]::Request
|
79
80
|
|
80
81
|
headers = nil
|
81
82
|
if http_request_headers
|
data/bin/pwn_xss_dom_vectors
CHANGED
@@ -26,7 +26,7 @@ OptionParser.new do |options|
|
|
26
26
|
opts[:browser_type] = b
|
27
27
|
end
|
28
28
|
|
29
|
-
options.on('-pPROXY', '--proxy=PROXY', '<Optional - HTTP or Socks Proxy ||
|
29
|
+
options.on('-pPROXY', '--proxy=PROXY', '<Optional - HTTP or Socks Proxy || tor>') do |p|
|
30
30
|
opts[:proxy] = p
|
31
31
|
end
|
32
32
|
|
@@ -73,9 +73,10 @@ begin
|
|
73
73
|
target_page = opts[:url].to_s.scrub.chomp.strip
|
74
74
|
output_dir = opts[:output_dir].to_s.scrub.chomp.strip
|
75
75
|
|
76
|
+
browser = browser_obj[:browser]
|
76
77
|
puts "#{@green}Navigating to Page #{target_page}#{@end_of_color}"
|
77
|
-
|
78
|
-
|
78
|
+
browser.goto(target_page)
|
79
|
+
browser.scripts.each do |script|
|
79
80
|
if script.src == ''
|
80
81
|
# Save a copy of the outer_html
|
81
82
|
puts "#{@yellow}Saving OuterHTML of Native '<script>' Element#{@end_of_color}"
|
@@ -87,15 +88,15 @@ begin
|
|
87
88
|
else
|
88
89
|
# Save a copy of the script
|
89
90
|
puts "#{@yellow}Navigating to #{script.src}#{@end_of_color}"
|
90
|
-
|
91
|
-
sha256_hexdigest = OpenSSL::Digest::SHA256.hexdigest(
|
92
|
-
uri = URI.parse(
|
91
|
+
browser.goto(script.src)
|
92
|
+
sha256_hexdigest = OpenSSL::Digest::SHA256.hexdigest(browser.text)
|
93
|
+
uri = URI.parse(browser.url)
|
93
94
|
script_filename = File.basename(uri.path)
|
94
95
|
script_results = "#{output_dir}/#{File.basename(script_filename, '.*')}-#{sha256_hexdigest}#{File.extname(script_filename)}".to_s.scrub.chomp.strip
|
95
96
|
File.open(script_results, 'w') do |f|
|
96
|
-
f.puts
|
97
|
+
f.puts browser.text
|
97
98
|
end
|
98
|
-
|
99
|
+
browser.back
|
99
100
|
end
|
100
101
|
puts "#{@green}Saved #{script_results}#{@end_of_color}\n\n\n"
|
101
102
|
end
|
@@ -112,8 +113,10 @@ begin
|
|
112
113
|
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: browser_type)
|
113
114
|
end
|
114
115
|
|
116
|
+
browser = browser_obj[:browser]
|
117
|
+
|
115
118
|
puts "#{@green}Navigating to Target FQDN: #{target_fqdn}#{@end_of_color}\n\n\n"
|
116
|
-
|
119
|
+
browser.goto(target_fqdn)
|
117
120
|
|
118
121
|
if spider
|
119
122
|
if File.exist?(spider_results)
|
data/lib/pwn/plugins/baresip.rb
CHANGED
@@ -25,9 +25,10 @@ module PWN
|
|
25
25
|
begin
|
26
26
|
conn_attempt += 1
|
27
27
|
|
28
|
-
|
28
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(
|
29
29
|
browser_type: :rest
|
30
|
-
)
|
30
|
+
)
|
31
|
+
rest_client = browser_obj[:browser]::Request
|
31
32
|
|
32
33
|
response = rest_client.execute(
|
33
34
|
method: :get,
|
data/lib/pwn/plugins/beef.rb
CHANGED
@@ -39,7 +39,9 @@ module PWN
|
|
39
39
|
auth_payload[:password] = password
|
40
40
|
|
41
41
|
@@logger.info("Logging into BeEF REST API: #{beef_ip}")
|
42
|
-
|
42
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
43
|
+
rest_client = browser_obj[:browser]::Request
|
44
|
+
|
43
45
|
response = rest_client.execute(
|
44
46
|
method: :post,
|
45
47
|
url: "#{base_beef_api_uri}/admin/login",
|
@@ -85,7 +87,8 @@ module PWN
|
|
85
87
|
base_beef_api_uri = "http://#{beef_ip}:#{beef_port}/api".to_s.scrub
|
86
88
|
api_token = beef_obj[:api_token]
|
87
89
|
|
88
|
-
|
90
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
91
|
+
rest_client = browser_obj[:browser]::Request
|
89
92
|
|
90
93
|
case http_method
|
91
94
|
when :get
|
@@ -37,7 +37,9 @@ module PWN
|
|
37
37
|
# Construct burp_obj
|
38
38
|
burp_obj = {}
|
39
39
|
burp_obj[:pid] = Process.spawn(burp_cmd_string)
|
40
|
-
|
40
|
+
browser_obj1 = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
41
|
+
rest_browser = browser_obj1[:browser]
|
42
|
+
|
41
43
|
# random_mitm_port = PWN::Plugins::Sock.get_random_unused_port
|
42
44
|
# random_bb_port = random_mitm_port
|
43
45
|
# random_bb_port = PWN::Plugins::Sock.get_random_unused_port while random_bb_port == random_mitm_port
|
@@ -46,12 +48,12 @@ module PWN
|
|
46
48
|
burp_obj[:rest_browser] = rest_browser
|
47
49
|
|
48
50
|
# Proxy always listens on localhost...use SSH tunneling if remote access is required
|
49
|
-
|
51
|
+
browser_obj2 = PWN::Plugins::TransparentBrowser.open(
|
50
52
|
browser_type: browser_type,
|
51
53
|
proxy: "http://#{burp_obj[:mitm_proxy]}"
|
52
54
|
)
|
53
55
|
|
54
|
-
burp_obj[:burp_browser] =
|
56
|
+
burp_obj[:burp_browser] = browser_obj2
|
55
57
|
|
56
58
|
# Wait for TCP 8001 to open prior to returning burp_obj
|
57
59
|
loop do
|
@@ -278,10 +280,10 @@ module PWN
|
|
278
280
|
|
279
281
|
public_class_method def self.stop(opts = {})
|
280
282
|
burp_obj = opts[:burp_obj]
|
281
|
-
|
283
|
+
browser_obj = burp_obj[:burp_browser]
|
282
284
|
burp_pid = burp_obj[:pid]
|
283
285
|
|
284
|
-
|
286
|
+
browser_obj = PWN::Plugins::TransparentBrowser.close(browser_obj: browser_obj)
|
285
287
|
Process.kill('TERM', burp_pid)
|
286
288
|
|
287
289
|
burp_obj = nil
|
@@ -67,15 +67,17 @@ module PWN
|
|
67
67
|
api_version = dd_obj[:api_version]
|
68
68
|
base_dd_api_uri = "#{url}/api/#{api_version}".to_s.scrub
|
69
69
|
|
70
|
-
|
70
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
71
71
|
|
72
72
|
if dd_obj[:proxy]
|
73
|
-
|
73
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(
|
74
74
|
browser_type: :rest,
|
75
75
|
proxy: dd_obj[:proxy]
|
76
|
-
)
|
76
|
+
)
|
77
77
|
end
|
78
78
|
|
79
|
+
rest_client = browser_obj[:browser]::Request
|
80
|
+
|
79
81
|
case http_method
|
80
82
|
when :get
|
81
83
|
response = rest_client.execute(
|
data/lib/pwn/plugins/github.rb
CHANGED
@@ -28,7 +28,8 @@ module PWN
|
|
28
28
|
http_body = opts[:http_body].to_s.scrub
|
29
29
|
base_gist_api_uri = 'https://api.github.com'
|
30
30
|
|
31
|
-
|
31
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
32
|
+
rest_client = browser_obj[:browser]::Request
|
32
33
|
|
33
34
|
case http_method
|
34
35
|
when :get
|
@@ -35,7 +35,8 @@ module PWN
|
|
35
35
|
basic_auth_header = "Basic #{base64_encoded_auth}"
|
36
36
|
|
37
37
|
@@logger.info("Logging into HackerOne REST API: #{base_h1_api_uri}")
|
38
|
-
|
38
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
39
|
+
rest_client = browser_obj[:browser]::Request
|
39
40
|
response = rest_client.execute(
|
40
41
|
method: :get,
|
41
42
|
url: base_h1_api_uri,
|
@@ -80,7 +81,8 @@ module PWN
|
|
80
81
|
base_h1_api_uri = 'https://api.hackerone.com/v1/'.to_s.scrub
|
81
82
|
api_token = h1_obj[:api_token]
|
82
83
|
|
83
|
-
|
84
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)::Request
|
85
|
+
rest_client = browser_obj[:browser]::Request
|
84
86
|
|
85
87
|
case http_method
|
86
88
|
when :get
|
@@ -33,7 +33,9 @@ module PWN
|
|
33
33
|
end
|
34
34
|
|
35
35
|
@@logger.info("Logging into IBM Appscan Enterprise Server: #{appscan_ip}")
|
36
|
-
|
36
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
37
|
+
rest_client = browser_obj[:browser]::Request
|
38
|
+
|
37
39
|
response = rest_client.execute(
|
38
40
|
method: :post,
|
39
41
|
url: "#{base_appscan_api_uri}/login",
|
@@ -91,7 +93,8 @@ module PWN
|
|
91
93
|
base_appscan_api_uri = "https://#{appscan_ip}/ase/services".to_s.scrub
|
92
94
|
retry_count = 3
|
93
95
|
|
94
|
-
|
96
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
97
|
+
rest_client = browser_obj[:browser]::Request
|
95
98
|
|
96
99
|
case http_method
|
97
100
|
when :get
|
@@ -694,7 +697,9 @@ module PWN
|
|
694
697
|
|
695
698
|
# First Get request
|
696
699
|
uri = URI.parse(report_link)
|
697
|
-
|
700
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
701
|
+
rb = browser_obj[:browser]
|
702
|
+
|
698
703
|
res = rb.get(report_link, 'Cookie' => appscan_obj[:cookie], :verify_ssl => OpenSSL::SSL::VERIFY_NONE)
|
699
704
|
location = "https://#{uri.host}#{res.headers['location']}"
|
700
705
|
|
@@ -736,9 +741,11 @@ module PWN
|
|
736
741
|
# verify the output path actually exists
|
737
742
|
return @@logger.error("Output directory does not exist: #{output_path}") unless File.directory?(output_path)
|
738
743
|
|
739
|
-
|
740
|
-
|
741
|
-
|
744
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(
|
745
|
+
browser_type: :headless,
|
746
|
+
proxy: 'http://127.0.0.1:8080'
|
747
|
+
)
|
748
|
+
h_browser = browser_obj[:browser]
|
742
749
|
|
743
750
|
# log into the system
|
744
751
|
h_browser.goto login_uri.to_s.to_s.scrub
|
data/lib/pwn/plugins/ip_info.rb
CHANGED
@@ -20,10 +20,12 @@ module PWN
|
|
20
20
|
|
21
21
|
if IPAddress.valid?(ip)
|
22
22
|
if proxy
|
23
|
-
|
23
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest, proxy: proxy)
|
24
24
|
else
|
25
|
-
|
25
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
26
26
|
end
|
27
|
+
rest_client = browser_obj[:browser]
|
28
|
+
|
27
29
|
ip_resp_str = rest_client.get("http://ip-api.com/json/#{ip}?fields=country,countryCode,region,regionName,city,zip,lat,lon,timezone,isp,org,as,reverse,mobile,proxy,query,status,message")
|
28
30
|
ip_resp_json = JSON.parse(
|
29
31
|
ip_resp_str,
|
@@ -36,7 +36,8 @@ module PWN
|
|
36
36
|
|
37
37
|
token = opts[:token]
|
38
38
|
|
39
|
-
|
39
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
40
|
+
rest_client = browser_obj[:browser]::Request
|
40
41
|
|
41
42
|
spinner = TTY::Spinner.new
|
42
43
|
spinner.auto_spin
|
@@ -30,7 +30,8 @@ module PWN
|
|
30
30
|
secret_key = nessus_obj[:secret_key]
|
31
31
|
base_nessus_cloud_api_uri = 'https://cloud.tenable.com'
|
32
32
|
|
33
|
-
|
33
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
34
|
+
rest_client = browser_obj[:browser]::Request
|
34
35
|
|
35
36
|
case http_method
|
36
37
|
when :get
|
data/lib/pwn/plugins/open_ai.rb
CHANGED
@@ -35,7 +35,9 @@ module PWN
|
|
35
35
|
|
36
36
|
content_type = 'application/json; charset=UTF-8'
|
37
37
|
|
38
|
-
|
38
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
39
|
+
rest_client = browser_obj[:browser]::Request
|
40
|
+
|
39
41
|
spinner = TTY::Spinner.new
|
40
42
|
spinner.auto_spin
|
41
43
|
|
@@ -34,7 +34,8 @@ module PWN
|
|
34
34
|
port = zap_obj[:port]
|
35
35
|
base_zap_api_uri = "http://#{host}:#{port}"
|
36
36
|
|
37
|
-
|
37
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
38
|
+
rest_client = browser_obj[:browser]::Request
|
38
39
|
|
39
40
|
case http_method
|
40
41
|
when :get
|
data/lib/pwn/plugins/shodan.rb
CHANGED
@@ -33,7 +33,8 @@ module PWN
|
|
33
33
|
base_shodan_api_uri = 'https://api.shodan.io'
|
34
34
|
api_key = opts[:api_key]
|
35
35
|
|
36
|
-
|
36
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
37
|
+
rest_client = browser_obj[:browser]::Request
|
37
38
|
|
38
39
|
case http_method
|
39
40
|
when :get
|