pwn 0.5.194 → 0.5.195

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8e2618c43661322179b1ea623b1dc19c5fc079373197c1ba64d78e63e17d68f
4
- data.tar.gz: 7c36ee8c5c48c6c181a7a4204911bdb6c9079f945b1814daafa5ccf433e71bd6
3
+ metadata.gz: 47aed4a8bf16f9e7f878c2a0655461c5e2d550d4bc6c4137af9800215eb11dec
4
+ data.tar.gz: bc696bc468851bed2b9afb1d64dbcc00f47c6a37dfc24119372a49ff3744c386
5
5
  SHA512:
6
- metadata.gz: 8449c2bfcc574dab0613478ac7f9cc249f039c7fc8ea3d27fd14045ce399377f2be3fdcdd760ffeb93f2812c0157e8c6daa99645d965e59835e35d5bf40b8f0b
7
- data.tar.gz: a5018bad53afa6a41bcf41c9b9c3abc0508ab2430f4905ab0368fd2beb479706c2f117bb48cb2414e641e5f39efe3cc28fd05bd7e5ad74ec165f2f9884ed615b
6
+ metadata.gz: 920c23d05ccba9d6b3721c79248eacf1f1167aa5e9c13f79d3f39449ee0fed7d500eca39f72469d1b8fffb25fa9b0f9883a24c46eca61acdf34425c88603eb69
7
+ data.tar.gz: f1534b2cdf0eac1da6cd95271ea7a9a0d1fd8bdb035d0635ed061426afd0d8adbbc2a6b0c26be4557b225f272dd484e8b4e38288a4129ffee744eb2605168670
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.194]:001 >>> PWN.help
40
+ pwn[v0.5.195]: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.194]:001 >>> PWN.help
55
+ pwn[v0.5.195]: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.194]:001 >>> PWN.help
65
+ pwn[v0.5.195]: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:
@@ -498,11 +498,7 @@ module PWN
498
498
  browser = browser_obj[:browser]
499
499
  browser_type = browser_obj[:type]
500
500
  devtools = browser_obj[:devtools]
501
- unless first_tab
502
- browser.execute_script('window.open()')
503
- jmp_tab(browser_obj: browser_obj, keyword: 'about:blank')
504
- end
505
-
501
+ browser.driver.switch_to.new_window(:tab) unless first_tab
506
502
  rand_tab = SecureRandom.hex(8)
507
503
  url = 'about:about'
508
504
  url = 'chrome://chrome-urls/' if chrome_types.include?(browser_type)
@@ -671,10 +667,15 @@ module PWN
671
667
  first_tab = opts[:first_tab] ||= false
672
668
 
673
669
  browser = browser_obj[:browser]
670
+ browser_type = browser_obj[:type]
671
+ chrome_types = %i[chrome headless_chrome]
674
672
  tab_id = browser.title.split('-').last.strip
675
673
  devtools_tab_title = "DevTools-#{tab_id}"
676
- jmp_tab(browser_obj: browser_obj, keyword: 'DevTools', explicit: true)
677
- browser.execute_script("document.title = '#{devtools_tab_title}'")
674
+ if chrome_types.include?(browser_type)
675
+ jmp_tab(browser_obj: browser_obj, keyword: 'DevTools', explicit: true)
676
+ browser.execute_script("document.title = '#{devtools_tab_title}'")
677
+ end
678
+
678
679
  browser.send_keys(:f12)
679
680
  if first_tab
680
681
  # TODO: replace sleep with something more reliable like an event listener
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.194'
4
+ VERSION = '0.5.195'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.194
4
+ version: 0.5.195
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-24 00:00:00.000000000 Z
11
+ date: 2024-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport