skip to navigation
skip to content

padsniff 1.1.1

Command-line tool to sniff Puzzle & Dragons data.

# Padsniff: A Puzzle & Dragons HTTP Sniffer

Quickstart

$ pip install padsniff

Padsniff can be used as either a cli:

$ padsniff run --port 8080 --script examples/log_plus_eggs.py
runs:   1 | hp:   1 | atk:   1 | rcv:   2
[...]

… or as a library!

import padsniff
import json

@padsniff.on(action='get_player_data')
def hello(request, response):
    username = json.loads(response.content.decode())['name']
    print('Hello, %s!' % username)

if __name__ == '__main__':
    proxy = padsniff.Proxy()
    proxy.run()

Check out the examples for more cool ideas.

Installation

Padsniff requires Python 3.5+. Install it with your package manager or using pyenv.

$ pyenv update && pyenv install 3.5.2
$ pyenv shell 3.5.2

See the suggested build environment page if you’re having trouble getting pyenv to work.

OSX

Apple removed the OpenSSL headers in El Capitan, so you’ll have to set some environment variables before installing padsniff’s dependencies.

$ brew install openssl
$ export ARCHFLAGS="-arch x86_64" LDFLAGS="-L/usr/local/opt/openssl/lib" CFLAGS="-I/usr/local/opt/openssl/include"
$ pip install padsniff

Padsniff depends on mitmproxy’s transparent proxying capabilities. Follow their instructions to set up your device.

Debian / Ubuntu

Padsniff includes a pretty heavy list of dependencies, including lxml and cryptography. You’ll need to install some of their dependencies via your package manager.

$ sudo apt-get install -y build-essential libffi-dev libssl-dev libxml2-dev libxslt-dev python3-dev
$ export LC_ALL=C.UTF-8 LANG=C.UTF-8
$ pip install padsniff

This will also set up your environment to support click, the library that powers padsniff’s command line interface.

Padsniff depends on mitmproxy’s transparent proxying capabilites. Follow their instructions to set up your device.

Development

$ git clone git@bitbucket.org:necromanteion/padsniff.git padsniff
$ cd padsniff
$ pip install -r dev-requirements.txt -e .

This will install the testing dependencies – padsniff uses pytest for unit testing – and install padsniff in editable mode.

 
File Type Py Version Uploaded on Size
padsniff-1.1.1-py3-none-any.whl (md5) Python Wheel py3 2017-03-28 9KB
padsniff-1.1.1.tar.gz (md5) Source 2017-03-28 6KB