Release 0.1.1

Bugfixes, new versioning system, fix up for pypi
This commit is contained in:
Rob Glew 2015-12-29 00:38:51 -06:00
parent f4bbd15c68
commit ed7ee40944
8 changed files with 22 additions and 15 deletions

2
.gitignore vendored
View file

@ -10,4 +10,4 @@ TAGS
config.json config.json
build/* build/*
*.egg-info/* *.egg-info/*
.#* .#*

View file

@ -1,3 +1,7 @@
include README.md include README.md
include LICENSE.txt include LICENSE.txt
recursive-include pappyproxy *.py *.vim include pappyproxy default_user_config.json
recursive-include pappyproxy *.py
recursive-include pappyproxy *.vim
recursive-include pappyproxy *.txt
include docs/source/overview.rst

View file

@ -57,7 +57,7 @@ $
Adding The CA Cert to Your Browser Adding The CA Cert to Your Browser
---------------------------------- ----------------------------------
In order for Pappy to view data sent using HTTPS, you need to add a generated CA cert (`certificate.crt`) to your browser. Certificates are generated using the `gencerts` command and are by default stored in the same directory as the main `pappy.py` script. This allows Pappy to act as a CA and sign any HTTPS certificate it wants without the browser complaining. This allows Pappy to decrypt and modify HTTPS requests. The certificate installation instructions are different for each browser. In order for Pappy to view data sent using HTTPS, you need to add a generated CA cert (`certificate.crt`) to your browser. Certificates are generated using the `gencerts` command and are by default stored in `~/.pappy/certs`. This allows Pappy to act as a CA and sign any HTTPS certificate it wants without the browser complaining. This allows Pappy to decrypt and modify HTTPS requests. The certificate installation instructions are different for each browser.
### Firefox ### Firefox
You can add the CA cert to Firefox by going to `Preferences -> Advanced -> View Certificates -> Authorities -> Import` and selecting the `certificate.crt` file in the `certs` directory. You can add the CA cert to Firefox by going to `Preferences -> Advanced -> View Certificates -> Authorities -> Import` and selecting the `certificate.crt` file in the `certs` directory.
@ -86,13 +86,13 @@ The following tokens will also be replaced with values:
| Token | Replaced with | | Token | Replaced with |
|:--|:--| |:--|:--|
| `{PAPPYDIR}` | The directory where Pappy's files are stored | | `{DATADIR}` | The directory where Pappy's data files are stored |
See the default `config.json` for examples. See the default `config.json` for examples.
Generating Pappy's CA Cert Generating Pappy's CA Cert
-------------------------- --------------------------
In order to intercept and modify requests to sites that use HTTPS, you have to generate and install CA certs to your browser. You can do this by running the `gencerts` command in Pappy. By default, certs are stored in the same directory as Pappy's script files. This is also the default location that Pappy will look for certificates (unless you specify otherwise in `config.json`.) In addition, you can give the `gencerts` command an argument to have it put the generated certs in a different directory. In order to intercept and modify requests to sites that use HTTPS, you have to generate and install CA certs to your browser. You can do this by running the `gencerts` command in Pappy. By default, certs are stored `~/.pappy/certs`. This is also the default location that Pappy will look for certificates (unless you specify otherwise in `config.json`.) In addition, you can give the `gencerts` command an argument to have it put the generated certs in a different directory.
| Command | Description | | Command | Description |
|:--------|:------------| |:--------|:------------|

View file

@ -4,8 +4,9 @@ import os
import shutil import shutil
PAPPY_DIR = os.path.dirname(os.path.realpath(__file__)) PAPPY_DIR = os.path.dirname(os.path.realpath(__file__))
DATA_DIR = os.path.join(os.path.expanduser('~'), '.pappy')
CERT_DIR = PAPPY_DIR CERT_DIR = os.path.join(DATA_DIR, 'certs')
DATAFILE = 'data.db' DATAFILE = 'data.db'
DEBUG_DIR = None DEBUG_DIR = None
DEBUG_TO_FILE = False DEBUG_TO_FILE = False
@ -29,12 +30,14 @@ def load_settings(proj_config):
global DEBUG_VERBOSITY global DEBUG_VERBOSITY
global LISTENERS global LISTENERS
global PAPPY_DIR global PAPPY_DIR
global DATA_DIR
global SSL_CA_FILE global SSL_CA_FILE
global SSL_PKEY_FILE global SSL_PKEY_FILE
# Substitution dictionary # Substitution dictionary
subs = {} subs = {}
subs['PAPPYDIR'] = PAPPY_DIR #subs['PAPPYDIR'] = PAPPY_DIR
subs['DATADIR'] = DATA_DIR
# Data file settings # Data file settings
if 'data_file' in proj_config: if 'data_file' in proj_config:

View file

@ -807,8 +807,7 @@ class ProxyCmd(cmd2.Cmd):
def do_gencerts(self, line): def do_gencerts(self, line):
dest_dir = line or pappyproxy.config.CERT_DIR dest_dir = line or pappyproxy.config.CERT_DIR
message = "This will overwrite any existing certs in %s. Are you sure?" % dest_dir message = "This will overwrite any existing certs in %s. Are you sure?" % dest_dir
answer = confirm(message, 'n') if not confirm(message, 'n'):
if not answer or answer[0].lower() != 'y':
return False return False
print "Generating certs to %s" % dest_dir print "Generating certs to %s" % dest_dir
pappyproxy.proxy.generate_ca_certs(dest_dir) pappyproxy.proxy.generate_ca_certs(dest_dir)

View file

@ -1,6 +1,6 @@
{ {
"data_file": "./data.db", "data_file": "./data.db",
"cert_dir": "{PAPPYDIR}/certs", "cert_dir": "{DATADIR}/certs",
"proxy_listeners": [ "proxy_listeners": [
{"port": 8000, "interface": "127.0.0.1"} {"port": 8000, "interface": "127.0.0.1"}
] ]

View file

@ -5,7 +5,6 @@ import random
import re import re
from pappyproxy import http from pappyproxy import http
from pappyproxy import templates
from pappyproxy import config from pappyproxy import config
from twisted.internet import defer from twisted.internet import defer
from jinja2 import Environment, FileSystemLoader from jinja2 import Environment, FileSystemLoader

View file

@ -1,21 +1,23 @@
#!/usr/bin/env python #!/usr/bin/env python
from distutils.core import setup import pkgutil
from setuptools import setup, find_packages
setup(name='pappyproxy', setup(name='pappyproxy',
version='0.0.2', version='0.1.1',
description='The Pappy Intercepting Proxy', description='The Pappy Intercepting Proxy',
author='Rob Glew', author='Rob Glew',
author_email='rglew56@gmail.com', author_email='rglew56@gmail.com',
url='https://www.github.com/roglew/pappy-proxy', url='https://www.github.com/roglew/pappy-proxy',
packages=['pappyproxy'], packages=['pappyproxy', 'pappyproxy.schema'],
include_package_data = True,
license='MIT', license='MIT',
entry_points = { entry_points = {
'console_scripts':['pappy = pappyproxy.pappy:start'], 'console_scripts':['pappy = pappyproxy.pappy:start'],
}, },
long_description=open('docs/source/overview.rst').read(), long_description=open('docs/source/overview.rst').read(),
keywords='http proxy hacking 1337hax pwnurmum', keywords='http proxy hacking 1337hax pwnurmum',
download_url='https://github.com/roglew/pappy-proxy/archive/0.0.2.tar.gz', download_url='https://github.com/roglew/pappy-proxy/archive/0.1.1.tar.gz',
install_requires=[ install_requires=[
'beautifulsoup4>=4.4.1', 'beautifulsoup4>=4.4.1',
'cmd2>=0.6.8', 'cmd2>=0.6.8',