Forced session identification to be performed client side. Server-side response too flakey atm. Cleaned up code.
This commit is contained in:
@@ -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}"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user