Missing key on hook variable assignment

This commit is contained in:
Jack Walker
2020-05-27 18:41:23 +10:00
parent 18e76512de
commit dbb6cb1332
2 changed files with 3 additions and 3 deletions

View File

@@ -102,7 +102,7 @@ RSpec.describe 'Browser Details Handler', :run_on_browserstack => true do
if @hooks['hooked-browsers']['online'].empty?
@session = @driver.execute_script("return window.beef.session.get_hook_session_id()")
else
@session = @hooks['hooked-browsers']['online'][0]
@session = @hooks['hooked-browsers']['online'][0]['session']
end
rescue => exception
print_info "Exception: #{exception}"

View File

@@ -98,11 +98,11 @@ RSpec.describe 'BeEF Debug Command Modules:', :run_on_browserstack => true do
@hook_request = RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}"
@hooks = JSON.parse(@hook_request)
if @hooks['hooked-browsers']['online'].empty?
@session = @driver.execute_script("return window.beef.session.get_hook_session_id()")
else
@session = @hooks['hooked-browsers']['online'][0]
@session = @hooks['hooked-browsers']['online'][0]['session']
end
# Grab Command Module IDs as they can differ from machine to machine