WarcTwistedMITMProxy
WarcTwistedMITMProxy is an HTTP(S) proxy that saves all web traffic to a file. The file format used is the Web ARChive (WARC) format (ISO 28500). This lets you browse the web using a regular browser, and anything you view in the browser is archived in the WARC file. WarcTwistedMITMProxy uses the Twisted Python network library.
Usage
To run, execute:
python warcmitm.py
Append --help
to view parameter information.
After the proxy is running, configure a web browser to use it as a proxy on the given port.
Prerequisites
This program requires Twisted 13.1.0 (or later) and OpenSSL.
SSL Certificate
This program requires an SSL certificate support reading HTTPS sessions. Although the program comes with a pre-generated certificate that can be imported into Windows, the certificate is publicly available, so a personal certificate should be generated by following the steps below.
Generating an SSL Certificate on Windows 7
Install OpenSSL, then use the following commands. They will create four files: ca.key, ca.crt, ca.pem, and ca.p12.
cd C:\OpenSSL-Win32\bin
set OPENSSL_CONF=C:\OpenSSL-Win32\bin\openssl.cfg
openssl genrsa -out ca.key 2048
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
openssl pkcs12 -export -out cert.p12 -inkey ca.key -in ca.crt
copy /B ca.key+ca.crt ca.pem
Using an SSL Certificate
After creating the files, the certificate must be imported into the Windows Certificate manager. Click start and type certmgr.msc and open the application. Right-click the Trusted Root Certification Authorities folder and go to All Tasks > Import. Click Next and then Browse for a certificate. In the filter in the bottom right, change it to "Personal Information Exchange (*.pfx, *.p12)" and import cert.p12.
To use the certificate, copy cert.pem into this program's folder.