windows auditing
+ Reply to Thread
Results 1 to 1 of 1

Thread: Fake Referrer

  1. #1
    Join Date
    Jan 2005
    Posts
    623

    Fake Referrer

    Here is an example of how easy it is to fake the $_SERVER['HTTP_REFERER'] and $_SERVER['HTTP_USER_AGENT'] in PHP. This is a clear example of why you should NOT use these two variables as your only means of validation.

    [php]
    <?php

    // THIS CREATES A FAKE USER AGENT
    ini_set('user_agent','My Fake Browser');

    // THIS CREATES A FAKE REFERRER

    $host = "www.syntax******.info";
    $referrer = "www.fake_referrer.com";
    $file = "test.php";



    $hdrs = array( 'http' => array(

    'header' => "accept-language: en\r\n" .

    "Host: $host\r\n" .

    "Referer: http://$referrer\r\n" .

    "Content-Type: text/plain\r\n"

    )

    );


    $context = stream_context_create($hdrs);
    $fp = fopen("http://" . $host . "/" . $file, 'r', false, $context);

    fpassthru($fp);
    fclose($fp);

    ?>
    [/php]
    Last edited by SyntaXmasteR; 09-19-2007 at 04:02 PM.
    [url=http://www.syntax******.info/tools/services.php]Speed Up Windows XP[/url]
    [url=http://www.syntax******.info/tools/ip.php]Get An Ip Address[/url]
    [url=http://www.syntax******.info/tools/base_converter.php]Base Converter[/url]
    --------------------------------
    [URL=http://www.boninroad.com/syntax******/]Old Site[/URL]
    [URL=http://www.syntax******.info]Comming Soon[/URL]

+ Reply to Thread

Similar Threads

  1. Fake log in page
    By shizzle08 in forum Internet Privacy
    Replies: 3
    Last Post: 01-10-2009, 12:11 PM
  2. Msn fake log in page.
    By Trait in forum Programming
    Replies: 3
    Last Post: 05-04-2007, 05:34 PM
  3. Fake login
    By b52_00 in forum Programming
    Replies: 1
    Last Post: 03-27-2007, 05:01 PM
  4. Help? Fake log in page.....
    By ca86802 in forum Internet Privacy
    Replies: 19
    Last Post: 03-20-2007, 07:49 PM
  5. fake msn
    By vega in forum Internet Privacy
    Replies: 0
    Last Post: 02-05-2006, 07:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts