diff --git a/spec/beef/core/main/handlers/browser_details_handler_spec.rb b/spec/beef/core/main/handlers/browser_details_handler_spec.rb index 4fff9d6df..d58dc1f69 100644 --- a/spec/beef/core/main/handlers/browser_details_handler_spec.rb +++ b/spec/beef/core/main/handlers/browser_details_handler_spec.rb @@ -95,9 +95,7 @@ RSpec.describe 'Browser Details Handler', run_on_browserstack: true do sleep 1 until wait.until { @driver.execute_script('return window.beef.session.get_hook_session_id().length') > 0 } - @hook_request = RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}" - @hooks = JSON.parse(@hook_request) - @session = @hooks['hooked-browsers']['online'][0]['session'] + @session = @driver.execute_script('return window.beef.session.get_hook_session_id().length') rescue StandardError => e print_info "Exception: #{e}" print_info "Exception Class: #{e.class}" diff --git a/spec/beef/modules/debug/test_beef_debugs_spec.rb b/spec/beef/modules/debug/test_beef_debugs_spec.rb index fe5c2169b..b950e72a7 100644 --- a/spec/beef/modules/debug/test_beef_debugs_spec.rb +++ b/spec/beef/modules/debug/test_beef_debugs_spec.rb @@ -94,9 +94,6 @@ RSpec.describe 'BeEF Debug Command Modules:', run_on_browserstack: true do sleep 1 until wait.until { @driver.execute_script('return window.beef.session.get_hook_session_id().length') > 0 } - @hook_request = RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}" - @hooks = JSON.parse(@hook_request) - @session = @driver.execute_script('return window.beef.session.get_hook_session_id()') # Grab Command Module IDs as they can differ from machine to machine