Module: PWN::WWW::Torch
- Defined in:
- lib/pwn/www/torch.rb
Overview
This plugin supports Torch (Tor Search Engine) actions.
Class Method Summary collapse
-
.authors ⇒ Object
- Author(s)
-
0day Inc.
-
.close(opts = {}) ⇒ Object
- Supported Method Parameters
-
browser_obj = PWN::WWW::Torch.close( browser_obj: ‘required - browser_obj returned from #open method’ ).
-
.help ⇒ Object
Display Usage for this Module.
-
.onion ⇒ Object
- Supported Method Parameters
-
browser_obj = PWN::WWW::Torch.onion( browser_obj: ‘required - browser_obj returned from #open method’ ).
-
.open(opts = {}) ⇒ Object
- Supported Method Parameters
-
browser_obj = PWN::WWW::Torch.open( browser_type: ‘optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)’, proxy: ‘optional - scheme://proxy_host:port || tor’ ).
-
.search(opts = {}) ⇒ Object
- Supported Method Parameters
-
browser_obj = PWN::WWW::Torch.open( browser_obj: ‘required - browser_obj returned from #open method’, q: ‘required search string’ ).
Class Method Details
.authors ⇒ Object
- Author(s)
-
0day Inc. <[email protected]>
75 76 77 78 79 |
# File 'lib/pwn/www/torch.rb', line 75 public_class_method def self. "AUTHOR(S): 0day Inc. <[email protected]> " end |
.close(opts = {}) ⇒ Object
- Supported Method Parameters
-
browser_obj = PWN::WWW::Torch.close(
browser_obj: 'required - browser_obj returned from #open method'
)
64 65 66 67 68 69 70 71 |
# File 'lib/pwn/www/torch.rb', line 64 public_class_method def self.close(opts = {}) browser_obj = opts[:browser_obj] PWN::Plugins::TransparentBrowser.close( browser_obj: browser_obj ) rescue StandardError => e raise e end |
.help ⇒ Object
Display Usage for this Module
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/pwn/www/torch.rb', line 83 public_class_method def self.help puts "USAGE: browser_obj = #{self}.open( browser_type: 'optional :firefox|:chrome|:ie|:headless (Defaults to :firefox)', proxy: 'optional - scheme://proxy_host:port || tor' ) browser_obj = #{self}.open( q: 'required search string' ) browser_obj = #{self}.onion( browser_obj: 'required - browser_obj returned from #open method' ) browser_obj = #{self}.close( browser_obj: 'required - browser_obj returned from #open method' ) #{self}.authors " end |
.onion ⇒ Object
- Supported Method Parameters
-
browser_obj = PWN::WWW::Torch.onion(
browser_obj: 'required - browser_obj returned from #open method'
)
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/pwn/www/torch.rb', line 48 public_class_method def self.onion browser_obj = opts[:browser_obj] browser = browser_obj[:browser] browser.goto('http://xmh57jrzrnw6insl.onion') browser_obj rescue StandardError => e raise e end |
.open(opts = {}) ⇒ Object
- Supported Method Parameters
-
browser_obj = PWN::WWW::Torch.open(
browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)', proxy: 'optional - scheme://proxy_host:port || tor'
)
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/pwn/www/torch.rb', line 13 public_class_method def self.open(opts = {}) browser_obj = PWN::Plugins::TransparentBrowser.open(opts) browser = browser_obj[:browser] browser.goto('http://www.torchtorsearch.com') browser_obj rescue StandardError => e raise e end |
.search(opts = {}) ⇒ Object
- Supported Method Parameters
-
browser_obj = PWN::WWW::Torch.open(
browser_obj: 'required - browser_obj returned from #open method', q: 'required search string'
)
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/pwn/www/torch.rb', line 30 public_class_method def self.search(opts = {}) browser_obj = opts[:browser_obj] q = opts[:q].to_s browser = browser_obj[:browser] browser.text_field(name: 'q').wait_until(&:present?).set(q) browser.(name: 'cmd').click! browser_obj rescue StandardError => e raise e end |