Simple referrer spoofing php script

maribge

Junior Member
Joined
May 6, 2007
Messages
106
Reaction score
22
Ok, I know there are some referrer faking scripts on the BHW, yet you may find it useful. I wrote it on PHP. You just need to change the landing page URL.
 

Attachments

so we edit this http://destinationdomain.com/landingpage.php?a=10&b=20 to what we want the referrer to be and then upload this file to our site and it will work?

That's right, provided that you direct traffic directly to simplerelocator.php file. If you want to direct your traffic to a different file, than just put this piece of code at the top of the page:

<?php
include("simplerelocator.php");
?>

In this case the "simplerelocator.php" should be in the same directory as the main file, or just put the entire path:

<?php
include("path/to/thefile/simplerelocator.php");
?>
 
Last edited:
I've made a twist on the script. Now it allows you to dynamically change landing pages.

Here is the description, which can be found in the file as well:

"$landingURL" specifies the final destination URL.
You can override this variable by sending this script an HTTP GET request
with an "ur" parameter and a valid destination URL value.

Example:

This script "simplerelocator.php" is hosted on http://domainone.com and
the URL is http://domainone.com/simplerelocator.php

If a user goes to http://domainone.com/simplerelocator.php he'll be redirected
to the URL specified in the "$landingURL" variable.

But if a user goes to http://domainone.com/simplerelocator.php?ur=http://anotherdomain.com/newlandingpage.html
he'll be redirected to http://anotherdomain.com/newlandingpage.html

This is useful when you need to change landing pages dynamically.

Advanced redirect:

If you need to redirect to a URL with a query string like this:
http://anotherdomain.com/newlandingpage.php?a=10&b20

than the redirect string in "ur" parameter should look like this:
http://domainone.com/simplerelocator.php?ur=http://anotherdomain.com/newlandingpage.php?a=10%26b20

here you have to replace each "&" sign after "ur=" with a "%26" string to make the redirect work properly.
 

Attachments

Hmm does not seem to be working... I think it might be a problem with my browser tho.
 
Mozilla/5.0 Ubuntu/9.04 (jaunty) Firefox/3.0.11

I just get a blank page when I try to load it and xulrunner errors are logged to the console when I try to view the blank page's source. I think Its something to do with my browser not liking this redirect method (and <body onLoad> in certain cases. I've had this problem with some js before).
 
Mozilla/5.0 Ubuntu/9.04 (jaunty) Firefox/3.0.11

I just get a blank page when I try to load it and xulrunner errors are logged to the console when I try to view the blank page's source. I think Its something to do with my browser not liking this redirect method (and <body onLoad> in certain cases. I've had this problem with some js before).

That's a problem with js.
 
Back
Top