lib/pwn/plugins/transparent_browser.rb in pwn-0.5.175 vs lib/pwn/plugins/transparent_browser.rb in pwn-0.5.176

- old
+ new

@@ -460,11 +460,12 @@ raise 'ERROR: keyword parameter is required' if keyword.nil? browser = browser_obj[:browser] all_tabs = browser.windows tab = all_tabs.select { |tab| tab.use if tab.title.include?(keyword) || tab.url.include?(keyword) } - { title: tab.last.title, url: tab.last.url, active: active } unless tab.empty? + + { title: tab.last.title, url: tab.last.url, active: true } unless tab.empty? rescue StandardError => e raise e end # Supported Method Parameters:: @@ -484,10 +485,10 @@ switch_tab(browser_obj: browser_obj, keyword: 'about:blank') rand_tab = SecureRandom.hex(8) browser.execute_script("document.title = '#{rand_tab}'") browser.goto(url) unless url.nil? - { title: browser.title, url: browser.url, active: active } + { title: browser.title, url: browser.url, active: true } rescue StandardError => e raise e end # Supported Method Parameters::