pwn 0.5.173 → 0.5.175

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4896cb625aad3bcb7fcc5ecc506851860530486d84a9fa956e5cc526f15c2437
4
- data.tar.gz: 131b84769166bc8cceaabc66263a8ed70370eb9a996c94c4f326c3027ca62bc1
3
+ metadata.gz: 300e41c66f40408ec5b70e7fae6041db76179a47d73d8ab17689f368a36abe70
4
+ data.tar.gz: 72c923cad6b163f7800ce559d5612e234edfc7e9a375f0d906a10cff7b0e0e16
5
5
  SHA512:
6
- metadata.gz: '06832bdbed010c3629c262193b6e102db2da103d3ca6edeb3923039a4bf5f111cab556abc038c45d4aa522024ebbe5b312352ba94ecf0db703738280dd43b3cc'
7
- data.tar.gz: 53cb1a3b9069c3dfa9025d45fb7fdf5eccabcb7517e5aa27c23cd359403d762d5737310b24fca7a238f3e542bc13d177469e49f5718d8a8cf5a240bce75abd7a
6
+ metadata.gz: 95bd450e5782826ab8ae5c23f90bd40225fe1c2526bc6a202b50abca525e8788b2eaf17abc4dd82577a98188b89fccc331097bec30a1e493ae2876ab32666cb1
7
+ data.tar.gz: 818a27ca5b79647e027ffeaa743c9ac7c062c337ba969a05e5f920d7123ad30f3c4fc5cef6b7eccfde9a48137793519575e6d8b0d293d6c9c13cf638b1074c2d
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
37
37
  $ ./install.sh
38
38
  $ ./install.sh ruby-gem
39
39
  $ pwn
40
- pwn[v0.5.173]:001 >>> PWN.help
40
+ pwn[v0.5.175]: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.3.3@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.173]:001 >>> PWN.help
55
+ pwn[v0.5.175]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
  If you're using a multi-user install of RVM do:
@@ -62,7 +62,7 @@ $ rvm use ruby-3.3.3@pwn
62
62
  $ rvmsudo gem uninstall --all --executables pwn
63
63
  $ rvmsudo gem install --verbose pwn
64
64
  $ pwn
65
- pwn[v0.5.173]:001 >>> PWN.help
65
+ pwn[v0.5.175]:001 >>> PWN.help
66
66
  ```
67
67
 
68
68
  PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
@@ -25,11 +25,11 @@ module PWN
25
25
  # Supported Method Parameters::
26
26
  # verify_devtools_browser(
27
27
  # browser_obj: 'required - browser_obj returned from #open method',
28
- # supported: 'optional - array of supported browser types (defaults to [:chrome, :headless_chrome, :firefox, :headless_firefox])'
28
+ # supported: 'optional - array of supported browser types (defaults to [:chrome, :headless_chrome, :firefox, :headless_firefox, :headless])'
29
29
  # )
30
30
  private_class_method def self.verify_devtools_browser(opts = {})
31
31
  browser_obj = opts[:browser_obj]
32
- supported = opts[:supported] ||= %i[chrome headless_chrome firefox headless_firefox]
32
+ supported = opts[:supported] ||= %i[chrome headless_chrome firefox headless_firefox headless]
33
33
 
34
34
  browser_type = browser_obj[:type]
35
35
  raise "ERROR: browser_type must be #{supported}" unless supported.include?(browser_type)
@@ -282,7 +282,7 @@ module PWN
282
282
  end
283
283
 
284
284
  browser_type = browser_obj[:type]
285
- supported = %i[chrome headless_chrome firefox headless_firefox]
285
+ supported = %i[chrome headless_chrome firefox headless_firefox headless]
286
286
  if with_devtools && supported.include?(browser_type)
287
287
  browser_obj[:browser].goto('about:blank')
288
288
  rand_tab = SecureRandom.hex(8)
@@ -461,7 +461,8 @@ module PWN
461
461
 
462
462
  browser = browser_obj[:browser]
463
463
  all_tabs = browser.windows
464
- all_tabs.select { |tab| tab.use if tab.title.include?(keyword) || tab.url.include?(keyword) }
464
+ tab = all_tabs.select { |tab| tab.use if tab.title.include?(keyword) || tab.url.include?(keyword) }
465
+ { title: tab.last.title, url: tab.last.url, active: active } unless tab.empty?
465
466
  rescue StandardError => e
466
467
  raise e
467
468
  end
@@ -484,6 +485,8 @@ module PWN
484
485
  rand_tab = SecureRandom.hex(8)
485
486
  browser.execute_script("document.title = '#{rand_tab}'")
486
487
  browser.goto(url) unless url.nil?
488
+
489
+ { title: browser.title, url: browser.url, active: active }
487
490
  rescue StandardError => e
488
491
  raise e
489
492
  end
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.5.173'
4
+ VERSION = '0.5.175'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.173
4
+ version: 0.5.175
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.