Skip to content

Instantly share code, notes, and snippets.

@joenorton8014
Created August 14, 2018 01:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joenorton8014/f6ac55d7f26023b8d5169edae6e8218a to your computer and use it in GitHub Desktop.
Save joenorton8014/f6ac55d7f26023b8d5169edae6e8218a to your computer and use it in GitHub Desktop.
# Not my work, from SANS660
import socket
import random
def randstring():
s = ""
for i in xrange(random.randint(1,64)):
s += chr(random.randint(0x30,0x7a))
return s
target = "10.0.0.88"
PORT = 80
f = open("httpfuzz-log.txt", "w")
print "Sending junk to the local webserver"
x = 0
while 1:
print "Fuzzing verbs set " + str(x)
f.write("Fuzzing verbs set " + str(x) + "\n")
for verb in ["GET", "HEAD", "DELETE", "PUT", "TRACE", "POST", "OPTIONS", "CONNECT"]:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((target,PORT))
junkA = randstring()
junkB = randstring()
junkC = randstring()
junkD = randstring()
junkE = randstring()
pckt = verb +" /"+junkA+" HTTP/1.1\r\nReferer: http://"+junkB+"\r\nHost: http://"+junkC+"\r\n"+junkD+": "+junkE+"\r\n\r\n"
f.write(pckt)
s.send(pckt)
s.close()
x += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment