pwn 0.5.173 → 0.5.175
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 +7 -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: 300e41c66f40408ec5b70e7fae6041db76179a47d73d8ab17689f368a36abe70
         | 
| 4 | 
            +
              data.tar.gz: 72c923cad6b163f7800ce559d5612e234edfc7e9a375f0d906a10cff7b0e0e16
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 95bd450e5782826ab8ae5c23f90bd40225fe1c2526bc6a202b50abca525e8788b2eaf17abc4dd82577a98188b89fccc331097bec30a1e493ae2876ab32666cb1
         | 
| 7 | 
            +
              data.tar.gz: 818a27ca5b79647e027ffeaa743c9ac7c062c337ba969a05e5f920d7123ad30f3c4fc5cef6b7eccfde9a48137793519575e6d8b0d293d6c9c13cf638b1074c2d
         | 
    
        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.175]: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.175]: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.175]: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:
         | 
| @@ -25,11 +25,11 @@ module PWN | |
| 25 25 | 
             
                  # Supported Method Parameters::
         | 
| 26 26 | 
             
                  # verify_devtools_browser(
         | 
| 27 27 | 
             
                  #   browser_obj: 'required - browser_obj returned from #open method',
         | 
| 28 | 
            -
                  #   supported: 'optional - array of supported browser types (defaults to [:chrome, :headless_chrome, :firefox, :headless_firefox])'
         | 
| 28 | 
            +
                  #   supported: 'optional - array of supported browser types (defaults to [:chrome, :headless_chrome, :firefox, :headless_firefox, :headless])'
         | 
| 29 29 | 
             
                  # )
         | 
| 30 30 | 
             
                  private_class_method def self.verify_devtools_browser(opts = {})
         | 
| 31 31 | 
             
                    browser_obj = opts[:browser_obj]
         | 
| 32 | 
            -
                    supported = opts[:supported] ||= %i[chrome headless_chrome firefox headless_firefox]
         | 
| 32 | 
            +
                    supported = opts[:supported] ||= %i[chrome headless_chrome firefox headless_firefox headless]
         | 
| 33 33 |  | 
| 34 34 | 
             
                    browser_type = browser_obj[:type]
         | 
| 35 35 | 
             
                    raise "ERROR: browser_type must be #{supported}" unless supported.include?(browser_type)
         | 
| @@ -282,7 +282,7 @@ module PWN | |
| 282 282 | 
             
                    end
         | 
| 283 283 |  | 
| 284 284 | 
             
                    browser_type = browser_obj[:type]
         | 
| 285 | 
            -
                    supported = %i[chrome headless_chrome firefox headless_firefox]
         | 
| 285 | 
            +
                    supported = %i[chrome headless_chrome firefox headless_firefox headless]
         | 
| 286 286 | 
             
                    if with_devtools && supported.include?(browser_type)
         | 
| 287 287 | 
             
                      browser_obj[:browser].goto('about:blank')
         | 
| 288 288 | 
             
                      rand_tab = SecureRandom.hex(8)
         | 
| @@ -461,7 +461,8 @@ module PWN | |
| 461 461 |  | 
| 462 462 | 
             
                    browser = browser_obj[:browser]
         | 
| 463 463 | 
             
                    all_tabs = browser.windows
         | 
| 464 | 
            -
                    all_tabs.select { |tab| tab.use if tab.title.include?(keyword) || tab.url.include?(keyword) }
         | 
| 464 | 
            +
                    tab = all_tabs.select { |tab| tab.use if tab.title.include?(keyword) || tab.url.include?(keyword) }
         | 
| 465 | 
            +
                    { title: tab.last.title, url: tab.last.url, active: active } unless tab.empty?
         | 
| 465 466 | 
             
                  rescue StandardError => e
         | 
| 466 467 | 
             
                    raise e
         | 
| 467 468 | 
             
                  end
         | 
| @@ -484,6 +485,8 @@ module PWN | |
| 484 485 | 
             
                    rand_tab = SecureRandom.hex(8)
         | 
| 485 486 | 
             
                    browser.execute_script("document.title = '#{rand_tab}'")
         | 
| 486 487 | 
             
                    browser.goto(url) unless url.nil?
         | 
| 488 | 
            +
             | 
| 489 | 
            +
                    { title: browser.title, url: browser.url, active: active }
         | 
| 487 490 | 
             
                  rescue StandardError => e
         | 
| 488 491 | 
             
                    raise e
         | 
| 489 492 | 
             
                  end
         | 
    
        data/lib/pwn/version.rb
    CHANGED