Checking if another auth method helps solve browser details issue.
This commit is contained in:
@@ -18,7 +18,7 @@ beef:
|
||||
# Used by both the RESTful API and the Admin interface
|
||||
credentials:
|
||||
user: "beef"
|
||||
passwd: "beef"
|
||||
passwd: "beef1"
|
||||
|
||||
# Interface / IP restrictions
|
||||
restrictions:
|
||||
|
||||
@@ -62,7 +62,7 @@ RSpec.describe 'Browser Details Handler', run_on_browserstack: true do
|
||||
http_hook_server.prepare
|
||||
|
||||
# Generate a token for the server to respond with
|
||||
@token = BeEF::Core::Crypto.api_token
|
||||
BeEF::Core::Crypto.api_token
|
||||
|
||||
# Initiate server start-up
|
||||
@pids = fork do
|
||||
@@ -130,7 +130,8 @@ RSpec.describe 'Browser Details Handler', run_on_browserstack: true do
|
||||
|
||||
it 'browser details handler working' do
|
||||
print_info 'Getting browser details'
|
||||
response = RestClient.get "#{RESTAPI_HOOKS}/#{@session}?token=#{@token}"
|
||||
token = JSON.parse(RestClient.post "#{RESTAPI_ADMIN}/login", { 'username': "#{@username}", 'password': "#{@password}" }.to_json, :content_type => :json)['token']
|
||||
response = RestClient.get "#{RESTAPI_HOOKS}/#{@session}?token=#{token}"
|
||||
details = JSON.parse(response.body)
|
||||
|
||||
browser_name = if details['browser.name.friendly'].downcase == 'internet explorer'
|
||||
|
||||
Reference in New Issue
Block a user