pwn 0.4.701 → 0.4.702

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/bin/pwn_burp_suite_pro_active_scan +2 -1
  4. data/bin/pwn_domain_reversewhois +7 -6
  5. data/bin/pwn_owasp_zap_active_scan +3 -2
  6. data/bin/pwn_pastebin_sample_filter +5 -3
  7. data/bin/pwn_web_cache_deception +10 -7
  8. data/bin/pwn_www_checkip +5 -4
  9. data/bin/pwn_www_uri_buster +5 -4
  10. data/bin/pwn_xss_dom_vectors +11 -8
  11. data/lib/pwn/plugins/baresip.rb +3 -2
  12. data/lib/pwn/plugins/beef.rb +5 -2
  13. data/lib/pwn/plugins/burp_suite.rb +7 -5
  14. data/lib/pwn/plugins/defect_dojo.rb +5 -3
  15. data/lib/pwn/plugins/github.rb +2 -1
  16. data/lib/pwn/plugins/hacker_one.rb +4 -2
  17. data/lib/pwn/plugins/ibm_appscan.rb +13 -6
  18. data/lib/pwn/plugins/ip_info.rb +4 -2
  19. data/lib/pwn/plugins/jira_server.rb +2 -1
  20. data/lib/pwn/plugins/nessus_cloud.rb +2 -1
  21. data/lib/pwn/plugins/open_ai.rb +3 -1
  22. data/lib/pwn/plugins/owasp_zap.rb +2 -1
  23. data/lib/pwn/plugins/shodan.rb +2 -1
  24. data/lib/pwn/plugins/transparent_browser.rb +22 -32
  25. data/lib/pwn/plugins/twitter_api.rb +5 -2
  26. data/lib/pwn/plugins/vsphere.rb +1 -2
  27. data/lib/pwn/version.rb +1 -1
  28. data/lib/pwn/www/app_cobalt_io.rb +17 -11
  29. data/lib/pwn/www/bing.rb +7 -4
  30. data/lib/pwn/www/bug_crowd.rb +17 -11
  31. data/lib/pwn/www/checkip.rb +5 -3
  32. data/lib/pwn/www/coinbase_pro.rb +16 -10
  33. data/lib/pwn/www/duckduckgo.rb +13 -6
  34. data/lib/pwn/www/facebook.rb +14 -8
  35. data/lib/pwn/www/google.rb +10 -6
  36. data/lib/pwn/www/hacker_one.rb +14 -8
  37. data/lib/pwn/www/linkedin.rb +14 -8
  38. data/lib/pwn/www/pandora.rb +14 -8
  39. data/lib/pwn/www/pastebin.rb +7 -3
  40. data/lib/pwn/www/paypal.rb +34 -26
  41. data/lib/pwn/www/synack.rb +17 -11
  42. data/lib/pwn/www/torch.rb +10 -5
  43. data/lib/pwn/www/trading_view.rb +17 -11
  44. data/lib/pwn/www/twitter.rb +18 -10
  45. data/lib/pwn/www/uber.rb +14 -8
  46. data/lib/pwn/www/upwork.rb +14 -8
  47. data/lib/pwn/www/youtube.rb +7 -4
  48. metadata +2 -6
  49. data/bin/pwn_arachni +0 -157
  50. data/bin/pwn_arachni_rest +0 -174
@@ -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.701'
4
+ VERSION = '0.4.702'
5
5
  end
@@ -15,7 +15,8 @@ module PWN
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
@@ -110,7 +115,8 @@ module PWN
110
115
  browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
111
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
@@ -13,7 +13,8 @@ module PWN
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
@@ -68,7 +70,8 @@ module PWN
68
70
  browser_type: 'optional :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
69
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',
@@ -15,7 +15,8 @@ module PWN
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
@@ -107,7 +112,8 @@ module PWN
107
112
  browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
108
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',
@@ -16,8 +16,9 @@ module PWN
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
@@ -55,7 +56,8 @@ module PWN
55
56
  browser_type: 'optional :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
56
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',
@@ -15,7 +15,8 @@ module PWN
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
@@ -107,6 +112,7 @@ module PWN
107
112
  browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
