Skip to content
/ pwnbox Public
forked from pwnbox/pwnbox

Python toolbox for hacking and problem solving

Notifications You must be signed in to change notification settings

GAONNR/pwnbox

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pwnbox

https://travis-ci.org/protos37/pwnbox.svg?branch=master https://readthedocs.org/projects/pwnbox/badge/?version=latest

Python toolbox for hacking and problem solving

Installation

In your python environment:

pip install git+https://github.com/protos37/pwnbox

To upgrade:

pip install --upgrade pwnbox

Examples

General purpose pipe interface:

import pwnbox

# Open pipes
# pipe = pwnbox.pipe.popen("nc example.com 80")
pipe = pwnbox.pipe.connect("example.com", 80)

# Send request
pipe.write("GET / HTTP/1.0\r\nHost: example.com\r\n\r\n")

# Receive response header
pipe.read_until("\r\n\r\n")

# Interact with standard IO
pipe.interact()

# Close pipe
pipe.close()

Number theory implementations:

  • Chinese Remainder Theorem
  • Weiner's attack
  • Fermat's factorization
  • Pollard's rho method

Utilties:

import pwnbox

# DWORD to Little Endian
l = pwnbox.utils.dtol(1234)

# QWORD to Big Endian
b = pwnbox.utils.qtob(1234)

# Little Endian to Integer
i = pwnbox.utils.ltoi("\x01\x02\x03\x04")

# string operations
a = pwnbox.utils.sand(pwnbox.utils.dtol(0x12345678), pwnbox.utils.dtol(0xffff0000))
x = pwnbox.utils.sxor(pwnbox.utils.dtol(0xdeafbeef), pwnbox.utils.dtol(0x12345678))

Documentation

Documentation is available at http://pwnbox.readthedocs.org/.

About

Python toolbox for hacking and problem solving

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%