Hook.js load websocket.js only if specifield in beef configuration file

if websocket is disabled all work normally
 if websocket is enabled have trouble in command.rb
This commit is contained in:
Graziano Felline
2012-04-12 19:01:49 +02:00
parent af9b3c97b5
commit 23f782b8d8
10 changed files with 105 additions and 97 deletions

View File

@@ -16,9 +16,13 @@
module BeEF
module Core
module Websocket
class Websocket
#all hooked browser
require 'singleton'
class Websocket
# require 'singleton'
#include Singleton
#all hooked browser
include Singleton
@@activeSocket= Hash.new #empty at begin
@@ -46,7 +50,7 @@ module BeEF
if(/BEEFHOOK=/.match(message))
print_info("Browser #{ws.origin} says helo! ws is running")
#insert new connection in activesocket
@@activeSocket[message.split(/BEEFHOOK=/)] = ws
@@activeSocket["#{message.split(/BEEFHOOK=/)}"] = ws
print_debug("In activesocket we have #{@@activeSocket}")
end
end