From d61b38edcb8b1bd255e2cf951a18f2d68675c6e5 Mon Sep 17 00:00:00 2001 From: Jack Walker Date: Thu, 23 Apr 2020 14:10:46 +1000 Subject: [PATCH] Is it only that API call failiing? --- .../extensions/websocket_hooked_browser_spec.rb | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/spec/beef/extensions/websocket_hooked_browser_spec.rb b/spec/beef/extensions/websocket_hooked_browser_spec.rb index 2adb93372..1a6279da4 100644 --- a/spec/beef/extensions/websocket_hooked_browser_spec.rb +++ b/spec/beef/extensions/websocket_hooked_browser_spec.rb @@ -78,14 +78,6 @@ RSpec.describe 'BeEF WebSockets: Browser Hooking', :run_on_browserstack => true # Give time for browser hook to occur sleep 2 - - # Grab Command Module IDs as they can differ from machine to machine - @debug_mod_ids = JSON.parse(RestClient.get "#{RESTAPI_MODULES}?token=#{@token}") - @debug_mod_names_ids = {} - @debug_mods = @debug_mod_ids.to_a.select { |cmd_mod| cmd_mod[1]['category'] == 'Debug' } - .map do |debug_mod| - @debug_mod_names_ids[debug_mod[1]['class']] = debug_mod[0] - end end after(:all) do @@ -102,10 +94,13 @@ RSpec.describe 'BeEF WebSockets: Browser Hooking', :run_on_browserstack => true it 'can hook a browser with websockets' do #prepare for the HTTP model https = BeEF::Core::Models::Http + + @debug_mod_ids = JSON.parse(RestClient.get "#{RESTAPI_MODULES}?token=#{@token}") + puts @hooks = JSON.parse(RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}") @session = @hooks['hooked-browsers']['online'] - + expect(@session).not_to be_empty https.where(:hooked_browser_id => @session['0']['session']).delete_all