Created
August 14, 2018 01:32
-
-
Save joenorton8014/f6ac55d7f26023b8d5169edae6e8218a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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