using curl to spoof referers

Discussion in 'General Scripting Chat' started by BlackBeard, May 30, 2009.

  1. BlackBeard

    BlackBeard Newbie

    Joined:
    May 29, 2009
    Messages:
    26
    Likes Received:
    9
    You can do a lot of powerful things with a simple UNIX shellscript!

    I haven't used PR Storm since I'm a Mac/Unix not Windows guy, but after reading about it... it seems to basically do this?

    referer.sh

    PHP:
    # usage: ./referer.sh www.site-to-promote.com sites.txt
    # sites.txt should contain a list of sites formatted like
    # www.site1.com
    # www.site2.com
    # which have google-indexed web statistics pages

    for i in `cat $2`
     do 
       echo 
    "Posting referer: $1          To URL: $i"
       
    curl --form ref=http://$1 \
       
    --referer http://$1 \
       
    --user-agent "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6 Gecko/20070725 Firefox/2.0.0.6)" \
       --
    request POST http://$i/  > /dev/null 

    done
     
  2. blackcat.private

    blackcat.private Newbie

    Joined:
    Apr 23, 2009
    Messages:
    18
    Likes Received:
    0
    Yeah so simple...you can use wget too...I prefer python cause my script is multithreaded.

    For python just use urllib
     
  3. Demogorgon

    Demogorgon Newbie

    Joined:
    Jun 28, 2011
    Messages:
    13
    Likes Received:
    0
    Can you please post your python script :) ?
     
  4. Demogorgon

    Demogorgon Newbie

    Joined:
    Jun 28, 2011
    Messages:
    13
    Likes Received:
    0

    Can you please post your python script :) ?
     
  5. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,977
    Likes Received:
    13,293
    Occupation:
    Potentate
    Location:
    Asuncion
    Good luck replying on a 5 years old thread asking a guy who hasn't visited the forum for the last 3 years. :eek:
     
    • Thanks Thanks x 1
  6. nocare

    nocare Junior Member

    Joined:
    Apr 29, 2013
    Messages:
    164
    Likes Received:
    81
    Location:
    Deep Code
    Don't know a ton of the bhw program types, but it appears this one takes a list of sites, and visits them, using your target site as the referring url.
    That said and a quick glance at the original php shows me it would likely work with little to no modification.
    A good schedule, some proxies or servers...

    Would be easy enough to port to python.

    What would be the point of putting my site url in the from-site header data logs of other sites?