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
@@ -9,20 +9,9 @@ require 'openssl'
|
|
9
9
|
require 'em/pure_ruby'
|
10
10
|
require 'faye/websocket'
|
11
11
|
|
12
|
-
# Monkey Patch Watir
|
13
|
-
module Watir
|
14
|
-
# Browser Class to allow tor_obj from PWN::Plugins::Tor.start
|
15
|
-
# to populate attr_accessor :tor_obj
|
16
|
-
# This was done this way soley to maintain backwards compatibility
|
17
|
-
# with how browser_obj is returned.
|
18
|
-
class Browser
|
19
|
-
attr_accessor :tor_obj
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
12
|
module PWN
|
24
13
|
module Plugins
|
25
|
-
# This plugin rocks. Chrome, Firefox,
|
14
|
+
# This plugin rocks. Chrome, Firefox, headless, REST Client,
|
26
15
|
# all from the comfort of one plugin. Proxy support (e.g. Burp
|
27
16
|
# Suite Professional) is completely available for all browsers
|
28
17
|
# except for limited functionality within IE (IE has interesting
|
@@ -34,19 +23,21 @@ module PWN
|
|
34
23
|
# Supported Method Parameters::
|
35
24
|
# browser_obj1 = PWN::Plugins::TransparentBrowser.open(
|
36
25
|
# browser_type: :firefox|:chrome|:headless|:rest|:websocket,
|
37
|
-
# proxy: 'optional - scheme://proxy_host:port ||
|
26
|
+
# proxy: 'optional - scheme://proxy_host:port || tor',
|
38
27
|
# with_devtools: 'optional - boolean (defaults to false)'
|
39
28
|
# )
|
40
29
|
|
41
30
|
public_class_method def self.open(opts = {})
|
42
|
-
this_browser = nil
|
43
31
|
browser_type = opts[:browser_type]
|
44
32
|
proxy = opts[:proxy].to_s unless opts[:proxy].nil?
|
45
33
|
|
34
|
+
browser_obj = {}
|
35
|
+
|
46
36
|
tor_obj = nil
|
47
|
-
if opts[:proxy] ==
|
48
|
-
tor_obj = PWN::Plugins::Tor.start
|
37
|
+
if opts[:proxy] == 'tor'
|
38
|
+
tor_obj = PWN::Plugins::Tor.start
|
49
39
|
proxy = "socks5://#{tor_obj[:ip]}:#{tor_obj[:port]}"
|
40
|
+
browser_obj[:tor_obj] = tor_obj
|
50
41
|
end
|
51
42
|
|
52
43
|
opts[:with_devtools] ? (with_devtools = true) : (with_devtools = false)
|
@@ -114,7 +105,7 @@ module PWN
|
|
114
105
|
options.profile = this_profile
|
115
106
|
# driver = Selenium::WebDriver.for(:firefox, capabilities: options)
|
116
107
|
driver = Selenium::WebDriver.for(:firefox, options: options)
|
117
|
-
|
108
|
+
browser_obj[:browser] = Watir::Browser.new(driver)
|
118
109
|
|
119
110
|
when :chrome
|
120
111
|
this_profile = Selenium::WebDriver::Chrome::Profile.new
|
@@ -143,7 +134,7 @@ module PWN
|
|
143
134
|
options.profile = this_profile
|
144
135
|
# driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
145
136
|
driver = Selenium::WebDriver.for(:chrome, options: options)
|
146
|
-
|
137
|
+
browser_obj[:browser] = Watir::Browser.new(driver)
|
147
138
|
|
148
139
|
when :headless, :headless_firefox
|
149
140
|
this_profile = Selenium::WebDriver::Firefox::Profile.new
|
@@ -200,7 +191,7 @@ module PWN
|
|
200
191
|
options = Selenium::WebDriver::Firefox::Options.new(args: ['-headless'], accept_insecure_certs: true)
|
201
192
|
options.profile = this_profile
|
202
193
|
driver = Selenium::WebDriver.for(:firefox, options: options)
|
203
|
-
|
194
|
+
browser_obj[:browser] = Watir::Browser.new(driver)
|
204
195
|
|
205
196
|
when :headless_chrome
|
206
197
|
this_profile = Selenium::WebDriver::Chrome::Profile.new
|
@@ -224,16 +215,16 @@ module PWN
|
|
224
215
|
|
225
216
|
options.profile = this_profile
|
226
217
|
driver = Selenium::WebDriver.for(:chrome, options: options)
|
227
|
-
|
218
|
+
browser_obj[:browser] = Watir::Browser.new(driver)
|
228
219
|
|
229
220
|
when :rest
|
230
|
-
|
221
|
+
browser_obj[:browser] = RestClient
|
231
222
|
if proxy
|
232
223
|
if tor_obj
|
233
224
|
TCPSocket.socks_server = tor_obj[:ip]
|
234
225
|
TCPSocket.socks_port = tor_obj[:port]
|
235
226
|
else
|
236
|
-
|
227
|
+
browser_obj[:browser].proxy = proxy
|
237
228
|
end
|
238
229
|
end
|
239
230
|
|
@@ -245,7 +236,7 @@ module PWN
|
|
245
236
|
end
|
246
237
|
proxy_opts = { origin: proxy }
|
247
238
|
tls_opts = { verify_peer: false }
|
248
|
-
|
239
|
+
browser_obj[:browser] = Faye::WebSocket::Client.new(
|
249
240
|
'',
|
250
241
|
[],
|
251
242
|
{
|
@@ -254,15 +245,14 @@ module PWN
|
|
254
245
|
}
|
255
246
|
)
|
256
247
|
else
|
257
|
-
|
248
|
+
browser_obj[:browser] = Faye::WebSocket::Client.new('')
|
258
249
|
end
|
259
250
|
else
|
260
251
|
puts 'Error: browser_type only supports :firefox, :chrome, :headless, :rest, or :websocket'
|
261
252
|
return nil
|
262
253
|
end
|
263
254
|
|
264
|
-
|
265
|
-
this_browser
|
255
|
+
browser_obj
|
266
256
|
rescue StandardError => e
|
267
257
|
raise e
|
268
258
|
end
|
@@ -273,13 +263,13 @@ module PWN
|
|
273
263
|
# )
|
274
264
|
|
275
265
|
public_class_method def self.linkout(opts = {})
|
276
|
-
|
266
|
+
browser_obj = opts[:browser_obj]
|
277
267
|
|
278
|
-
|
268
|
+
browser_obj[:browser].links.each do |link|
|
279
269
|
@@logger.info("#{link.text} => #{link.href}\n\n\n") unless link.text == ''
|
280
270
|
end
|
281
271
|
|
282
|
-
|
272
|
+
browser_obj
|
283
273
|
rescue StandardError => e
|
284
274
|
raise e
|
285
275
|
end
|
@@ -313,16 +303,16 @@ module PWN
|
|
313
303
|
# )
|
314
304
|
|
315
305
|
public_class_method def self.close(opts = {})
|
316
|
-
|
306
|
+
browser_obj = opts[:browser_obj]
|
317
307
|
|
318
|
-
|
319
|
-
tor_obj =
|
320
|
-
PWN::Plugins::Tor.stop(tor_obj: tor_obj)
|
308
|
+
unless browser_obj[:tor_obj].nil?
|
309
|
+
tor_obj = browser_obj[:tor_obj]
|
310
|
+
PWN::Plugins::Tor.stop(tor_obj: browser_obj[:tor_obj])
|
321
311
|
end
|
322
312
|
|
323
|
-
unless
|
313
|
+
unless browser_obj[:browser].to_s.include?('RestClient')
|
324
314
|
# Close the browser unless this_browser_obj.nil? (thus the &)
|
325
|
-
this_browser_obj&.close
|
315
|
+
this_browser_obj[:browser]&.close
|
326
316
|
end
|
327
317
|
nil
|
328
318
|
rescue StandardError => e
|
@@ -343,7 +333,7 @@ module PWN
|
|
343
333
|
puts "USAGE:
|
344
334
|
browser_obj1 = #{self}.open(
|
345
335
|
browser_type: :firefox|:chrome|:headless_chrome|:headless_firefox|:rest|:websocket,
|
346
|
-
proxy: 'optional scheme://proxy_host:port ||
|
336
|
+
proxy: 'optional scheme://proxy_host:port || tor',
|
347
337
|
with_devtools: 'optional - boolean (defaults to false)'
|
348
338
|
)
|
349
339
|
puts browser_obj1.public_methods
|
@@ -32,7 +32,9 @@ module PWN
|
|
32
32
|
http_headers[:authorization] = "Basic #{authz_str}"
|
33
33
|
|
34
34
|
@@logger.info("Logging into TwitterAPI REST API: #{base_api_uri}")
|
35
|
-
|
35
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
36
|
+
rest_client = browser_obj[:browser]::Request
|
37
|
+
|
36
38
|
response = rest_client.execute(
|
37
39
|
method: :post,
|
38
40
|
url: "#{base_api_uri}/oauth2/token",
|
@@ -69,7 +71,8 @@ module PWN
|
|
69
71
|
port = bearer_token[:port]
|
70
72
|
base_zap_api_uri = "http://#{host}:#{port}"
|
71
73
|
|
72
|
-
|
74
|
+
browser_obj = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)
|
75
|
+
rest_client = browser_obj[:browser]::Request
|
73
76
|
|
74
77
|
case http_method
|
75
78
|
when :get
|
data/lib/pwn/plugins/vsphere.rb
CHANGED
@@ -4,8 +4,7 @@ require 'rbvmomi'
|
|
4
4
|
|
5
5
|
module PWN
|
6
6
|
module Plugins
|
7
|
-
# This plugin is used for interacting w/ VMware ESXI's REST API
|
8
|
-
# the 'rest' browser type of PWN::Plugins::TransparentBrowser.
|
7
|
+
# This plugin is used for interacting w/ VMware ESXI's REST API
|
9
8
|
module Vsphere
|
10
9
|
@@logger = PWN::Plugins::PWNLogger.create
|
11
10
|
|
data/lib/pwn/version.rb
CHANGED
@@ -9,13 +9,14 @@ module PWN
|
|
9
9
|
# Supported Method Parameters::
|
10
10
|
# browser_obj = PWN::WWW::AppCobaltIO.open(
|
11
11
|
# browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
|
12
|
-
# proxy: 'optional - scheme://proxy_host:port ||
|
12
|
+
# proxy: 'optional - scheme://proxy_host:port || tor'
|
13
13
|
# )
|
14
14
|
|
15
15
|
public_class_method def self.open(opts = {})
|
16
16
|
browser_obj = PWN::Plugins::TransparentBrowser.open(opts)
|
17
17
|
|
18
|
-
browser_obj
|
18
|
+
browser = browser_obj[:browser]
|
19
|
+
browser.goto('https://app.cobalt.io')
|
19
20
|
|
20
21
|
browser_obj
|
21
22
|
rescue StandardError => e
|
@@ -35,6 +36,8 @@ module PWN
|
|
35
36
|
username = opts[:username].to_s.scrub.strip.chomp
|
36
37
|
password = opts[:password]
|
37
38
|
|
39
|
+
browser = browser_obj[:browser]
|
40
|
+
|
38
41
|
if password.nil?
|
39
42
|
password = PWN::Plugins::AuthenticationHelper.mask_password
|
40
43
|
else
|
@@ -42,19 +45,19 @@ module PWN
|
|
42
45
|
end
|
43
46
|
mfa = opts[:mfa]
|
44
47
|
|
45
|
-
|
48
|
+
browser.goto('https://app.cobalt.io/users/sign_in')
|
46
49
|
|
47
50
|
# id: 'user_email' doesn't work
|
48
|
-
|
51
|
+
browser.text_field(index: 9).wait_until(&:present?).set(username)
|
49
52
|
# id: 'user_password' doesn't work
|
50
|
-
|
53
|
+
browser.text_field(index: 10).wait_until(&:present?).set(password)
|
51
54
|
# name: 'commit' doesn't work
|
52
|
-
|
55
|
+
browser.button(index: 6).click! # no name or id in button element
|
53
56
|
|
54
57
|
if mfa
|
55
|
-
until
|
56
|
-
|
57
|
-
|
58
|
+
until browser.url == 'https://app.cobalt.io/dashboard'
|
59
|
+
browser.text_field(id: 'code').wait_until(&:present?).set(PWN::Plugins::AuthenticationHelper.mfa(prompt: 'enter mfa token'))
|
60
|
+
browser.button(name: 'commit').click!
|
58
61
|
sleep 3
|
59
62
|
end
|
60
63
|
print "\n"
|
@@ -72,8 +75,10 @@ module PWN
|
|
72
75
|
|
73
76
|
public_class_method def self.logout(opts = {})
|
74
77
|
browser_obj = opts[:browser_obj]
|
75
|
-
|
76
|
-
browser_obj
|
78
|
+
|
79
|
+
browser = browser_obj[:browser]
|
80
|
+
browser.li(class: 'user-dropdown').wait_until(&:present?).click!
|
81
|
+
browser.link(index: 10).wait_until(&:present?).click!
|
77
82
|
|
78
83
|
browser_obj
|
79
84
|
rescue StandardError => e
|
@@ -108,9 +113,10 @@ module PWN
|
|
108
113
|
puts "USAGE:
|
109
114
|
browser_obj = #{self}.open(
|
110
115
|
browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
|
111
|
-
proxy: 'optional - scheme://proxy_host:port ||
|
116
|
+
proxy: 'optional - scheme://proxy_host:port || tor'
|
112
117
|
)
|
113
|
-
|
118
|
+
browser = browser_obj[:browser]
|
119
|
+
puts browser.public_methods
|
114
120
|
|
115
121
|
browser_obj = #{self}.login(
|
116
122
|
browser_obj: 'required - browser_obj returned from #open method',
|
data/lib/pwn/www/bing.rb
CHANGED
@@ -7,13 +7,14 @@ module PWN
|
|
7
7
|
# Supported Method Parameters::
|
8
8
|
# browser_obj = PWN::WWW::Bing.open(
|
9
9
|
# browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
|
10
|
-
# proxy: 'optional scheme://proxy_host:port ||
|
10
|
+
# proxy: 'optional scheme://proxy_host:port || tor'
|
11
11
|
# )
|
12
12
|
|
13
13
|
public_class_method def self.open(opts = {})
|
14
14
|
browser_obj = PWN::Plugins::TransparentBrowser.open(opts)
|
15
15
|
|
16
|
-
browser_obj
|
16
|
+
browser = browser_obj[:browser]
|
17
|
+
browser.goto('https://www.bing.com')
|
17
18
|
|
18
19
|
browser_obj
|
19
20
|
rescue StandardError => e
|
@@ -30,8 +31,9 @@ module PWN
|
|
30
31
|
browser_obj = opts[:browser_obj]
|
31
32
|
q = opts[:q].to_s
|
32
33
|
|
33
|
-
browser_obj
|
34
|
-
|
34
|
+
browser = browser_obj[:browser]
|
35
|
+
browser.text_field(name: 'q').wait_until(&:present?).set(q)
|
36
|
+
browser.button(id: 'sb_form_go').click!
|
35
37
|
|
36
38
|
browser_obj
|
37
39
|
rescue StandardError => e
|
@@ -66,9 +68,10 @@ module PWN
|
|
66
68
|
puts "USAGE:
|
67
69
|
browser_obj = #{self}.open(
|
68
70
|
browser_type: 'optional :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
|
69
|
-
proxy: 'optional scheme://proxy_host:port ||
|
71
|
+
proxy: 'optional scheme://proxy_host:port || tor'
|
70
72
|
)
|
71
|
-
|
73
|
+
browser = browser_obj[:browser]
|
74
|
+
puts browser.public_methods
|
72
75
|
|
73
76
|
browser_obj = #{self}.search(
|
74
77
|
browser_obj: 'required - browser_obj returned from #open method',
|
data/lib/pwn/www/bug_crowd.rb
CHANGED
@@ -9,13 +9,14 @@ module PWN
|
|
9
9
|
# Supported Method Parameters::
|
10
10
|
# browser_obj = PWN::WWW::BugCrowd.open(
|
11
11
|
# browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
|
12
|
-
# proxy: 'optional - scheme://proxy_host:port ||
|
12
|
+
# proxy: 'optional - scheme://proxy_host:port || tor'
|
13
13
|
# )
|
14
14
|
|
15
15
|
public_class_method def self.open(opts = {})
|
16
16
|
browser_obj = PWN::Plugins::TransparentBrowser.open(opts)
|
17
17
|
|
18
|
-
browser_obj
|
18
|
+
browser = browser_obj[:browser]
|
19
|
+
browser.goto('https://bugcrowd.com')
|
19
20
|
|
20
21
|
browser_obj
|
21
22
|
rescue StandardError => e
|
@@ -35,6 +36,8 @@ module PWN
|
|
35
36
|
username = opts[:username].to_s.scrub.strip.chomp
|
36
37
|
password = opts[:password]
|
37
38
|
|
39
|
+
browser = browser_obj[:browser]
|
40
|
+
|
38
41
|
if password.nil?
|
39
42
|
password = PWN::Plugins::AuthenticationHelper.mask_password
|
40
43
|
else
|
@@ -42,16 +45,16 @@ module PWN
|
|
42
45
|
end
|
43
46
|
mfa = opts[:mfa]
|
44
47
|
|
45
|
-
|
48
|
+
browser.goto('https://bugcrowd.com/user/sign_in')
|
46
49
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
+
browser.text_field(id: 'user_email').wait_until(&:present?).set(username)
|
51
|
+
browser.text_field(id: 'user_password').wait_until(&:present?).set(password)
|
52
|
+
browser.button(name: 'button').click!
|
50
53
|
|
51
54
|
if mfa
|
52
|
-
until
|
53
|
-
|
54
|
-
|
55
|
+
until browser.url == 'https://bugcrowd.com/programs'
|
56
|
+
browser.text_field(name: 'otp_attempt').wait_until(&:present?).set(PWN::Plugins::AuthenticationHelper.mfa(prompt: 'enter mfa token'))
|
57
|
+
browser.button(name: 'commit').click!
|
55
58
|
sleep 3
|
56
59
|
end
|
57
60
|
print "\n"
|
@@ -69,8 +72,10 @@ module PWN
|
|
69
72
|
|
70
73
|
public_class_method def self.logout(opts = {})
|
71
74
|
browser_obj = opts[:browser_obj]
|
72
|
-
|
73
|
-
browser_obj
|
75
|
+
|
76
|
+
browser = browser_obj[:browser]
|
77
|
+
browser.li(class: 'dropdown-hover').wait_until(&:present?).hover
|
78
|
+
browser.link(class: 'signout_link').wait_until(&:present?).click!
|
74
79
|
|
75
80
|
browser_obj
|
76
81
|
rescue StandardError => e
|
@@ -105,9 +110,10 @@ module PWN
|
|
105
110
|
puts "USAGE:
|
106
111
|
browser_obj = #{self}.open(
|
107
112
|
browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
|
108
|
-
proxy: 'optional - scheme://proxy_host:port ||
|
113
|
+
proxy: 'optional - scheme://proxy_host:port || tor'
|
109
114
|
)
|
110
|
-
|
115
|
+
browser = browser_obj[:browser]
|
116
|
+
puts browser.public_methods
|
111
117
|
|
112
118
|
browser_obj = #{self}.login(
|
113
119
|
browser_obj: 'required - browser_obj returned from #open method',
|
data/lib/pwn/www/checkip.rb
CHANGED
@@ -10,14 +10,15 @@ module PWN
|
|
10
10
|
# Supported Method Parameters::
|
11
11
|
# browser_obj = PWN::WWW::Checkip.open(
|
12
12
|
# browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
|
13
|
-
# proxy: 'optional - scheme://proxy_host:port ||
|
13
|
+
# proxy: 'optional - scheme://proxy_host:port || tor'
|
14
14
|
# )
|
15
15
|
|
16
16
|
public_class_method def self.open(opts = {})
|
17
17
|
browser_obj = PWN::Plugins::TransparentBrowser.open(opts)
|
18
18
|
|
19
|
-
browser_obj
|
20
|
-
|
19
|
+
browser = browser_obj[:browser]
|
20
|
+
browser.goto('http://checkip.amazonaws.com')
|
21
|
+
public_ip_address = Nokogiri::HTML.parse(browser.html).xpath('//pre').text.chomp
|
21
22
|
puts "PUBLIC IP: #{public_ip_address}"
|
22
23
|
|
23
24
|
browser_obj
|
@@ -53,9 +54,10 @@ module PWN
|
|
53
54
|
puts "USAGE:
|
54
55
|
browser_obj = #{self}.open(
|
55
56
|
browser_type: 'optional :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
|
56
|
-
proxy: 'optional - scheme://proxy_host:port ||
|
57
|
+
proxy: 'optional - scheme://proxy_host:port || tor'
|
57
58
|
)
|
58
|
-
|
59
|
+
browser = browser_obj[:browser]
|
60
|
+
puts browser.public_methods
|
59
61
|
|
60
62
|
browser_obj = #{self}.close(
|
61
63
|
browser_obj: 'required - browser_obj returned from #open method',
|
data/lib/pwn/www/coinbase_pro.rb
CHANGED
@@ -9,13 +9,14 @@ module PWN
|
|
9
9
|
# Supported Method Parameters::
|
10
10
|
# browser_obj = PWN::WWW::CoinbasePro.open(
|
11
11
|
# browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
|
12
|
-
# proxy: 'optional - scheme://proxy_host:port ||
|
12
|
+
# proxy: 'optional - scheme://proxy_host:port || tor'
|
13
13
|
# )
|
14
14
|
|
15
15
|
public_class_method def self.open(opts = {})
|
16
16
|
browser_obj = PWN::Plugins::TransparentBrowser.open(opts)
|
17
17
|
|
18
|
-
browser_obj
|
18
|
+
browser = browser_obj[:browser]
|
19
|
+
browser.goto('https://pro.coinbase.com')
|
19
20
|
|
20
21
|
browser_obj
|
21
22
|
rescue StandardError => e
|
@@ -35,6 +36,8 @@ module PWN
|
|
35
36
|
username = opts[:username].to_s.scrub.strip.chomp
|
36
37
|
password = opts[:password]
|
37
38
|
|
39
|
+
browser = browser_obj[:browser]
|
40
|
+
|
38
41
|
if password.nil?
|
39
42
|
password = PWN::Plugins::AuthenticationHelper.mask_password
|
40
43
|
else
|
@@ -42,17 +45,17 @@ module PWN
|
|
42
45
|
end
|
43
46
|
mfa = opts[:mfa]
|
44
47
|
|
45
|
-
|
48
|
+
browser.goto('https://pro.coinbase.com')
|
46
49
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
50
|
+
browser.span(text: 'Sign in').wait_until(&:present?).click
|
51
|
+
browser.text_field(name: 'email').wait_until(&:present?).set(username)
|
52
|
+
browser.text_field(name: 'password').wait_until(&:present?).set(password)
|
53
|
+
browser.button(text: 'Sign In').click!
|
51
54
|
|
52
55
|
if mfa
|
53
|
-
until
|
54
|
-
|
55
|
-
|
56
|
+
until browser.url.include?('https://pro.coinbase.com')
|
57
|
+
browser.text_field(name: 'token').wait_until(&:present?).set(PWN::Plugins::AuthenticationHelper.mfa(prompt: 'enter mfa token'))
|
58
|
+
browser.button(text: 'Verify').click!
|
56
59
|
sleep 3
|
57
60
|
end
|
58
61
|
print "\n"
|
@@ -70,7 +73,9 @@ module PWN
|
|
70
73
|
|
71
74
|
public_class_method def self.logout(opts = {})
|
72
75
|
browser_obj = opts[:browser_obj]
|
73
|
-
|
76
|
+
|
77
|
+
browser = browser_obj[:browser]
|
78
|
+
browser.goto('https://pro.coinbase.com/signout')
|
74
79
|
|
75
80
|
browser_obj
|
76
81
|
rescue StandardError => e
|
@@ -105,8 +110,9 @@ module PWN
|
|
105
110
|
puts "USAGE:
|
106
111
|
browser_obj = #{self}.open(
|
107
112
|
browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
|
108
|
-
proxy: 'optional - scheme://proxy_host:port ||
|
113
|
+
proxy: 'optional - scheme://proxy_host:port || tor'
|
109
114
|
)
|
115
|
+
browser = browser_obj[:browser]
|
110
116
|
puts browser_obj.public_methods
|
111
117
|
|
112
118
|
browser_obj = #{self}.login(
|
data/lib/pwn/www/duckduckgo.rb
CHANGED
@@ -7,13 +7,14 @@ module PWN
|
|
7
7
|
# Supported Method Parameters::
|
8
8
|
# browser_obj = PWN::WWW::Duckduckgo.open(
|
9
9
|
# browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
|
10
|
-
# proxy: 'optional - scheme://proxy_host:port ||
|
10
|
+
# proxy: 'optional - scheme://proxy_host:port || tor'
|
11
11
|
# )
|
12
12
|
|
13
13
|
public_class_method def self.open(opts = {})
|
14
14
|
browser_obj = PWN::Plugins::TransparentBrowser.open(opts)
|
15
15
|
|
16
|
-
browser_obj
|
16
|
+
browser = browser_obj[:browser]
|
17
|
+
browser.goto('https://duckduckgo.com')
|
17
18
|
|
18
19
|
browser_obj
|
19
20
|
rescue StandardError => e
|
@@ -30,11 +31,14 @@ module PWN
|
|
30
31
|
browser_obj = opts[:browser_obj]
|
31
32
|
q = opts[:q].to_s
|
32
33
|
|
33
|
-
browser_obj
|
34
|
-
|
35
|
-
|
34
|
+
browser = browser_obj[:browser]
|
35
|
+
browser.text_field(name: 'q').wait_until(&:present?).set(q)
|
36
|
+
if browser.url == 'https://duckduckgo.com/' ||
|
37
|
+
browser.url == 'http://3g2upl4pq6kufc4m.onion/'
|
38
|
+
|
39
|
+
browser.button(id: 'search_button_homepage').click!
|
36
40
|
else
|
37
|
-
|
41
|
+
browser.button(id: 'search_button').click!
|
38
42
|
end
|
39
43
|
|
40
44
|
browser_obj
|
@@ -49,7 +53,9 @@ module PWN
|
|
49
53
|
|
50
54
|
public_class_method def self.onion(opts = {})
|
51
55
|
browser_obj = opts[:browser_obj]
|
52
|
-
|
56
|
+
|
57
|
+
browser = browser_obj[:browser]
|
58
|
+
browser.goto('http://3g2upl4pq6kufc4m.onion')
|
53
59
|
|
54
60
|
browser_obj
|
55
61
|
rescue StandardError => e
|
@@ -84,8 +90,9 @@ module PWN
|
|
84
90
|
puts "USAGE:
|
85
91
|
browser_obj = #{self}.open(
|
86
92
|
browser_type: 'optional :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
|
87
|
-
proxy: 'optional - scheme://proxy_host:port ||
|
93
|
+
proxy: 'optional - scheme://proxy_host:port || tor'
|
88
94
|
)
|
95
|
+
browser = browser_obj[:browser]
|
89
96
|
puts browser_obj.public_methods
|
90
97
|
|
91
98
|
browser_obj = #{self}.search(
|
data/lib/pwn/www/facebook.rb
CHANGED
@@ -9,13 +9,14 @@ module PWN
|
|
9
9
|
# Supported Method Parameters::
|
10
10
|
# browser_obj = PWN::WWW::Facebook.open(
|
11
11
|
# browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
|
12
|
-
# proxy: 'optional - scheme://proxy_host:port ||
|
12
|
+
# proxy: 'optional - scheme://proxy_host:port || tor'
|
13
13
|
# )
|
14
14
|
|
15
15
|
public_class_method def self.open(opts = {})
|
16
16
|
browser_obj = PWN::Plugins::TransparentBrowser.open(opts)
|
17
17
|
|
18
|
-
browser_obj
|
18
|
+
browser = browser_obj[:browser]
|
19
|
+
browser.goto('https://www.facebook.com')
|
19
20
|
|
20
21
|
browser_obj
|
21
22
|
rescue StandardError => e
|
@@ -34,17 +35,19 @@ module PWN
|
|
34
35
|
username = opts[:username].to_s.scrub.strip.chomp
|
35
36
|
password = opts[:password]
|
36
37
|
|
38
|
+
browser = browser_obj[:browser]
|
39
|
+
|
37
40
|
if password.nil?
|
38
41
|
password = PWN::Plugins::AuthenticationHelper.mask_password
|
39
42
|
else
|
40
43
|
password = opts[:password].to_s.scrub.strip.chomp
|
41
44
|
end
|
42
45
|
|
43
|
-
|
46
|
+
browser.goto('https://www.facebook.com/login.php')
|
44
47
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
+
browser.text_field(id: 'email').wait_until(&:present?).set(username)
|
49
|
+
browser.text_field(id: 'pass').wait_until(&:present?).set(password)
|
50
|
+
browser.button(id: 'loginbutton').click!
|
48
51
|
|
49
52
|
browser_obj
|
50
53
|
rescue StandardError => e
|
@@ -58,8 +61,10 @@ module PWN
|
|
58
61
|
|
59
62
|
public_class_method def self.logout(opts = {})
|
60
63
|
browser_obj = opts[:browser_obj]
|
61
|
-
|
62
|
-
|
64
|
+
|
65
|
+
browser = browser_obj[:browser]
|
66
|
+
browser.div(id: 'logoutMenu').wait_until(&:present?).click!
|
67
|
+
browser.span(text: 'Log Out', class: '_54nh').click!
|
63
68
|
|
64
69
|
browser_obj
|
65
70
|
rescue StandardError => e
|
@@ -94,9 +99,10 @@ module PWN
|
|
94
99
|
puts "USAGE:
|
95
100
|
browser_obj = #{self}.open(
|
96
101
|
browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
|
97
|
-
proxy: 'optional - scheme://proxy_host:port ||
|
102
|
+
proxy: 'optional - scheme://proxy_host:port || tor'
|
98
103
|
)
|
99
|
-
|
104
|
+
browser = browser_obj[:browser]
|
105
|
+
puts browser.public_methods
|
100
106
|
|
101
107
|
browser_obj = #{self}.login(
|
102
108
|
browser_obj: 'required - browser_obj returned from #open method',
|