GithubHelp home page GithubHelp logo

ztrix / zio Goto Github PK

View Code? Open in Web Editor NEW
389.0 32.0 82.0 476 KB

unified io lib for pwning development written in python

License: Other

Python 99.23% Shell 0.77%
pwntools zio io-library pwnable ctf-tools

zio's People

Contributors

aluex avatar xairy avatar ztrix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zio's Issues

bidirectional fd support

support apps which connect network and then dup network_fd to stdin/stdout fd.

e.g. mailbox by cbmixx

terminate child by default

  • don't ignore sighup by default
  • sent the sighup signal to the child when closing, add handlers when zio object recycled

read_until in tty mode

from zio import *
io = zio(['ssh', '[email protected]'], stdin=TTY_RAW, stdout=TTY_RAW, timeout=5)
io.read_until('assword')
io.interact()

expected behavior: go through interact
what happened: timeout when read_until

The second `zio.write()` seems not to work.

I am doing some CTF-style exercises about pwn, and I wrote a script using zio, and here is what I try to do:

Step 1. leak the real address of libc_start_main in libc;
Step 2. leak some content of libc, such as version and syscall;

Suppose I already have a zio object named io = zio((something))
To achieve this, I have to do io.write twice(The program will read twice, of course), and they both end in \n. However, the program does not get the second io.write(). What I mean is that the buf is NULL and the result, stored in %rax register, is ZERO, which means the program does not read successfully at all!

I could not figure out the reason and google did not help a lot. I have read the doc but it is not very detailed, and some functions like flush() don't work.

The steps are like below:
io.write(1st shellcode) --> success
io.read(real_addr_of_libc_start_main) --> success
io.write(2nd shellcode) --> program does not read 2nd shellcode successfully
io.read(some_content_in_libc) -->

I really don't know why as this is the first time I use zio.Any help would be appreciated.
Thanks a lot.
Tgn

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.