(Fixes issue 144) Update a Zombies IP on change and log the event

git-svn-id: https://beef.googlecode.com/svn/trunk@982 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
xntrik
2011-05-20 13:14:12 +00:00
parent 31069c0947
commit dc36f53e04

View File

@@ -52,6 +52,12 @@ module Handlers
# record the last poll from the browser
hooked_browser.lastseen = Time.new.to_i
# Check for a change in zombie IP and log an event
if hooked_browser.ip != @request.peeraddr[3].to_s
BeEF::Core::Logger.instance.register('Zombie',"IP address has changed from #{hooked_browser.ip} to #{@request.peeraddr[3].to_s}","#{hooked_browser.id}")
hooked_browser.ip = @request.peeraddr[3].to_s
end
hooked_browser.count!
hooked_browser.save