Forced session identification to be performed client side. Server-side response too flakey atm. Cleaned up code.

This commit is contained in:
Jack Walker
2020-05-27 20:02:05 +10:00
parent 053c98cc60
commit f7e46c5994
2 changed files with 1 additions and 6 deletions

View File

@@ -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}"

View File

@@ -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