Use filters

This commit is contained in:
Brendan Coles
2015-02-04 08:36:44 +00:00
parent f329c7331a
commit c099be75ed
10 changed files with 29 additions and 19 deletions

View File

@@ -33,7 +33,7 @@ class Get_http_servers < BeEF::Core::Command
url = $4
session_id = @datastore['beefhook']
cid = @datastore['cid'].to_i
if !ip.nil?
if !ip.nil? && BeEF::Filters.is_valid_ip?(ip)
print_debug("Hooked browser found HTTP Server [proto: #{proto}, ip: #{ip}, port: #{port}]")
r = BeEF::Core::Models::NetworkService.new(:hooked_browser_id => session_id, :proto => proto, :ip => ip, :port => port, :type => "HTTP Server", :cid => cid)
r.save