# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 only. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # import socket import commands import random PORT = 80 PID = "16861" rand = open("/dev/urandom") x = 0 while 1: x += 1 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(("127.0.0.1",PORT)) crapA = rand.readline() crapB = rand.readline() crapC = rand.readline() crapD = rand.readline() crapE = rand.readline() pckt = "GET /"+crapA+" HTTP/1.0\r\nReferer: http://"+crapB+"\r\nHost: http://"+crapC+"\r\n"+crapD+": "+crapE+"\r\n\r\n" s.send(pckt) s.close() if PID in commands.getoutput("ps -ax"): if x % 100 == 0: print "Packet "+repr(x)+" looks ok..." continue else: print commands.getoutput("ps -ax") print "Crashed!" r = random.randint(1000000,9999999) f = open(repr(r),"w") f.write(pckt) f.close() print "pckt written to "+repr(r) break