Skip to main content

Command-line tool to sniff Puzzle & Dragons data.

Project description

PyPICI

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()

See the device setup guide to learn how to set up your phone to proxy through padsniff, and the usage guide for more advanced usage.

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 computer for proxying.

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 computer for proxying.

Development

$ git clone git@gitlab.com:wmedlar/padsniff.git
$ 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

padsniff-1.2.1.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

padsniff-1.2.1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file padsniff-1.2.1.tar.gz.

File metadata

  • Download URL: padsniff-1.2.1.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for padsniff-1.2.1.tar.gz
Algorithm Hash digest
SHA256 f3f38fa57f17c4c7fdad46d9295989ade42cd29e7321ef2432570a64f87811ed
MD5 91d2a0ea469e2103938d29597f4b60bb
BLAKE2b-256 dc63de7a23765aef3e39ae39646cd1e69a4e67bec28c81aec5b120552a2d45f2

See more details on using hashes here.

File details

Details for the file padsniff-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for padsniff-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c3eeda36aed9e6769a9bf8639ef0e2a0e065a7b74e028cfc52a5e154952a5421
MD5 5df1b989e2320a3607555639b3398f67
BLAKE2b-256 daba943d912bd0527833e33da7dc79dab42fa9bb7772d3017ab5595e9674655e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page