pwn 0.5.171 → 0.5.173
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +4 -3
- data/Gemfile +3 -3
- data/README.md +3 -3
- data/lib/pwn/plugins/transparent_browser.rb +299 -41
- data/lib/pwn/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4896cb625aad3bcb7fcc5ecc506851860530486d84a9fa956e5cc526f15c2437
|
4
|
+
data.tar.gz: 131b84769166bc8cceaabc66263a8ed70370eb9a996c94c4f326c3027ca62bc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '06832bdbed010c3629c262193b6e102db2da103d3ca6edeb3923039a4bf5f111cab556abc038c45d4aa522024ebbe5b312352ba94ecf0db703738280dd43b3cc'
|
7
|
+
data.tar.gz: 53cb1a3b9069c3dfa9025d45fb7fdf5eccabcb7517e5aa27c23cd359403d762d5737310b24fca7a238f3e542bc13d177469e49f5718d8a8cf5a240bce75abd7a
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2024-06-
|
3
|
+
# on 2024-06-20 17:51:21 UTC using RuboCop version 1.64.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -41,7 +41,7 @@ Lint/NestedMethodDefinition:
|
|
41
41
|
Exclude:
|
42
42
|
- 'lib/pwn/plugins/repl.rb'
|
43
43
|
|
44
|
-
# Offense count:
|
44
|
+
# Offense count: 311
|
45
45
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
46
46
|
# Configuration parameters: AutoCorrect.
|
47
47
|
Lint/UselessAssignment:
|
@@ -81,7 +81,7 @@ Metrics/MethodLength:
|
|
81
81
|
Exclude:
|
82
82
|
- 'lib/pwn/banner/code_cave.rb'
|
83
83
|
|
84
|
-
# Offense count:
|
84
|
+
# Offense count: 10
|
85
85
|
# Configuration parameters: CountComments, Max, CountAsOne.
|
86
86
|
Metrics/ModuleLength:
|
87
87
|
Exclude:
|
@@ -94,6 +94,7 @@ Metrics/ModuleLength:
|
|
94
94
|
- 'lib/pwn/plugins/open_ai.rb'
|
95
95
|
- 'lib/pwn/plugins/packet.rb'
|
96
96
|
- 'lib/pwn/plugins/repl.rb'
|
97
|
+
- 'lib/pwn/plugins/transparent_browser.rb'
|
97
98
|
|
98
99
|
# Offense count: 1
|
99
100
|
# This cop supports safe autocorrection (--autocorrect).
|
data/Gemfile
CHANGED
@@ -20,7 +20,7 @@ gem 'barby', '0.6.9'
|
|
20
20
|
gem 'base32', '0.3.4'
|
21
21
|
gem 'brakeman', '6.1.2'
|
22
22
|
gem 'bson', '5.0.0'
|
23
|
-
gem 'bundler', '>=2.5.
|
23
|
+
gem 'bundler', '>=2.5.14'
|
24
24
|
gem 'bundler-audit', '0.9.1'
|
25
25
|
gem 'bunny', '2.22.0'
|
26
26
|
gem 'colorize', '1.1.0'
|
@@ -43,7 +43,7 @@ gem 'jenkins_api_client2', '1.9.0'
|
|
43
43
|
gem 'js-beautify', '0.1.8'
|
44
44
|
gem 'json', '2.7.2'
|
45
45
|
gem 'jsonpath', '1.1.5'
|
46
|
-
gem 'jwt', '2.8.
|
46
|
+
gem 'jwt', '2.8.2'
|
47
47
|
gem 'libusb', '0.7.1'
|
48
48
|
gem 'luhn', '1.0.2'
|
49
49
|
gem 'mail', '2.8.1'
|
@@ -85,7 +85,7 @@ gem 'ruby-nmap', '1.0.3'
|
|
85
85
|
gem 'ruby-saml', '1.16.0'
|
86
86
|
gem 'rvm', '1.11.3.9'
|
87
87
|
gem 'savon', '2.15.0'
|
88
|
-
gem 'selenium-devtools', '0.
|
88
|
+
gem 'selenium-devtools', '0.126.0'
|
89
89
|
gem 'serialport', '1.3.2'
|
90
90
|
# gem 'sinatra', '4.0.0'
|
91
91
|
gem 'slack-ruby-client', '2.3.0'
|
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.173]: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.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.173]: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.173]: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:
|
@@ -2,11 +2,13 @@
|
|
2
2
|
|
3
3
|
require 'em/pure_ruby'
|
4
4
|
require 'faye/websocket'
|
5
|
+
require 'openssl'
|
5
6
|
require 'rest-client'
|
7
|
+
require 'securerandom'
|
6
8
|
require 'selenium/webdriver'
|
7
9
|
require 'selenium/devtools'
|
8
10
|
require 'socksify'
|
9
|
-
require '
|
11
|
+
require 'timeout'
|
10
12
|
require 'watir'
|
11
13
|
|
12
14
|
module PWN
|
@@ -20,6 +22,21 @@ module PWN
|
|
20
22
|
module TransparentBrowser
|
21
23
|
@@logger = PWN::Plugins::PWNLogger.create
|
22
24
|
|
25
|
+
# Supported Method Parameters::
|
26
|
+
# verify_devtools_browser(
|
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])'
|
29
|
+
# )
|
30
|
+
private_class_method def self.verify_devtools_browser(opts = {})
|
31
|
+
browser_obj = opts[:browser_obj]
|
32
|
+
supported = opts[:supported] ||= %i[chrome headless_chrome firefox headless_firefox]
|
33
|
+
|
34
|
+
browser_type = browser_obj[:type]
|
35
|
+
raise "ERROR: browser_type must be #{supported}" unless supported.include?(browser_type)
|
36
|
+
rescue StandardError => e
|
37
|
+
raise e
|
38
|
+
end
|
39
|
+
|
23
40
|
# Supported Method Parameters::
|
24
41
|
# browser_obj1 = PWN::Plugins::TransparentBrowser.open(
|
25
42
|
# browser_type: 'optional - :firefox|:chrome|:headless|:rest|:websocket (defaults to :chrome)',
|
@@ -113,8 +130,9 @@ module PWN
|
|
113
130
|
args: args,
|
114
131
|
accept_insecure_certs: true
|
115
132
|
)
|
133
|
+
|
134
|
+
options.web_socket_url = true
|
116
135
|
options.profile = this_profile
|
117
|
-
# driver = Selenium::WebDriver.for(:firefox, capabilities: options)
|
118
136
|
driver = Selenium::WebDriver.for(:firefox, options: options)
|
119
137
|
browser_obj[:browser] = Watir::Browser.new(driver)
|
120
138
|
|
@@ -138,8 +156,8 @@ module PWN
|
|
138
156
|
accept_insecure_certs: true
|
139
157
|
)
|
140
158
|
|
159
|
+
options.web_socket_url = true
|
141
160
|
options.profile = this_profile
|
142
|
-
# driver = Selenium::WebDriver.for(:chrome, capabilities: options)
|
143
161
|
driver = Selenium::WebDriver.for(:chrome, options: options)
|
144
162
|
browser_obj[:browser] = Watir::Browser.new(driver)
|
145
163
|
|
@@ -201,6 +219,7 @@ module PWN
|
|
201
219
|
accept_insecure_certs: true
|
202
220
|
)
|
203
221
|
|
222
|
+
options.web_socket_url = true
|
204
223
|
options.profile = this_profile
|
205
224
|
driver = Selenium::WebDriver.for(:firefox, options: options)
|
206
225
|
browser_obj[:browser] = Watir::Browser.new(driver)
|
@@ -222,6 +241,7 @@ module PWN
|
|
222
241
|
accept_insecure_certs: true
|
223
242
|
)
|
224
243
|
|
244
|
+
options.web_socket_url = true
|
225
245
|
options.profile = this_profile
|
226
246
|
driver = Selenium::WebDriver.for(:chrome, options: options)
|
227
247
|
browser_obj[:browser] = Watir::Browser.new(driver)
|
@@ -261,41 +281,31 @@ module PWN
|
|
261
281
|
return nil
|
262
282
|
end
|
263
283
|
|
264
|
-
browser_obj[:devtools] = browser_obj[:browser].driver.devtools if with_devtools && (browser_obj[:type] == :chrome || browser_obj[:type] == :headless_chrome || browser_obj[:type] == :firefox || browser_obj[:type] == :headless_firefox)
|
265
|
-
|
266
|
-
browser_obj
|
267
|
-
rescue StandardError => e
|
268
|
-
raise e
|
269
|
-
end
|
270
|
-
|
271
|
-
# Supported Method Parameters::
|
272
|
-
# console_resp = PWN::Plugins::TransparentBrowser.devtools_console(
|
273
|
-
# browser_obj: browser_obj1,
|
274
|
-
# js: 'required - JavaScript expression to evaluate'
|
275
|
-
# )
|
276
|
-
|
277
|
-
public_class_method def self.devtools_console(opts = {})
|
278
|
-
browser_obj = opts[:browser_obj]
|
279
284
|
browser_type = browser_obj[:type]
|
285
|
+
supported = %i[chrome headless_chrome firefox headless_firefox]
|
286
|
+
if with_devtools && supported.include?(browser_type)
|
287
|
+
browser_obj[:browser].goto('about:blank')
|
288
|
+
rand_tab = SecureRandom.hex(8)
|
289
|
+
browser_obj[:browser].execute_script("document.title = '#{rand_tab}'")
|
290
|
+
|
291
|
+
browser_obj[:devtools] = browser_obj[:browser].driver.devtools
|
292
|
+
browser_obj[:bidi] = browser_obj[:browser].driver.bidi
|
293
|
+
|
294
|
+
# browser_obj[:devtools].send_cmd('DOM.enable')
|
295
|
+
# browser_obj[:devtools].send_cmd('Log.enable')
|
296
|
+
# browser_obj[:devtools].send_cmd('Network.enable')
|
297
|
+
# browser_obj[:devtools].send_cmd('Page.enable')
|
298
|
+
# browser_obj[:devtools].send_cmd('Runtime.enable')
|
299
|
+
# browser_obj[:devtools].send_cmd('Security.enable')
|
300
|
+
|
301
|
+
# if browser_type == :chrome || browser_type == :headless_chrome
|
302
|
+
# browser_obj[:devtools].send_cmd('Debugger.enable')
|
303
|
+
# browser_obj[:devtools].send_cmd('DOMStorage.enable')
|
304
|
+
# browser_obj[:devtools].send_cmd('DOMSnapshot.enable')
|
305
|
+
# end
|
306
|
+
end
|
280
307
|
|
281
|
-
|
282
|
-
raise 'ERROR: browser_type must be :chrome, :headless_chrome, :firefox, or :headless_firefox' unless valid_browser_types.include?(browser_type)
|
283
|
-
|
284
|
-
js = opts[:js] ||= "alert('ACK from => #{self}')"
|
285
|
-
|
286
|
-
devtools = browser_obj[:devtools]
|
287
|
-
devtools.send_cmd('Runtime.enable')
|
288
|
-
devtools.send_cmd('Console.enable')
|
289
|
-
devtools.send_cmd('DOM.enable')
|
290
|
-
devtools.send_cmd('Page.enable')
|
291
|
-
devtools.send_cmd('Log.enable')
|
292
|
-
devtools.send_cmd('Debugger.enable')
|
293
|
-
|
294
|
-
js_exp = {
|
295
|
-
expression: js
|
296
|
-
}
|
297
|
-
|
298
|
-
devtools.send_cmd('Runtime.evaluate', **js_exp)
|
308
|
+
browser_obj
|
299
309
|
rescue StandardError => e
|
300
310
|
raise e
|
301
311
|
end
|
@@ -388,6 +398,218 @@ module PWN
|
|
388
398
|
raise e
|
389
399
|
end
|
390
400
|
|
401
|
+
# Supported Method Parameters::
|
402
|
+
# console_resp = PWN::Plugins::TransparentBrowser.console(
|
403
|
+
# browser_obj: browser_obj1,
|
404
|
+
# js: 'required - JavaScript expression to evaluate'
|
405
|
+
# )
|
406
|
+
|
407
|
+
public_class_method def self.console(opts = {})
|
408
|
+
browser_obj = opts[:browser_obj]
|
409
|
+
verify_devtools_browser(browser_obj: browser_obj)
|
410
|
+
|
411
|
+
js = opts[:js] ||= "alert('ACK from => #{self}')"
|
412
|
+
|
413
|
+
browser = browser_obj[:browser]
|
414
|
+
case js
|
415
|
+
when 'debugger', 'debugger;', 'debugger()', 'debugger();'
|
416
|
+
Timeout.timeout(1) { console_resp = browser.execute_script('debugger') }
|
417
|
+
when 'clear', 'clear;', 'clear()', 'clear();'
|
418
|
+
console_resp = browser.execute_script('console.clear()')
|
419
|
+
else
|
420
|
+
console_resp = browser.execute_script("console.log(#{js})")
|
421
|
+
end
|
422
|
+
|
423
|
+
console_resp
|
424
|
+
rescue Timeout::Error, Timeout::ExitException
|
425
|
+
console_resp
|
426
|
+
rescue StandardError => e
|
427
|
+
raise e
|
428
|
+
end
|
429
|
+
|
430
|
+
# Supported Method Parameters::
|
431
|
+
# tabs = PWN::Plugins::TransparentBrowser.list_tabs(
|
432
|
+
# browser_obj: 'required - browser_obj returned from #open method)'
|
433
|
+
# )
|
434
|
+
|
435
|
+
public_class_method def self.list_tabs(opts = {})
|
436
|
+
browser_obj = opts[:browser_obj]
|
437
|
+
verify_devtools_browser(browser_obj: browser_obj)
|
438
|
+
|
439
|
+
browser = browser_obj[:browser]
|
440
|
+
browser.windows.map do |tab|
|
441
|
+
active = false
|
442
|
+
active = true if browser.title == tab.title && browser.url == tab.url
|
443
|
+
{ title: tab.title, url: tab.url, active: active }
|
444
|
+
end
|
445
|
+
rescue StandardError => e
|
446
|
+
raise e
|
447
|
+
end
|
448
|
+
|
449
|
+
# Supported Method Parameters::
|
450
|
+
# browser_obj1 = PWN::Plugins::TransparentBrowser.switch_tab(
|
451
|
+
# browser_obj: 'required - browser_obj returned from #open method)',
|
452
|
+
# keyword: 'required - keyword in title or url used to switch tabs'
|
453
|
+
# )
|
454
|
+
|
455
|
+
public_class_method def self.switch_tab(opts = {})
|
456
|
+
browser_obj = opts[:browser_obj]
|
457
|
+
verify_devtools_browser(browser_obj: browser_obj)
|
458
|
+
|
459
|
+
keyword = opts[:keyword]
|
460
|
+
raise 'ERROR: keyword parameter is required' if keyword.nil?
|
461
|
+
|
462
|
+
browser = browser_obj[:browser]
|
463
|
+
all_tabs = browser.windows
|
464
|
+
all_tabs.select { |tab| tab.use if tab.title.include?(keyword) || tab.url.include?(keyword) }
|
465
|
+
rescue StandardError => e
|
466
|
+
raise e
|
467
|
+
end
|
468
|
+
|
469
|
+
# Supported Method Parameters::
|
470
|
+
# browser_obj1 = PWN::Plugins::TransparentBrowser.new_tab(
|
471
|
+
# browser_obj: 'required - browser_obj returned from #open method)',
|
472
|
+
# url: 'optional - URL to navigate to after opening new tab (Defaults to nil)'
|
473
|
+
# )
|
474
|
+
|
475
|
+
public_class_method def self.new_tab(opts = {})
|
476
|
+
browser_obj = opts[:browser_obj]
|
477
|
+
verify_devtools_browser(browser_obj: browser_obj)
|
478
|
+
|
479
|
+
url = opts[:url]
|
480
|
+
|
481
|
+
browser = browser_obj[:browser]
|
482
|
+
browser.execute_script('window.open()')
|
483
|
+
switch_tab(browser_obj: browser_obj, keyword: 'about:blank')
|
484
|
+
rand_tab = SecureRandom.hex(8)
|
485
|
+
browser.execute_script("document.title = '#{rand_tab}'")
|
486
|
+
browser.goto(url) unless url.nil?
|
487
|
+
rescue StandardError => e
|
488
|
+
raise e
|
489
|
+
end
|
490
|
+
|
491
|
+
# Supported Method Parameters::
|
492
|
+
# browser_obj1 = PWN::Plugins::TransparentBrowser.close_tab(
|
493
|
+
# browser_obj: 'required - browser_obj returned from #open method)'
|
494
|
+
# keyword: 'required - keyword in title or url used to close tabs'
|
495
|
+
# )
|
496
|
+
|
497
|
+
public_class_method def self.close_tab(opts = {})
|
498
|
+
browser_obj = opts[:browser_obj]
|
499
|
+
verify_devtools_browser(browser_obj: browser_obj)
|
500
|
+
|
501
|
+
keyword = opts[:keyword]
|
502
|
+
raise 'ERROR: keyword parameter is required' if keyword.nil?
|
503
|
+
|
504
|
+
browser = browser_obj[:browser]
|
505
|
+
all_tabs = browser.windows
|
506
|
+
all_tabs.select { |tab| tab.close if tab.title.include?(keyword) || tab.url.include?(keyword) }
|
507
|
+
rescue StandardError => e
|
508
|
+
raise e
|
509
|
+
end
|
510
|
+
|
511
|
+
# Supported Method Parameters::
|
512
|
+
# browser_obj1 = PWN::Plugins::TransparentBrowser.debugger(
|
513
|
+
# browser_obj: 'required - browser_obj returned from #open method)',
|
514
|
+
# action: 'optional - action to take :pause|:resume (Defaults to :pause)',
|
515
|
+
# url: 'optional - URL to navigate to after pausing debugger (Defaults to nil)'
|
516
|
+
# )
|
517
|
+
|
518
|
+
public_class_method def self.debugger(opts = {})
|
519
|
+
browser_obj = opts[:browser_obj]
|
520
|
+
supported = %i[chrome headless_chrome]
|
521
|
+
verify_devtools_browser(browser_obj: browser_obj, supported: supported)
|
522
|
+
browser = browser_obj[:browser]
|
523
|
+
action = opts[:action] ||= :pause
|
524
|
+
url = opts[:url]
|
525
|
+
|
526
|
+
devtools = browser_obj[:devtools]
|
527
|
+
|
528
|
+
case action.to_s.downcase.to_sym
|
529
|
+
when :pause
|
530
|
+
console(browser_obj: browser_obj, js: 'debugger')
|
531
|
+
|
532
|
+
# devtools.send_cmd('Debugger.enable')
|
533
|
+
# devtools.send_cmd(
|
534
|
+
# 'Debugger.setInstrumentationBreakpoint',
|
535
|
+
# instrumentation: 'beforeScriptExecution'
|
536
|
+
# )
|
537
|
+
|
538
|
+
# devtools.send_cmd(
|
539
|
+
# 'EventBreakpoints.setInstrumentationBreakpoint',
|
540
|
+
# eventName: 'load'
|
541
|
+
# )
|
542
|
+
|
543
|
+
# devtools.send_cmd(
|
544
|
+
# 'Debugger.setPauseOnExceptions',
|
545
|
+
# state: 'all'
|
546
|
+
# )
|
547
|
+
|
548
|
+
begin
|
549
|
+
Timeout.timeout(1) do
|
550
|
+
browser.refresh if url.nil?
|
551
|
+
browser.goto(url) unless url.nil?
|
552
|
+
end
|
553
|
+
rescue Timeout::Error
|
554
|
+
url
|
555
|
+
end
|
556
|
+
when :resume
|
557
|
+
devtools.send_cmd('Debugger.resume')
|
558
|
+
else
|
559
|
+
raise 'ERROR: action parameter must be :pause or :resume'
|
560
|
+
end
|
561
|
+
rescue StandardError => e
|
562
|
+
raise e
|
563
|
+
end
|
564
|
+
|
565
|
+
# Supported Method Parameters::
|
566
|
+
# browser_obj1 = PWN::Plugins::TransparentBrowser.step_into(
|
567
|
+
# browser_obj: 'required - browser_obj returned from #open method)'
|
568
|
+
# )
|
569
|
+
|
570
|
+
public_class_method def self.step_into(opts = {})
|
571
|
+
browser_obj = opts[:browser_obj]
|
572
|
+
supported = %i[chrome headless_chrome]
|
573
|
+
verify_devtools_browser(browser_obj: browser_obj, supported: supported)
|
574
|
+
|
575
|
+
devtools = browser_obj[:devtools]
|
576
|
+
devtools.send_cmd('Debugger.stepInto')
|
577
|
+
rescue StandardError => e
|
578
|
+
raise e
|
579
|
+
end
|
580
|
+
|
581
|
+
# Supported Method Parameters::
|
582
|
+
# browser_obj1 = PWN::Plugins::TransparentBrowser.step_out(
|
583
|
+
# browser_obj: 'required - browser_obj returned from #open method)'
|
584
|
+
# )
|
585
|
+
|
586
|
+
public_class_method def self.step_out(opts = {})
|
587
|
+
browser_obj = opts[:browser_obj]
|
588
|
+
supported = %i[chrome headless_chrome]
|
589
|
+
verify_devtools_browser(browser_obj: browser_obj, supported: supported)
|
590
|
+
|
591
|
+
devtools = browser_obj[:devtools]
|
592
|
+
devtools.send_cmd('Debugger.stepOut')
|
593
|
+
rescue StandardError => e
|
594
|
+
raise e
|
595
|
+
end
|
596
|
+
|
597
|
+
# Supported Method Parameters::
|
598
|
+
# browser_obj1 = PWN::Plugins::TransparentBrowser.step_over(
|
599
|
+
# browser_obj: 'required - browser_obj returned from #open method)'
|
600
|
+
# )
|
601
|
+
|
602
|
+
public_class_method def self.step_over(opts = {})
|
603
|
+
browser_obj = opts[:browser_obj]
|
604
|
+
supported = %i[chrome headless_chrome]
|
605
|
+
verify_devtools_browser(browser_obj: browser_obj, supported: supported)
|
606
|
+
|
607
|
+
devtools = browser_obj[:devtools]
|
608
|
+
devtools.send_cmd('Debugger.stepOver')
|
609
|
+
rescue StandardError => e
|
610
|
+
raise e
|
611
|
+
end
|
612
|
+
|
391
613
|
# Supported Method Parameters::
|
392
614
|
# browser_obj1 = PWN::Plugins::TransparentBrowser.close(
|
393
615
|
# browser_obj: 'required - browser_obj returned from #open method)'
|
@@ -513,11 +735,6 @@ module PWN
|
|
513
735
|
* End of DevTools Examples
|
514
736
|
********************************************************
|
515
737
|
|
516
|
-
console_resp = #{self}.devtools_console(
|
517
|
-
browser_obj: 'required - browser_obj returned from #open method)',
|
518
|
-
js: 'required - JavaScript expression to evaluate'
|
519
|
-
)
|
520
|
-
|
521
738
|
browser_obj1 = #{self}.dump_links(
|
522
739
|
browser_obj: 'required - browser_obj returned from #open method)'
|
523
740
|
)
|
@@ -532,6 +749,47 @@ module PWN
|
|
532
749
|
rand_sleep_float: 'optional - float timing in between keypress (defaults to 0.09)'
|
533
750
|
) {|char| browser_obj1.text_field(name: \"search\").send_keys(char) }
|
534
751
|
|
752
|
+
console_resp = #{self}.console(
|
753
|
+
browser_obj: 'required - browser_obj returned from #open method)',
|
754
|
+
js: 'required - JavaScript expression to evaluate'
|
755
|
+
)
|
756
|
+
|
757
|
+
tabs = #{self}.list_tabs(
|
758
|
+
browser_obj: 'required - browser_obj returned from #open method)'
|
759
|
+
)
|
760
|
+
|
761
|
+
browser_obj1 = #{self}.switch_tab(
|
762
|
+
browser_obj: 'required - browser_obj returned from #open method)',
|
763
|
+
keyword: 'required - keyword in title or url used to switch tabs'
|
764
|
+
)
|
765
|
+
|
766
|
+
browser_obj1 = #{self}.new_tab(
|
767
|
+
browser_obj: 'required - browser_obj returned from #open method)'
|
768
|
+
)
|
769
|
+
|
770
|
+
browser_obj1 = #{self}.close_tab(
|
771
|
+
browser_obj: 'required - browser_obj returned from #open method)',
|
772
|
+
keyword: 'required - keyword in title or url used to close tabs'
|
773
|
+
)
|
774
|
+
|
775
|
+
browser_obj1 = #{self}.debugger(
|
776
|
+
browser_obj: 'required - browser_obj returned from #open method)',
|
777
|
+
action: 'optional - action to take :pause|:resume (Defaults to :pause)',
|
778
|
+
url: 'optional - URL to navigate to after pausing debugger (Defaults to nil)'
|
779
|
+
)
|
780
|
+
|
781
|
+
browser_obj1 = #{self}.step_into(
|
782
|
+
browser_obj: 'required - browser_obj returned from #open method)'
|
783
|
+
)
|
784
|
+
|
785
|
+
browser_obj1 = #{self}.step_out(
|
786
|
+
browser_obj: 'required - browser_obj returned from #open method)'
|
787
|
+
)
|
788
|
+
|
789
|
+
browser_obj1 = #{self}.step_over(
|
790
|
+
browser_obj: 'required - browser_obj returned from #open method)'
|
791
|
+
)
|
792
|
+
|
535
793
|
browser_obj1 = #{self}.close(
|
536
794
|
browser_obj: 'required - browser_obj returned from #open method)'
|
537
795
|
)
|
data/lib/pwn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.173
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 0day Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 2.5.
|
131
|
+
version: 2.5.14
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 2.5.
|
138
|
+
version: 2.5.14
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: bundler-audit
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -436,14 +436,14 @@ dependencies:
|
|
436
436
|
requirements:
|
437
437
|
- - '='
|
438
438
|
- !ruby/object:Gem::Version
|
439
|
-
version: 2.8.
|
439
|
+
version: 2.8.2
|
440
440
|
type: :runtime
|
441
441
|
prerelease: false
|
442
442
|
version_requirements: !ruby/object:Gem::Requirement
|
443
443
|
requirements:
|
444
444
|
- - '='
|
445
445
|
- !ruby/object:Gem::Version
|
446
|
-
version: 2.8.
|
446
|
+
version: 2.8.2
|
447
447
|
- !ruby/object:Gem::Dependency
|
448
448
|
name: libusb
|
449
449
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1024,14 +1024,14 @@ dependencies:
|
|
1024
1024
|
requirements:
|
1025
1025
|
- - '='
|
1026
1026
|
- !ruby/object:Gem::Version
|
1027
|
-
version: 0.
|
1027
|
+
version: 0.126.0
|
1028
1028
|
type: :runtime
|
1029
1029
|
prerelease: false
|
1030
1030
|
version_requirements: !ruby/object:Gem::Requirement
|
1031
1031
|
requirements:
|
1032
1032
|
- - '='
|
1033
1033
|
- !ruby/object:Gem::Version
|
1034
|
-
version: 0.
|
1034
|
+
version: 0.126.0
|
1035
1035
|
- !ruby/object:Gem::Dependency
|
1036
1036
|
name: serialport
|
1037
1037
|
requirement: !ruby/object:Gem::Requirement
|
@@ -2320,7 +2320,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2320
2320
|
- !ruby/object:Gem::Version
|
2321
2321
|
version: '0'
|
2322
2322
|
requirements: []
|
2323
|
-
rubygems_version: 3.5.
|
2323
|
+
rubygems_version: 3.5.14
|
2324
2324
|
signing_key:
|
2325
2325
|
specification_version: 4
|
2326
2326
|
summary: Automated Security Testing for CI/CD Pipelines & Beyond
|