Skip to content

Commit d4fcaa2

Browse files
committed
PWN::Plugins::TransparentBrowser module - include headless as a browser_type for with_devtools
1 parent 47f3713 commit d4fcaa2

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ cd /opt/pwn
3737
$ ./install.sh
3838
$ ./install.sh ruby-gem
3939
$ pwn
40-
pwn[v0.5.173]:001 >>> PWN.help
40+
pwn[v0.5.174]:001 >>> PWN.help
4141
```
4242

4343
[![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
5252
$ gem uninstall --all --executables pwn
5353
$ gem install --verbose pwn
5454
$ pwn
55-
pwn[v0.5.173]:001 >>> PWN.help
55+
pwn[v0.5.174]:001 >>> PWN.help
5656
```
5757

5858
If you're using a multi-user install of RVM do:
@@ -62,7 +62,7 @@ $ rvm use ruby-3.3.3@pwn
6262
$ rvmsudo gem uninstall --all --executables pwn
6363
$ rvmsudo gem install --verbose pwn
6464
$ pwn
65-
pwn[v0.5.173]:001 >>> PWN.help
65+
pwn[v0.5.174]:001 >>> PWN.help
6666
```
6767

6868
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:

lib/pwn/plugins/transparent_browser.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ module TransparentBrowser
2525
# Supported Method Parameters::
2626
# verify_devtools_browser(
2727
# 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])'
2929
# )
3030
private_class_method def self.verify_devtools_browser(opts = {})
3131
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]
3333

3434
browser_type = browser_obj[:type]
3535
raise "ERROR: browser_type must be #{supported}" unless supported.include?(browser_type)
@@ -282,7 +282,7 @@ module TransparentBrowser
282282
end
283283

284284
browser_type = browser_obj[:type]
285-
supported = %i[chrome headless_chrome firefox headless_firefox]
285+
supported = %i[chrome headless_chrome firefox headless_firefox headless]
286286
if with_devtools && supported.include?(browser_type)
287287
browser_obj[:browser].goto('about:blank')
288288
rand_tab = SecureRandom.hex(8)

lib/pwn/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module PWN
4-
VERSION = '0.5.173'
4+
VERSION = '0.5.174'
55
end

0 commit comments

Comments
 (0)