This is it

This commit is contained in:
Jack Walker
2020-04-22 15:41:55 +10:00
parent 1df856bd30
commit 96ef0f3d9a
4 changed files with 27 additions and 27 deletions

View File

@@ -86,17 +86,6 @@ RSpec.describe 'AutoRunEngine test' do
# Authenticate to REST API & pull the token from the response
@response = RestClient.post "#{RESTAPI_ADMIN}/login", { 'username': "#{@username}", 'password': "#{@password}" }.to_json, :content_type => :json
@token = JSON.parse(@response)['token']
# Hook new victim
print_info 'Hooking a new victim, waiting a few seconds...'
@victim = @driver.navigate.to "#{VICTIM_URL}"
# Give time for browser hook to occur
sleep 2
# Identify Session ID of victim generated above
@hooks = RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}"
@session = JSON.parse(@hooks)['hooked-browsers']['online']['0']['session']
end
after(:all) do

View File

@@ -80,16 +80,16 @@ RSpec.describe 'Browser details handler' do
@response = RestClient.post "#{RESTAPI_ADMIN}/login", { 'username': "#{@username}", 'password': "#{@password}" }.to_json, :content_type => :json
@token = JSON.parse(@response)['token']
# Hook new victim
print_info 'Hooking a new victim, waiting a few seconds...'
@victim = @driver.navigate.to "#{VICTIM_URL}"
# # Hook new victim
# print_info 'Hooking a new victim, waiting a few seconds...'
# @victim = @driver.navigate.to "#{VICTIM_URL}"
# Give time for browser hook to occur
sleep 2
# # Give time for browser hook to occur
# sleep 2
# Identify Session ID of victim generated above
@hooks = RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}"
@session = JSON.parse(@hooks)['hooked-browsers']['online']['0']['session']
# # Identify Session ID of victim generated above
# @hooks = RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}"
# @session = JSON.parse(@hooks)['hooked-browsers']['online']['0']['session']
end
after(:all) do

View File

@@ -88,16 +88,16 @@ RSpec.describe 'BeEF Debug Command Modules:' do
@debug_mod_names_ids[debug_mod[1]['class']] = debug_mod[0]
end
# Hook new victim
print_info 'Hooking a new victim, waiting a few seconds...'
@victim = @driver.navigate.to "#{VICTIM_URL}"
# # Hook new victim
# print_info 'Hooking a new victim, waiting a few seconds...'
# @victim = @driver.navigate.to "#{VICTIM_URL}"
# Give time for browser hook to occur
sleep 2
# # Give time for browser hook to occur
# sleep 2
# Identify Session ID of victim generated above
@hooks = RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}"
@session = JSON.parse(@hooks)['hooked-browsers']['online']['0']['session']
# # Identify Session ID of victim generated above
# @hooks = RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}"
# @session = JSON.parse(@hooks)['hooked-browsers']['online']['0']['session']
end
after(:all) do

View File

@@ -87,6 +87,17 @@ RSpec.configure do |config|
:url => "http://#{CONFIG['user']}:#{CONFIG['key']}@#{CONFIG['server']}/wd/hub",
:desired_capabilities => @caps)
# Hook new victim
print_info 'Hooking a new victim, waiting a few seconds...'
@driver.navigate.to "#{VICTIM_URL}"
# Give time for browser hook to occur
sleep 2
# Identify Session ID of victim generated above
@hooks = RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}"
@session = JSON.parse(@hooks)['hooked-browsers']['online']['0']['session']
begin
example.run
ensure