pwn 0.5.194 → 0.5.196

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: d8e2618c43661322179b1ea623b1dc19c5fc079373197c1ba64d78e63e17d68f
4
- data.tar.gz: 7c36ee8c5c48c6c181a7a4204911bdb6c9079f945b1814daafa5ccf433e71bd6
3
+ metadata.gz: 10e94d1c0d582fd41daa3c12e28c19ab20dafabe6116b447e031be47152f2f45
4
+ data.tar.gz: b6915b546e50f4be059170aa253b522666861e2095dc764d4b35de8d3aa52876
5
5
  SHA512:
6
- metadata.gz: 8449c2bfcc574dab0613478ac7f9cc249f039c7fc8ea3d27fd14045ce399377f2be3fdcdd760ffeb93f2812c0157e8c6daa99645d965e59835e35d5bf40b8f0b
7
- data.tar.gz: a5018bad53afa6a41bcf41c9b9c3abc0508ab2430f4905ab0368fd2beb479706c2f117bb48cb2414e641e5f39efe3cc28fd05bd7e5ad74ec165f2f9884ed615b
6
+ metadata.gz: 3782bcf8a7bda68d533d48588b5cc5b12571f14d01423f0f1db8309c66fec36f3c0b9df8385f5fb7fda78e9eff1251a505c4c195b7165cc27f88df369106d21f
7
+ data.tar.gz: 82fc2481d9a45a82b9a2fe6e7c56124c7fe24eef56cfd87fec7c2ab942b284e107aa48c692ccc305d958b4672ef0f67588635ea1ec1c0d30c78cdf7afdbedc2e
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.196]: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.196]: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.196]: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,17 +667,22 @@ 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
- 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}'")
673
+ if chrome_types.include?(browser_type)
674
+ devtools_tab_title = "DevTools-#{tab_id}"
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
681
682
  sleep 1
682
683
  browser.send_keys(:escape)
683
684
  end
684
- tab_tied_to_devtools = "about:about-#{devtools_tab_title.split('-').last.strip}"
685
+ tab_tied_to_devtools = "about:about-#{tab_id}"
685
686
  jmp_tab(browser_obj: browser_obj, keyword: tab_tied_to_devtools, explicit: true)
686
687
  rescue StandardError => e
687
688
  raise e
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.196'
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.196
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