Code Monkey home page Code Monkey logo

simplehttpproxy's Introduction

This repository is NOT MAINTAINED anymore!

Use proxy2 instead.

SimpleHTTPProxy

A Simple HTTP Proxy like Python's SimpleHTTPServer module. Works on Python 2.7.

Features:

  • easy to use
  • easy to customize
  • runs fast with minimum footprint
  • requires no external modules
  • supports HTTP/1.1 persistent connections to some extent
  • supports CONNECT tunneling
  • supports gzip and deflate compression
  • supports IPv6 (for listening you need to edit the script)
  • supports sslstrip feature (by SSLStripProxy)
  • supports sslbump feature (by SSLBumpProxy)

Usage

$ python SimpleHTTPProxy.py 8080

or like SimpleHTTPServer:

$ python -m SimpleHTTPProxy

When the argument is not given, SimpleHTTPProxy uses tcp/8080.

SimpleHTTPProxy provides CONNECT tunneling, in which the data is transfered with no modification.

Customize

To customize, inherit SimpleHTTPProxyHandler class and override the handler methods.

Some examples are included:

  • SaveImagesProxy: store all 'image/*' files on 'SaveImagesProxy/' directory (by keeping their url hierarchy)
  • ChangeUAProxy: replace 'User-Agent' header of the client requests
  • HideRefererProxy: replace 'Referer' header of the client requests
  • RemoveIframeProxy: remove all <iframe> elements from 'text/html' contents
  • StripAmazonProxy: force redirect to 'http://www.amazon.co.jp/dp/$ASIN' style url
  • CatHeadersProxy: print HTTP headers to stdout
  • SendSSTPProxy: send SSTP messages to localhost

You can use these proxies just as SimpleHTTPProxy:

$ python -m SaveImagesProxy

sslstripping by SSLStripProxy

SSLStripProxy inherits SimpleHTTPProxy and implements sslstrip-like feature.

  • work as HTTP proxy (not HTTPS)
  • replace https urls to http ones in the responses and remember them
  • forward client's HTTP requests to upstream servers as HTTPS requests

Also some examples are included:

  • SSLStripCatHeadersProxy: print HTTP/HTTPS headers to stdout
  • OffmousedownGoogleProxy: disable onmousedown URL rewriting in Google's Result Pages (HTTPS)

"HTTP Strict Transport Security" policies [RFC 6797] make the browsers always use HTTPS for their domains, so this proxy doesn't work for such cases.

sslbumpping by SSLBumpProxy

SSLBumpProxy inherits SimpleHTTPProxy and implements Squid's SslBump-like feature.

  • work as HTTPS proxy (also as HTTP proxy)
  • connect with the client with certificate generated by SSLBumpProxy
  • you need to install CA certificate by accessing 'http://proxy.test/' via the proxy, or browsers will raise a certificate warning

An example is included:

  • SSLBurpCatHeadersProxy: print HTTP/HTTPS headers to stdout

To enable dynamic certificate generation, OpenSSL is required. If you use a static certificate, edit SSLBumpProxy.py.

simplehttpproxy's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

mobilenetlearn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.