From dc36f53e04314efddbbd7b1778d4c7391dd87538 Mon Sep 17 00:00:00 2001 From: xntrik Date: Fri, 20 May 2011 13:14:12 +0000 Subject: [PATCH] (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 --- core/main/handlers/hookedbrowsers.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/main/handlers/hookedbrowsers.rb b/core/main/handlers/hookedbrowsers.rb index 7ebe67f29..823e3197d 100644 --- a/core/main/handlers/hookedbrowsers.rb +++ b/core/main/handlers/hookedbrowsers.rb @@ -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