lib/pwn/www/duckduckgo.rb in pwn-0.4.378 vs lib/pwn/www/duckduckgo.rb in pwn-0.4.380
- old
+ new
@@ -10,41 +10,11 @@
# proxy: 'optional - scheme://proxy_host:port',
# with_tor: 'optional - boolean (defaults to false)'
# )
public_class_method def self.open(opts = {})
- browser_type = if opts[:browser_type].nil?
- :firefox
- else
- opts[:browser_type]
- end
+ browser_obj = PWN::Plugins::TransparentBrowser.open(opts)
- proxy = opts[:proxy].to_s unless opts[:proxy].nil?
-
- with_tor = if opts[:with_tor]
- true
- else
- false
- end
-
- if proxy
- if with_tor
- browser_obj = PWN::Plugins::TransparentBrowser.open(
- browser_type: browser_type,
- proxy: proxy,
- with_tor: true
- )
- else
- browser_obj = PWN::Plugins::TransparentBrowser.open(
- browser_type: browser_type,
- proxy: proxy
- )
- end
- else
- browser_obj = PWN::Plugins::TransparentBrowser.open(
- browser_type: browser_type
- )
- end
browser_obj.goto('https://duckduckgo.com')
browser_obj
rescue StandardError => e
raise e