pwn 0.4.700 → 0.4.702

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG_BETWEEN_TAGS.txt +492 -108
  3. data/README.md +2 -2
  4. data/bin/pwn_burp_suite_pro_active_scan +2 -1
  5. data/bin/pwn_domain_reversewhois +8 -7
  6. data/bin/pwn_owasp_zap_active_scan +3 -2
  7. data/bin/pwn_pastebin_sample_filter +6 -4
  8. data/bin/pwn_web_cache_deception +11 -8
  9. data/bin/pwn_www_checkip +6 -5
  10. data/bin/pwn_www_uri_buster +5 -4
  11. data/bin/pwn_xss_dom_vectors +12 -9
  12. data/lib/pwn/plugins/baresip.rb +3 -2
  13. data/lib/pwn/plugins/beef.rb +5 -2
  14. data/lib/pwn/plugins/burp_suite.rb +7 -5
  15. data/lib/pwn/plugins/defect_dojo.rb +5 -3
  16. data/lib/pwn/plugins/github.rb +2 -1
  17. data/lib/pwn/plugins/hacker_one.rb +4 -2
  18. data/lib/pwn/plugins/ibm_appscan.rb +13 -6
  19. data/lib/pwn/plugins/ip_info.rb +4 -2
  20. data/lib/pwn/plugins/jira_server.rb +2 -1
  21. data/lib/pwn/plugins/nessus_cloud.rb +2 -1
  22. data/lib/pwn/plugins/open_ai.rb +3 -1
  23. data/lib/pwn/plugins/owasp_zap.rb +2 -1
  24. data/lib/pwn/plugins/shodan.rb +2 -1
  25. data/lib/pwn/plugins/transparent_browser.rb +26 -36
  26. data/lib/pwn/plugins/twitter_api.rb +5 -2
  27. data/lib/pwn/plugins/vsphere.rb +1 -2
  28. data/lib/pwn/version.rb +1 -1
  29. data/lib/pwn/www/app_cobalt_io.rb +19 -13
  30. data/lib/pwn/www/bing.rb +9 -6
  31. data/lib/pwn/www/bug_crowd.rb +19 -13
  32. data/lib/pwn/www/checkip.rb +7 -5
  33. data/lib/pwn/www/coinbase_pro.rb +18 -12
  34. data/lib/pwn/www/duckduckgo.rb +15 -8
  35. data/lib/pwn/www/facebook.rb +16 -10
  36. data/lib/pwn/www/google.rb +12 -8
  37. data/lib/pwn/www/hacker_one.rb +16 -10
  38. data/lib/pwn/www/linkedin.rb +16 -10
  39. data/lib/pwn/www/pandora.rb +16 -10
  40. data/lib/pwn/www/pastebin.rb +9 -5
  41. data/lib/pwn/www/paypal.rb +36 -28
  42. data/lib/pwn/www/synack.rb +19 -13
  43. data/lib/pwn/www/torch.rb +12 -7
  44. data/lib/pwn/www/trading_view.rb +19 -13
  45. data/lib/pwn/www/twitter.rb +20 -12
  46. data/lib/pwn/www/uber.rb +16 -10
  47. data/lib/pwn/www/upwork.rb +16 -10
  48. data/lib/pwn/www/youtube.rb +9 -6
  49. metadata +2 -6
  50. data/bin/pwn_arachni +0 -157
  51. 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, PhantomJS, IE, REST Client,
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 || :tor',
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] == :tor
48
- tor_obj = PWN::Plugins::Tor.start if opts[:proxy] == :tor
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
- this_browser = Watir::Browser.new(driver)
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
- this_browser = Watir::Browser.new(driver)
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
- this_browser = Watir::Browser.new(driver)
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
- this_browser = Watir::Browser.new(driver)
218
+ browser_obj[:browser] = Watir::Browser.new(driver)
228
219
 
229
220
  when :rest
230
- this_browser = RestClient
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
- this_browser.proxy = proxy
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
- this_browser = Faye::WebSocket::Client.new(
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
- this_browser = Faye::WebSocket::Client.new('')
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
- this_browser.tor_obj = tor_obj if tor_obj
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
- this_browser_obj = opts[:browser_obj]
266
+ browser_obj = opts[:browser_obj]
277
267
 
278
- this_browser_obj.links.each do |link|
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
- this_browser_obj
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
- this_browser_obj = opts[:browser_obj]
306
+ browser_obj = opts[:browser_obj]
317
307
 
318
- if this_browser_obj.respond_to?('tor_obj')
319
- tor_obj = this_browser_obj.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 this_browser_obj.to_s.include?('RestClient')
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 || :tor',
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
- rest_client = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)::Request
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
- rest_client = PWN::Plugins::TransparentBrowser.open(browser_type: :rest)::Request
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
@@ -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 using
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.4.700'
4
+ VERSION = '0.4.702'
5
5
  end
@@ -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 || :tor'
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.goto('https://app.cobalt.io')
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
- browser_obj.goto('https://app.cobalt.io/users/sign_in')
48
+ browser.goto('https://app.cobalt.io/users/sign_in')
46
49
 
47
50
  # id: 'user_email' doesn't work
