checking to see if it passes with websockets diabl

This commit is contained in:
Josh
2020-04-27 21:56:43 -07:00
parent 696e6b7633
commit cbae450b10
2 changed files with 6 additions and 13 deletions

View File

@@ -114,9 +114,11 @@ 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}"
p response
details = JSON.parse(response.body)
p details
expect(@driver.browser.to_s.downcase).to eq(details['browser.name.friendly'].downcase).or eq('internet_explorer').or eq('msedge')
end
end

View File

@@ -20,8 +20,8 @@ RSpec.describe 'Browser hooking with Websockets', :run_on_browserstack => true d
p "This is the /n #@config "
@config.set('beef.credentials.user', "beef")
@config.set('beef.credentials.passwd', "beef")
@config.set('beef.http.websocket.secure', true)
@config.set('beef.http.websocket.enable', true)
# @config.set('beef.http.websocket.secure', true)
# @config.set('beef.http.websocket.enable', true)
@username = @config.get('beef.credentials.user')
p "This is the /n #@username "
@password = @config.get('beef.credentials.passwd')
@@ -46,7 +46,7 @@ RSpec.describe 'Browser hooking with Websockets', :run_on_browserstack => true d
# Grab DB file and regenerate if requested
print_info "Loading database"
db_file = @config.get('beef.database.file')
p db_file
if BeEF::Core::Console::CommandLine.parse[:resetdb]
print_info 'Resetting the database for BeEF.'
File.delete(db_file) if File.exists?(db_file)
@@ -118,13 +118,4 @@ RSpec.describe 'Browser hooking with Websockets', :run_on_browserstack => true d
it 'can successfully hook a browser' do
expect(@hooks['hooked-browsers']['online']).not_to be_empty
end
it 'can hook a browser via websocket' do
print_info "Getting browser details"
response = RestClient.get "#{RESTAPI_HOOKS}/#{@session}?token=#{@token}"
p response
details = JSON.parse(response.body)
p details
expect(@driver.browser.to_s.downcase).to eq(details['browser.name.friendly'].downcase).or eq('internet_explorer').or eq('msedge')
end
end