pwn 0.5.187 → 0.5.188

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: 50a533cec3772f1ba3206b4c9ad3c781c69ffd578fb5f2b517f65080d6601837
4
- data.tar.gz: c382a547d23fdc83f615605a88c8cfd6fb25875ca8b838d62b3deb84cbfe3e82
3
+ metadata.gz: 7d177d8ba3adcb7aca7b75e94b2bb1693a207578ad900afa123c55d4ffff71ec
4
+ data.tar.gz: 602fdf082a592e42a7b59f371682d60e2243b8e98e811f3ca8422b1c13247258
5
5
  SHA512:
6
- metadata.gz: bd7f4abe077384ec01028d5886785e36360f9e02e0e2c54c9642649578d4336c8d1257efaff62c93fe1dc7bc6fc53ac86dfedea70aedf053c7f65f151e5d6fba
7
- data.tar.gz: 1e93386db70d9d43d19c1b2fc14b9eb05760ca2192cc43cc9454dfc830f865233fef574a9c537415314fc1ab5832c57cdf6d9c5cd25932ddc23456c898935d0e
6
+ metadata.gz: 7616d1af83026a31ba41f23b69cf65b85721e6a7770f1611a49ed417ac16c584019b8515d4e6b92f45c0c00c87f655877676a506ce9b2278ae439a243cdbcb7d
7
+ data.tar.gz: 36b19d1c5480a03bdf2e344cbdde7796815c316f41c2754912a2c8c8fd9ef7294f5f157b495290978aeeaeb3da6e2b5348dd84ac986d3dff70695b92f999323f
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.187]:001 >>> PWN.help
40
+ pwn[v0.5.188]: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.187]:001 >>> PWN.help
55
+ pwn[v0.5.188]: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.187]:001 >>> PWN.help
65
+ pwn[v0.5.188]: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:
@@ -492,11 +492,14 @@ module PWN
492
492
  browser.execute_script('window.open()')
493
493
  jmp_tab(browser_obj: browser_obj, keyword: 'about:blank')
494
494
  rand_tab = SecureRandom.hex(8)
495
- browser.goto("about:about##{rand_tab}") if url.nil?
495
+ if url.nil?
496
+ browser.goto("about:about##{rand_tab}")
497
+ browser.execute_script("document.title = '#{rand_tab}'")
498
+ end
496
499
  # Open the DevTools for Firefox, Chrome opens them automatically
497
500
  browser.body.send_keys(:f12) if firefox_types.include?(browser_type)
498
501
  # Open Console drawer if DevTools are open
499
- browser.body.send_keys(:escape) if devtools
502
+ browser.body.send_keys(:escape) unless devtools.nil?
500
503
  browser.goto(url) unless url.nil?
501
504
 
502
505
  { title: browser.title, url: browser.url, state: :active }
@@ -519,10 +522,10 @@ module PWN
519
522
 
520
523
  browser = browser_obj[:browser]
521
524
  # Switch to an inactive tab before closing the active tab if it's currently active
522
- active_tab = list_tabs(browser_obj: browser_obj).find { |tab| tab[:state] == :active }
523
- if active_tab[:url] == browser.url
524
- invalid_tab = list_tabs(browser_obj: browser_obj).find { |tab| tab[:url] != browser.url }
525
- keyword = invalid_tab[:url]
525
+ active_tab = list_tabs(browser_obj: browser_obj).select { |tab| tab[:state] == :active }
526
+ if active_tab.last[:url] == browser.url
527
+ invalid_tab = list_tabs(browser_obj: browser_obj).select { |tab| tab[:url] != browser.url }
528
+ keyword = invalid_tab.last[:url]
526
529
  jmp_tab(browser_obj: browser_obj, keyword: keyword)
527
530
  end
528
531
  all_tabs = browser.windows
@@ -666,7 +669,6 @@ module PWN
666
669
  chrome_types = %i[chrome headless_chrome]
667
670
 
668
671
  hotkey = []
669
-
670
672
  case PWN::Plugins::DetectOS.type
671
673
  when :linux, :openbsd, :windows
672
674
  hotkey = %i[control shift]
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.187'
4
+ VERSION = '0.5.188'
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.187
4
+ version: 0.5.188
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.