Coder Social home page Coder Social logo

mpwn's Introduction

mpwn

Basic usage:

from mp import *

# p = remote('host', port)
p = process('./exe_name')

# basic io:
p.sendline('hello world')
print(p.recvline())
p.send('hi')
print(p.recv(5))

# directly connect your tty input/output to the target
p.interactive()

# wait for a prompt and send a command:
p.expect('$ ')
p.sendline('command')

# concise syntax
# p << 'foo' # is p.send('foo')
# p >> 'bar' # is p.expect('bar')
# after you p >> 'bar', the received text up to your marker is available (once) as `p.data`
p << 'foo'
p >> 'bar'
data = p.data

p >> '$ ' # expect a prompt
p << 'send some text\n'

# chained syntax
p >> '$ ' << 'ls\n'
p >> '$ ' << 'cat flag\n'

# these all send '0', usually no fiddling with python3 bytes encoding/decoding
p << 0 << '0' << str(0) << b'0'

u64(b'\x00' * 8) == 0          # unpack a 64-bit int (can u8, u16, u32, u64)
p64(0x00000000) == b'\x00' * 8 # pack a 64-bit int   (can p8, p16, p32, p64)

mpwn's People

Contributors

lunixbochs avatar

Watchers

James Cloos avatar

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.