pwn 0.5.190 → 0.5.191
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 +17 -11
- 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: 0a505a20bdb9c9adcd1e006d35bc8b09002c4c98e4dfd43d6e592f381fc39ae0
|
4
|
+
data.tar.gz: '05856cfa4c5c3e0d3fb9a807a616f063f4606b09c913b6502e4c354613da321e'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4386feadcc8c56c4de2c8fe323fba7c4b794397cdf4c4a0e3ca661e8126ce8cb07b71aa191d1cc5cf6233bbdc5a0cc5bcf8e4c7b7dfe2bfb824b8fd68db5651
|
7
|
+
data.tar.gz: c61ac9fcf9e474fe4b01eaa0fdf0deb03beebd91e4f7cdc340b9b960f9dbcec3b8ffa5fe3562007f0af313ff9ae805e3881bac25bdfbc37db9f94ba9a358e517
|
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.191]: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.191]: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.191]: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:
|
@@ -198,9 +198,6 @@ module PWN
|
|
198
198
|
this_profile['devtools.cache.disabled'] = true
|
199
199
|
this_profile['dom.caches.enabled'] = false
|
200
200
|
|
201
|
-
# caps = Selenium::WebDriver::Remote::Capabilities.firefox
|
202
|
-
# caps[:acceptInsecureCerts] = true
|
203
|
-
|
204
201
|
if proxy
|
205
202
|
this_profile['network.proxy.type'] = 1
|
206
203
|
this_profile['network.proxy.allow_hijacking_localhost'] = true
|
@@ -513,7 +510,7 @@ module PWN
|
|
513
510
|
|
514
511
|
# Supported Method Parameters::
|
515
512
|
# tab = PWN::Plugins::TransparentBrowser.close_tab(
|
516
|
-
# browser_obj: 'required - browser_obj returned from #open method)'
|
513
|
+
# browser_obj: 'required - browser_obj returned from #open method)',
|
517
514
|
# keyword: 'required - keyword in title or url used to close tabs'
|
518
515
|
# )
|
519
516
|
|
@@ -526,17 +523,26 @@ module PWN
|
|
526
523
|
|
527
524
|
browser = browser_obj[:browser]
|
528
525
|
# Switch to an inactive tab before closing the active tab if it's currently active
|
529
|
-
|
530
|
-
|
531
|
-
|
526
|
+
tab_list = list_tabs(browser_obj: browser_obj)
|
527
|
+
active_tab = tab_list.find { |tab| tab[:state] == :active }
|
528
|
+
if active_tab[:url].include?(keyword)
|
529
|
+
inactive_tabs = tab_list.reject { |tab| tab[:url] == browser.url }
|
532
530
|
if inactive_tabs.any?
|
533
|
-
|
534
|
-
jmp_tab(browser_obj: browser_obj, keyword:
|
531
|
+
tab_to_activate = inactive_tabs.last[:url]
|
532
|
+
jmp_tab(browser_obj: browser_obj, keyword: tab_to_activate)
|
535
533
|
end
|
536
534
|
end
|
537
535
|
all_tabs = browser.windows
|
538
|
-
|
539
|
-
{
|
536
|
+
|
537
|
+
tabs_to_close = all_tabs.select { |tab| tab.title.include?(keyword) || tab.url.include?(keyword) }
|
538
|
+
|
539
|
+
tabs_closed = tabs_to_close.map do |tab|
|
540
|
+
{ title: tab.title, url: tab.url, state: :closed }
|
541
|
+
end
|
542
|
+
|
543
|
+
tabs_to_close.each(&:close)
|
544
|
+
|
545
|
+
tabs_closed
|
540
546
|
rescue StandardError => e
|
541
547
|
raise e
|
542
548
|
end
|
data/lib/pwn/version.rb
CHANGED