pwn 0.5.312 → 0.5.313

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: 8e4a35e1ad2a4b56f5f69c9f369dfd037461d1a09a0acbdb4351507e3d2b370d
4
- data.tar.gz: 240e6eac437aedce128463e88915d4220aa3fac3e239f35d1cb575a9e6e51d11
3
+ metadata.gz: 637c524ecea5f16a96ee38e5fb449e6df52289ba726aac5447d7509511745ea5
4
+ data.tar.gz: f25475d8329111f5c71a79ebb0f75f677e8a2d2ebdc3f160fdb8623bdd845015
5
5
  SHA512:
6
- metadata.gz: 6a1a41815f5ddcb11bd541ffc37db38ef5a12a34724d47c5dc14c32357042741ed76cbd93e9dc0b93653e6e8d1ee060df2fcb2301504132f6a6c90af8aa1b60c
7
- data.tar.gz: 29467b6565940186c00407b2099de38d290fe33be9f7a0178ba521d44dad5b43d349f67b8e78570bc577db085bdc2db67726c90bfbed4f58681c5b1d9b108b95
6
+ metadata.gz: 4ab9ee157c8f6edfd2cfe30f77e0cdea7bd91926bcc1e44959241655e6a7a2665b872f8830cade196e6ba27cc4dec99741999fa22c60cbbc2c4e2e63d87c222d
7
+ data.tar.gz: eca463f21dc9ae0ac5c793154a91db82aaea6757212ab004873fade7077369e27401ba167576e2c0d91a8c2e284fb221425f7c64702f9e2121172904321b1a39
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.312]:001 >>> PWN.help
40
+ pwn[v0.5.313]: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.4.4@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.312]:001 >>> PWN.help
55
+ pwn[v0.5.313]: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.4.4@pwn
62
62
  $ rvmsudo gem uninstall --all --executables pwn
63
63
  $ rvmsudo gem install --verbose pwn
64
64
  $ pwn
65
- pwn[v0.5.312]:001 >>> PWN.help
65
+ pwn[v0.5.313]: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:
@@ -753,7 +753,7 @@ module PWN
753
753
  # Supported Method Parameters::
754
754
  # tab = PWN::Plugins::TransparentBrowser.jmp_tab(
755
755
  # browser_obj: 'required - browser_obj returned from #open method)',
756
- # keyword: 'required - keyword in title or url used to switch tabs',
756
+ # keyword: 'optional - keyword in title or url used to switch tabs (defaults to switching to next tab)',
757
757
  # explicit: 'optional - boolean to indicate if the keyword is an exact match (Defaults to false)'
758
758
  # )
759
759
 
@@ -762,7 +762,20 @@ module PWN
762
762
  verify_devtools_browser(browser_obj: browser_obj)
763
763
 
764
764
  keyword = opts[:keyword]
765
- raise 'ERROR: keyword parameter is required' if keyword.nil?
765
+ if keyword.nil?
766
+ # If no keyword is provided, switch to the next tab in the list
767
+ tab_list = list_tabs(browser_obj: browser_obj)
768
+ active_tab = tab_list.find { |tab| tab[:state] == :active }
769
+ # Next tab in the tab_list. If active tab is the last tab, switch to the first tab
770
+ next_tab_index = (tab_list.index(active_tab) + 1) % tab_list.size
771
+ next_tab = tab_list[next_tab_index]
772
+
773
+ if next_tab[:url] == active_tab[:url]
774
+ keyword = next_tab[:title]
775
+ else
776
+ keyword = next_tab[:url]
777
+ end
778
+ end
766
779
 
767
780
  explicit = opts[:explicit] ||= false
768
781
 
@@ -1308,7 +1321,7 @@ module PWN
1308
1321
 
1309
1322
  tab = #{self}.jmp_tab(
1310
1323
  browser_obj: 'required - browser_obj returned from #open method)',
1311
- keyword: 'required - keyword in title or url used to switch tabs'
1324
+ keyword: 'optional - keyword in title or url used to switch tabs (defaults to switching to next tab)',
1312
1325
  )
1313
1326
 
1314
1327
  tab = #{self}.new_tab(
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.312'
4
+ VERSION = '0.5.313'
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.312
4
+ version: 0.5.313
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.