48
- browser_obj.text_field(index: 9).wait_until(&:present?).set(username)
51
+ browser.text_field(index: 9).wait_until(&:present?).set(username)
49
52
  # id: 'user_password' doesn't work
50
- browser_obj.text_field(index: 10).wait_until(&:present?).set(password)
53
+ browser.text_field(index: 10).wait_until(&:present?).set(password)
51
54
  # name: 'commit' doesn't work
52
- browser_obj.button(index: 6).click! # no name or id in button element
55
+ browser.button(index: 6).click! # no name or id in button element
53
56
 
54
57
  if mfa
55
- until browser_obj.url == 'https://app.cobalt.io/dashboard'
56
- browser_obj.text_field(id: 'code').wait_until(&:present?).set(PWN::Plugins::AuthenticationHelper.mfa(prompt: 'enter mfa token'))
57
- browser_obj.button(name: 'commit').click!
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
- browser_obj.li(class: 'user-dropdown').wait_until(&:present?).click!
76
- browser_obj.link(index: 10).wait_until(&:present?).click!
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 || :tor'
116
+ proxy: 'optional - scheme://proxy_host:port || tor'
112
117
  )
113
- puts browser_obj.public_methods
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 || :tor'
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.goto('https://www.bing.com')
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.text_field(name: 'q').wait_until(&:present?).set(q)
34
- browser_obj.button(id: 'sb_form_go').click!
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 || :tor'
71
+ proxy: 'optional scheme://proxy_host:port || tor'
70
72
  )
71
- puts browser_obj.public_methods
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',
@@ -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 || :tor'
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.goto('https://bugcrowd.com')
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
- browser_obj.goto('https://bugcrowd.com/user/sign_in')
48
+ browser.goto('https://bugcrowd.com/user/sign_in')
46
49
 
47
- browser_obj.text_field(id: 'user_email').wait_until(&:present?).set(username)
48
- browser_obj.text_field(id: 'user_password').wait_until(&:present?).set(password)
49
- browser_obj.button(name: 'button').click!
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 browser_obj.url == 'https://bugcrowd.com/programs'
53
- browser_obj.text_field(name: 'otp_attempt').wait_until(&:present?).set(PWN::Plugins::AuthenticationHelper.mfa(prompt: 'enter mfa token'))
54
- browser_obj.button(name: 'commit').click!
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
- browser_obj.li(class: 'dropdown-hover').wait_until(&:present?).hover
73
- browser_obj.link(class: 'signout_link').wait_until(&:present?).click!
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 || :tor'
113
+ proxy: 'optional - scheme://proxy_host:port || tor'
109
114
  )
110
- puts browser_obj.public_methods
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',
@@ -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 || :tor'
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.goto('http://checkip.amazonaws.com')
20
- public_ip_address = Nokogiri::HTML.parse(browser_obj.html).xpath('//pre').text.chomp
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 || :tor'
57
+ proxy: 'optional - scheme://proxy_host:port || tor'
57
58
  )
58
- puts browser_obj.public_methods
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',
@@ -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 || :tor'
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.goto('https://pro.coinbase.com')
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
- browser_obj.goto('https://pro.coinbase.com')
48
+ browser.goto('https://pro.coinbase.com')
46
49
 
47
- browser_obj.span(text: 'Sign in').wait_until(&:present?).click
48
- browser_obj.text_field(name: 'email').wait_until(&:present?).set(username)
49
- browser_obj.text_field(name: 'password').wait_until(&:present?).set(password)
50
- browser_obj.button(text: 'Sign In').click!
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 browser_obj.url.include?('https://pro.coinbase.com')
54
- browser_obj.text_field(name: 'token').wait_until(&:present?).set(PWN::Plugins::AuthenticationHelper.mfa(prompt: 'enter mfa token'))
55
- browser_obj.button(text: 'Verify').click!
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
- browser_obj.goto('https://pro.coinbase.com/signout')
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 || :tor'
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(
@@ -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 || :tor'
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.goto('https://duckduckgo.com')
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.text_field(name: 'q').wait_until(&:present?).set(q)
34
- if browser_obj.url == 'https://duckduckgo.com/' || browser_obj.url == 'http://3g2upl4pq6kufc4m.onion/'
35
- browser_obj.button(id: 'search_button_homepage').click!
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
- browser_obj.button(id: 'search_button').click!
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
- browser_obj.goto('http://3g2upl4pq6kufc4m.onion')
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 || :tor'
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(
@@ -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 || :tor'
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.goto('https://www.facebook.com')
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
- browser_obj.goto('https://www.facebook.com/login.php')
46
+ browser.goto('https://www.facebook.com/login.php')
44
47
 
45
- browser_obj.text_field(id: 'email').wait_until(&:present?).set(username)
46
- browser_obj.text_field(id: 'pass').wait_until(&:present?).set(password)
47
- browser_obj.button(id: 'loginbutton').click!
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
- browser_obj.div(id: 'logoutMenu').wait_until(&:present?).click!
62
- browser_obj.span(text: 'Log Out', class: '_54nh').click!
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 || :tor'
102
+ proxy: 'optional - scheme://proxy_host:port || tor'
98
103
  )
99
- puts browser_obj.public_methods
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',