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

No bullshit set your own referer

Discussion in 'Cloaking and Content Generators' started by shadowguy, Jan 5, 2010.

  1. shadowguy

    shadowguy Junior Member

    Joined:
    Nov 25, 2009
    Messages:
    125
    Likes Received:
    180
    Ok i don't *THINK* this have already been posted (I did a search), if so forgive me.

    --

    How to set your own referer?

    1) users click on myblackhatdomain.com (directly when e-whoring or from a link on youtube etc, it doesn't matter)



    2) code for myblackhatdomain.com (snippet found on BHW)
    Code:
    <?php if (!isset($_COOKIE["rand1"]) || $_COOKIE["rand1"] != "rand2") {
    
      setcookie("rand1", "rand2", time()+3600*24*365);
      ?>
    
      <html>
    
      <head>
      <title>My offer</title>
    
      </head>
      <body onload="document.form1.submit();">
    
      <form name="form1" id="form1" method="post" action="http://www.mywhitehatdomain.com/"></form>
      <script type="text/javascript">
      document.form1.submit();
      </script>
    
      <div style="padding: 30px; text-align: center;">
      <a href="http://www.mywhitehatdomain.com/">Click here to continue.</a>
      </div>
    
      </body>
      </html>
    
    <?php } ?>
    
    This also sets a cookie on the client that make the page work his redirection just the first time, useful so that if it's a pay per lead people don't starting using your domain instead of the proper one (this can get you caught).
    You can do other things with it (redirect to another affiliate page the second time the page is visited for example) or not using cookies at all.
    To delete cookies use only the HTML part of the code.



    3) users are redirected to mywhitehatdomain.com (or it can be a page in that domain like mywhitehatdomain.com/offername) sending the referer = http://www.myblackhatdomain.com (or http://www.myblackhatdomain.com/ for Internet explorer)



    4) now mywhitehatdomain.com is a legit page that will make your affiliate manager happy, if you go to it without being refered from myblackhatdomain.com you will see the normal page



    5) code for mywhitehatdomain.com
    Code:
    <?php if ( !isset($_SERVER['HTTP_REFERER']) || (($_SERVER['HTTP_REFERER'] != "http://www.myblackhatdomain.com/") && ($_SERVER['HTTP_REFERER'] != "http://www.myblackhatdomain.com")) ) { 
    ?>
    
    here goes the code of your "normal" page (can be a WP blog, your site..anything)
    
    <?php } else { ?>
    
    <html>
    
      <head>
      <title>My offer</title>
    
      </head>
      <body onload="document.form1.submit();">
    
      <form name="form1" id="form1" method="post" action="http://www.affiliatenetwork.com/youraffiliatelink/"></form>
      <script type="text/javascript">
      document.form1.submit();
      </script>
    
      <div style="padding: 30px; text-align: center;">
      <a href="http://www.affiliatenetwork.com/youraffiliatelink/">Click here to continue.</a>
      </div>
    
      </body>
      </html>
    
    <?php } ?>
    
    
    
    6) people are sent to affiliatenetwork.com/youraffiliatelink with your www.mywhitehatdomain.com referer



    7) profit.

    --

    So far works for all browsers with javascript enabled and it ALWAYS change referer to mywhitehatdomain.com WITHOUT having the user to click "click here to continue" (this happens only if he/she doesn't have javascript enabled)
    The process lasts a couple of seconds and users can see the urls changing in their url bar. This *doesn't* cloak url bar.
    I've tried Firefox 3, 3.5 - IE 6,7,8 and Chrome, on windows and linux.

    Of course it's better to set your own referer then just blank it ;)

    --

    Please spare a thanks if you like.
     
    • Thanks Thanks x 13
    Last edited: Jan 5, 2010
  2. buckz55

    buckz55 Junior Member

    Joined:
    Jan 4, 2010
    Messages:
    169
    Likes Received:
    13
    Does BHCB automatically do this for you ? I'm not understanding what exactly BHCB does ... does it blank or fake the referral ?

    Also , If your using the incentive content blocker BHCB on your blackhat site..... does it also have to be on your whitehat site too along with the same offers?
     
  3. AgentOrange_MkUltra

    AgentOrange_MkUltra Junior Member

    Joined:
    May 29, 2009
    Messages:
    180
    Likes Received:
    44
    Occupation:
    Hijacking Your System
    Location:
    Many steps ahead & Behind 4 Proxies + double VPN!
    can be done without form submission onload
     
  4. shadowguy

    shadowguy Junior Member

    Joined:
    Nov 25, 2009
    Messages:
    125
    Likes Received:
    180
    how exactly?
    that works in all browsers, that is
     
  5. shadowguy

    shadowguy Junior Member

    Joined:
    Nov 25, 2009
    Messages:
    125
    Likes Received:
    180
    hmm. pm me your bh domain perhaps.
    this works fine for me on multiple servers :\
     
  6. Grandslam

    Grandslam Senior Member

    Joined:
    Apr 23, 2009
    Messages:
    966
    Likes Received:
    313
    Can't CPAR take care of this easily? Or does it leak the referrer? I've always gotten paid when I've used it, but would like to hear other's experiences
     
  7. shadowguy

    shadowguy Junior Member

    Joined:
    Nov 25, 2009
    Messages:
    125
    Likes Received:
    180
    why don't you check yourself?

    just install livehttpheaders on firefox, fire it up and see what referer header your GET request has :)
     
  8. noph34r

    noph34r Regular Member

    Joined:
    Sep 17, 2009
    Messages:
    250
    Likes Received:
    211
    Occupation:
    The Web
    Location:
    The Web
    Home Page:
    Yes, CPA redirector (if well setup) takes care of this very clearly and use not obtrusive code. You can blank or fake the referrer.

    That onload event based function onload="document.form1.submit();" is horrible, reminds me the 90s DHTML.
    The only good thing is the cookies management.