Use filters
This commit is contained in:
@@ -24,9 +24,11 @@ class Detect_cups < BeEF::Core::Command
|
||||
port = $3
|
||||
session_id = @datastore['beefhook']
|
||||
cid = @datastore['cid'].to_i
|
||||
print_debug("Hooked browser found 'CUPS' [proto: #{proto}, ip: #{ip}, port: #{port}]")
|
||||
r = BeEF::Core::Models::NetworkService.new(:hooked_browser_id => session_id, :proto => proto, :ip => ip, :port => port, :type => 'CUPS', :cid => cid)
|
||||
r.save
|
||||
if BeEF::Filters.is_valid_ip?(ip)
|
||||
print_debug("Hooked browser found 'CUPS' [proto: #{proto}, ip: #{ip}, port: #{port}]")
|
||||
r = BeEF::Core::Models::NetworkService.new(:hooked_browser_id => session_id, :proto => proto, :ip => ip, :port => port, :type => 'CUPS', :cid => cid)
|
||||
r.save
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -24,6 +24,7 @@ class Get_internal_ip_webrtc < BeEF::Core::Command
|
||||
ips.uniq.each do |ip|
|
||||
next unless ip =~ /^[\d\.]+$/
|
||||
next if ip =~ /^0\.0\.0\.0$/
|
||||
next unless BeEF::Filters.is_valid_ip?(ip)
|
||||
print_debug("Hooked browser has network interface #{ip}")
|
||||
r = BeEF::Core::Models::NetworkHost.new(:hooked_browser_id => session_id, :ip => ip, :os => os, :cid => cid)
|
||||
r.save
|
||||
|
||||
Reference in New Issue
Block a user