1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Simple referrer spoofing php script

Discussion in 'Black Hat SEO' started by maribge, Jul 1, 2009.

  1. maribge

    maribge Junior Member

    Joined:
    May 6, 2007
    Messages:
    106
    Likes Received:
    11
    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.
     

    Attached Files:

    • Thanks Thanks x 1
  2. Jcsarokin

    Jcsarokin Power Member

    Joined:
    Mar 2, 2009
    Messages:
    718
    Likes Received:
    1,015
    Location:
    Los Angeles / Beverly Hills
  3. maribge

    maribge Junior Member

    Joined:
    May 6, 2007
    Messages:
    106
    Likes Received:
    11
    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: Jul 2, 2009
  4. maribge

    maribge Junior Member

    Joined:
    May 6, 2007
    Messages:
    106
    Likes Received:
    11
    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&b20

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

    Attached Files:

  5. Grizzy

    Grizzy Senior Member

    Joined:
    Nov 11, 2008
    Messages:
    919
    Likes Received:
    999
    Hmm does not seem to be working... I think it might be a problem with my browser tho.
     
  6. maribge

    maribge Junior Member

    Joined:
    May 6, 2007
    Messages:
    106
    Likes Received:
    11
    Which one of them?
     
  7. Grizzy

    Grizzy Senior Member

    Joined:
    Nov 11, 2008
    Messages:
    919
    Likes Received:
    999
    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).
     
  8. maribge

    maribge Junior Member

    Joined:
    May 6, 2007
    Messages:
    106
    Likes Received:
    11
    That's a problem with js.