Revert "fixing issue #1852"

This reverts commit 375c0d9b8b.
This commit is contained in:
Haoxi Tan
2020-01-16 11:24:11 +10:00
parent 375c0d9b8b
commit 7d9a235bbf
3 changed files with 11 additions and 28 deletions

View File

@@ -29,7 +29,6 @@ module BeEF
# validate hook session value
session_id = get_param(@data, 'beefhook')
print_debug "[INIT] Processing Browser Details for session #{session_id}"
(self.err_msg "session id is invalid"; return) if not BeEF::Filters.is_valid_hook_session_id?(session_id)
hooked_browser = HB.where(:session => session_id).first
return if not hooked_browser.nil? # browser is already registered with framework
@@ -405,20 +404,6 @@ module BeEF
self.err_msg "Invalid value for 'browser.window.size.width' returned from the hook browser's initial connection."
end
# store and log IP details of host
print_debug("Hooked browser [id:#{zombie.id}] has IP [ip: #{zombie.ip}]")
if os_name != nil and os_version != nil
BeEF::Core::Models::NetworkHost.create(:hooked_browser => zombie, :ip => zombie.ip, :ntype => 'Host', :os => os_name + "-" + os_version)
elsif os_name != nil
BeEF::Core::Models::NetworkHost.create(:hooked_browser => zombie, :ip => zombie.ip, :ntype => 'Host', :os => os_name)
else
BeEF::Core::Models::NetworkHost.create(:hooked_browser => zombie, :ip => zombie.ip, :ntype => 'Host')
end
# get and store the yes|no value for browser capabilities
capabilities = [
'browser.capabilities.vbscript',