108
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(
@@ -13,7 +13,8 @@ module PWN
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
@@ -86,6 +92,7 @@ module PWN
86
92
  browser_type: 'optional :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
87
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(
@@ -15,7 +15,8 @@ module PWN
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
@@ -96,7 +101,8 @@ module PWN
96
101
  browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
97
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',
@@ -13,7 +13,8 @@ module PWN
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.google.com')
16
+ browser = browser_obj[:browser]
17
+ browser.goto('https://www.google.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(text: 'Google Search').click!
34
+ browser = browser_obj[:browser]
35
+ browser.text_field(name: 'q').wait_until(&:present?).set(q)
36
+ browser.button(text: 'Google Search').click!
35
37
 
36
38
  browser_obj
37
39
  rescue StandardError => e
@@ -49,8 +51,9 @@ module PWN
49
51
  company = opts[:company].to_s.scrub
50
52
  q = "site:linkedin.com inurl:in intext:\"#{company}\""
51
53
 
52
- browser_obj.text_field(name: 'q').wait_until(&:present?).set(q)
53
- browser_obj.button(text: 'Google Search').click!
54
+ browser = browser_obj[:browser]
55
+ browser.text_field(name: 'q').wait_until(&:present?).set(q)
56
+ browser.button(text: 'Google Search').click!
54
57
  sleep 3 # Cough: <hack>
55
58
 
56
59
  browser_obj
@@ -88,7 +91,8 @@ module PWN
88
91
  browser_type: 'optional :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
89
92
  proxy: 'optional - scheme://proxy_host:port || tor'
90
93
  )
91
- puts browser_obj.public_methods
94
+ browser = browser_obj[:browser]
95
+ puts browser.public_methods
92
96
 
93
97
  browser_obj = #{self}.search(
94
98
  browser_obj: 'required - browser_obj returned from #open method',
@@ -15,7 +15,8 @@ module PWN
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.hackerone.com')
18
+ browser = browser_obj[:browser]
19
+ browser.goto('https://www.hackerone.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://hackerone.com/users/sign_in')
46
+ browser.goto('https://hackerone.com/users/sign_in')
44
47
 
45
- browser_obj.text_field(name: 'user[email]').wait_until(&:present?).set(username)
46
- browser_obj.text_field(name: 'user[password]').wait_until(&:present?).set(password)
47
- browser_obj.button(name: 'commit').click!
48
+ browser.text_field(name: 'user[email]').wait_until(&:present?).set(username)
49
+ browser.text_field(name: 'user[password]').wait_until(&:present?).set(password)
50
+ browser.button(name: 'commit').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.i(class: 'icon-arrow-closure').click!
62
- browser_obj.link(index: 16).click!
64
+
65
+ browser = browser_obj[:browser]
66
+ browser.i(class: 'icon-arrow-closure').click!
67
+ browser.link(index: 16).click!
63
68
 
64
69
  browser_obj
65
70
  rescue StandardError => e
@@ -96,7 +101,8 @@ module PWN
96
101
  browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
97
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',
@@ -15,7 +15,8 @@ module PWN
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.linkedin.com')
18
+ browser = browser_obj[:browser]
19
+ browser.goto('https://www.linkedin.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.linkedin.com/uas/login')
46
+ browser.goto('https://www.linkedin.com/uas/login')
44
47
 
45
- browser_obj.text_field(name: 'session_key').wait_until(&:present?).set(username)
46
- browser_obj.text_field(name: 'session_password').wait_until(&:present?).set(password)
47
- browser_obj.button(name: 'signin').click!
48
+ browser.text_field(name: 'session_key').wait_until(&:present?).set(username)
49
+ browser.text_field(name: 'session_password').wait_until(&:present?).set(password)
50
+ browser.button(name: 'signin').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.button(id: 'nav-settings__dropdown-trigger').wait_until(&:present?).click!
62
- browser_obj.link(index: 14).wait_until(&:present?).click!
64
+
65
+ browser = browser_obj[:browser]
66
+ browser.button(id: 'nav-settings__dropdown-trigger').wait_until(&:present?).click!
67
+ browser.link(index: 14).wait_until(&:present?).click!
63
68
 
64
69
  browser_obj
65
70
  rescue StandardError => e
@@ -96,7 +101,8 @@ module PWN
96
101
  browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
97
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',
@@ -15,7 +15,8 @@ module PWN
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.pandora.com')
18
+ browser = browser_obj[:browser]
19
+ browser.goto('https://www.pandora.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.pandora.com/account/sign-in')
46
+ browser.goto('https://www.pandora.com/account/sign-in')
44
47
 
45
- browser_obj.text_field(id: 'login_username').wait_until(&:present?).set(username)
46
- browser_obj.text_field(id: 'login_password').wait_until(&:present?).set(password)
47
- browser_obj.button(text: 'Log In').click!
48
+ browser.text_field(id: 'login_username').wait_until(&:present?).set(username)
49
+ browser.text_field(id: 'login_password').wait_until(&:present?).set(password)
50
+ browser.button(text: 'Log In').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.img(alt: 'Account Menu').wait_until(&:present?).click!
62
- browser_obj.span(text: 'Sign Out').wait_until(&:present?).click!
64
+
65
+ browser = browser_obj[:browser]
66
+ browser.img(alt: 'Account Menu').wait_until(&:present?).click!
67
+ browser.span(text: 'Sign Out').wait_until(&:present?).click!
63
68
 
64
69
  browser_obj
65
70
  rescue StandardError => e
@@ -96,7 +101,8 @@ module PWN
96
101
  browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
97
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',
@@ -13,7 +13,8 @@ module PWN
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://pastebin.com')
16
+ browser = browser_obj[:browser]
17
+ browser.goto('https://pastebin.com')
17
18
 
18
19
  browser_obj
19
20
  rescue StandardError => e
@@ -27,7 +28,9 @@ module PWN
27
28
 
28
29
  public_class_method def self.onion(opts = {})
29
30
  browser_obj = opts[:browser_obj]
30
- browser_obj.goto('http://lw4ipk5choakk5ze.onion')
31
+
32
+ browser = browser_obj[:browser]
33
+ browser.goto('http://lw4ipk5choakk5ze.onion')
31
34
 
32
35
  browser_obj
33
36
  rescue StandardError => e
@@ -64,7 +67,8 @@ module PWN
64
67
  browser_type: 'optional :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
65
68
  proxy: 'optional - scheme://proxy_host:port || tor'
66
69
  )
67
- puts browser_obj.public_methods
70
+ browser = browser_obj[:browser]
71
+ puts browser.public_methods
68
72
 
69
73
  browser_obj = #{self}.onion(
70
74
  browser_obj: 'required - browser_obj returned from #open method'