updated websocket

This commit is contained in:
Josh
2020-04-27 22:18:34 -07:00
parent cbae450b10
commit 993b288c47

View File

@@ -20,8 +20,9 @@ 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', false)
@config.set('beef.http.websocket.enable', true)
@ws = BeEF::Core::Websocket::Websocket.instance
@username = @config.get('beef.credentials.user')
p "This is the /n #@username "
@password = @config.get('beef.credentials.passwd')
@@ -115,6 +116,21 @@ RSpec.describe 'Browser hooking with Websockets', :run_on_browserstack => true d
Process.kill("KILL",@pids)
end
it 'confirms a websocket server has been started' do
p @ws
expect(@ws).to be_a_kind_of(BeEF::Core::Websocket::Websocket)
end
it 'confirms a secure websocket server has been started' do
@config.set('beef.http.websocket.secure', true)
wss = BeEF::Core::Websocket::Websocket.instance
p wss
expect(wss).to be_a_kind_of(BeEF::Core::Websocket::Websocket)
end
it 'can successfully hook a browser' do
expect(@hooks['hooked-browsers']['online']).not_to be_empty
end