pwn 0.5.186 → 0.5.187
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 +4 -4
- data/README.md +3 -3
- data/lib/pwn/plugins/transparent_browser.rb +11 -4
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50a533cec3772f1ba3206b4c9ad3c781c69ffd578fb5f2b517f65080d6601837
|
4
|
+
data.tar.gz: c382a547d23fdc83f615605a88c8cfd6fb25875ca8b838d62b3deb84cbfe3e82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd7f4abe077384ec01028d5886785e36360f9e02e0e2c54c9642649578d4336c8d1257efaff62c93fe1dc7bc6fc53ac86dfedea70aedf053c7f65f151e5d6fba
|
7
|
+
data.tar.gz: 1e93386db70d9d43d19c1b2fc14b9eb05760ca2192cc43cc9454dfc830f865233fef574a9c537415314fc1ab5832c57cdf6d9c5cd25932ddc23456c898935d0e
|
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.
|
40
|
+
pwn[v0.5.187]:001 >>> PWN.help
|
41
41
|
```
|
42
42
|
|
43
43
|
[](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.
|
55
|
+
pwn[v0.5.187]: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.
|
65
|
+
pwn[v0.5.187]: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:
|
@@ -285,8 +285,7 @@ module PWN
|
|
285
285
|
|
286
286
|
if devtools_supported.include?(browser_type)
|
287
287
|
rand_tab = SecureRandom.hex(8)
|
288
|
-
browser_obj[:browser].goto(
|
289
|
-
browser_obj[:browser].execute_script("document.title = '#{rand_tab}'")
|
288
|
+
browser_obj[:browser].goto("about:about##{rand_tab}")
|
290
289
|
|
291
290
|
if with_devtools
|
292
291
|
driver = browser_obj[:browser].driver
|
@@ -492,9 +491,8 @@ module PWN
|
|
492
491
|
devtools = browser_obj[:devtools]
|
493
492
|
browser.execute_script('window.open()')
|
494
493
|
jmp_tab(browser_obj: browser_obj, keyword: 'about:blank')
|
495
|
-
browser.goto('about:about') if url.nil?
|
496
494
|
rand_tab = SecureRandom.hex(8)
|
497
|
-
browser.
|
495
|
+
browser.goto("about:about##{rand_tab}") if url.nil?
|
498
496
|
# Open the DevTools for Firefox, Chrome opens them automatically
|
499
497
|
browser.body.send_keys(:f12) if firefox_types.include?(browser_type)
|
500
498
|
# Open Console drawer if DevTools are open
|
@@ -520,6 +518,13 @@ module PWN
|
|
520
518
|
raise 'ERROR: keyword parameter is required' if keyword.nil?
|
521
519
|
|
522
520
|
browser = browser_obj[:browser]
|
521
|
+
# 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]
|
526
|
+
jmp_tab(browser_obj: browser_obj, keyword: keyword)
|
527
|
+
end
|
523
528
|
all_tabs = browser.windows
|
524
529
|
tab_sel = all_tabs.select { |tab| tab.close if tab.title.include?(keyword) || tab.url.include?(keyword) }
|
525
530
|
{ title: tab_sel.last.title, url: tab_sel.last.url, state: :closed } if tab_sel.any?
|
@@ -660,6 +665,8 @@ module PWN
|
|
660
665
|
firefox_types = %i[firefox headless_firefox]
|
661
666
|
chrome_types = %i[chrome headless_chrome]
|
662
667
|
|
668
|
+
hotkey = []
|
669
|
+
|
663
670
|
case PWN::Plugins::DetectOS.type
|
664
671
|
when :linux, :openbsd, :windows
|
665
672
|
hotkey = %i[control shift]
|
data/lib/pwn/version.rb
CHANGED