diff --git a/mitmproxy/README.rst b/mitmproxy/README.rst deleted file mode 100644 index 8ef92409d..000000000 --- a/mitmproxy/README.rst +++ /dev/null @@ -1,73 +0,0 @@ -|travis| |coveralls| |downloads| |latest_release| |python_versions| - -``mitmproxy`` is an interactive, SSL/TLS-capable man-in-the-middle proxy for HTTP -with a console interface. - -``mitmdump`` is the command-line version of mitmproxy. Think tcpdump for HTTP. - - -Features --------- - -- Intercept HTTP requests and responses and modify them on the fly. -- Save complete HTTP conversations for later replay and analysis. -- Replay the client-side of an HTTP conversations. -- Replay HTTP responses of a previously recorded server. -- Reverse proxy mode to forward traffic to a specified server. -- Transparent proxy mode on OSX and Linux. -- Make scripted changes to HTTP traffic using Python. -- SSL/TLS certificates for interception are generated on the fly. -- And much, much more. - -``mitmproxy`` is tested and developed on Mac OSX and Linux. -On Windows, only mitmdump is supported, which does not have a graphical user interface. - - -Documentation & Help --------------------- - -Documentation, tutorials and distribution packages can be found on the -mitmproxy website. - -|mitmproxy_site| - -Installation Instructions are available in the documentation. - -|mitmproxy_docs| - -You can join our developer chat on Slack. - -|slack| - - -.. |mitmproxy_site| image:: https://shields.mitmproxy.org/api/https%3A%2F%2F-mitmproxy.org-blue.svg - :target: https://mitmproxy.org/ - :alt: mitmproxy.org - -.. |mitmproxy_docs| image:: https://readthedocs.org/projects/mitmproxy/badge/ - :target: http://docs.mitmproxy.org/en/latest/ - :alt: mitmproxy documentation - -.. |slack| image:: http://slack.mitmproxy.org/badge.svg - :target: http://slack.mitmproxy.org/ - :alt: Slack Developer Chat - -.. |travis| image:: https://shields.mitmproxy.org/travis/mitmproxy/mitmproxy/master.svg - :target: https://travis-ci.org/mitmproxy/mitmproxy - :alt: Build Status - -.. |coveralls| image:: https://shields.mitmproxy.org/coveralls/mitmproxy/mitmproxy/master.svg - :target: https://coveralls.io/r/mitmproxy/mitmproxy - :alt: Coverage Status - -.. |downloads| image:: https://shields.mitmproxy.org/pypi/dm/mitmproxy.svg?color=orange - :target: https://pypi.python.org/pypi/mitmproxy - :alt: Downloads - -.. |latest_release| image:: https://shields.mitmproxy.org/pypi/v/mitmproxy.svg - :target: https://pypi.python.org/pypi/mitmproxy - :alt: Latest Version - -.. |python_versions| image:: https://shields.mitmproxy.org/pypi/pyversions/mitmproxy.svg - :target: https://pypi.python.org/pypi/mitmproxy - :alt: Supported Python versions diff --git a/mitmproxy/mitmproxy/__init__.py b/mitmproxy/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/__init__.py rename to mitmproxy/__init__.py diff --git a/mitmproxy/mitmproxy/cmdline.py b/mitmproxy/cmdline.py similarity index 100% rename from mitmproxy/mitmproxy/cmdline.py rename to mitmproxy/cmdline.py diff --git a/mitmproxy/mitmproxy/console/__init__.py b/mitmproxy/console/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/console/__init__.py rename to mitmproxy/console/__init__.py diff --git a/mitmproxy/mitmproxy/console/common.py b/mitmproxy/console/common.py similarity index 100% rename from mitmproxy/mitmproxy/console/common.py rename to mitmproxy/console/common.py diff --git a/mitmproxy/mitmproxy/console/flowdetailview.py b/mitmproxy/console/flowdetailview.py similarity index 100% rename from mitmproxy/mitmproxy/console/flowdetailview.py rename to mitmproxy/console/flowdetailview.py diff --git a/mitmproxy/mitmproxy/console/flowlist.py b/mitmproxy/console/flowlist.py similarity index 100% rename from mitmproxy/mitmproxy/console/flowlist.py rename to mitmproxy/console/flowlist.py diff --git a/mitmproxy/mitmproxy/console/flowview.py b/mitmproxy/console/flowview.py similarity index 100% rename from mitmproxy/mitmproxy/console/flowview.py rename to mitmproxy/console/flowview.py diff --git a/mitmproxy/mitmproxy/console/grideditor.py b/mitmproxy/console/grideditor.py similarity index 100% rename from mitmproxy/mitmproxy/console/grideditor.py rename to mitmproxy/console/grideditor.py diff --git a/mitmproxy/mitmproxy/console/help.py b/mitmproxy/console/help.py similarity index 100% rename from mitmproxy/mitmproxy/console/help.py rename to mitmproxy/console/help.py diff --git a/mitmproxy/mitmproxy/console/options.py b/mitmproxy/console/options.py similarity index 100% rename from mitmproxy/mitmproxy/console/options.py rename to mitmproxy/console/options.py diff --git a/mitmproxy/mitmproxy/console/palettepicker.py b/mitmproxy/console/palettepicker.py similarity index 100% rename from mitmproxy/mitmproxy/console/palettepicker.py rename to mitmproxy/console/palettepicker.py diff --git a/mitmproxy/mitmproxy/console/palettes.py b/mitmproxy/console/palettes.py similarity index 100% rename from mitmproxy/mitmproxy/console/palettes.py rename to mitmproxy/console/palettes.py diff --git a/mitmproxy/mitmproxy/console/pathedit.py b/mitmproxy/console/pathedit.py similarity index 100% rename from mitmproxy/mitmproxy/console/pathedit.py rename to mitmproxy/console/pathedit.py diff --git a/mitmproxy/mitmproxy/console/searchable.py b/mitmproxy/console/searchable.py similarity index 100% rename from mitmproxy/mitmproxy/console/searchable.py rename to mitmproxy/console/searchable.py diff --git a/mitmproxy/mitmproxy/console/select.py b/mitmproxy/console/select.py similarity index 100% rename from mitmproxy/mitmproxy/console/select.py rename to mitmproxy/console/select.py diff --git a/mitmproxy/mitmproxy/console/signals.py b/mitmproxy/console/signals.py similarity index 100% rename from mitmproxy/mitmproxy/console/signals.py rename to mitmproxy/console/signals.py diff --git a/mitmproxy/mitmproxy/console/statusbar.py b/mitmproxy/console/statusbar.py similarity index 100% rename from mitmproxy/mitmproxy/console/statusbar.py rename to mitmproxy/console/statusbar.py diff --git a/mitmproxy/mitmproxy/console/tabs.py b/mitmproxy/console/tabs.py similarity index 100% rename from mitmproxy/mitmproxy/console/tabs.py rename to mitmproxy/console/tabs.py diff --git a/mitmproxy/mitmproxy/console/window.py b/mitmproxy/console/window.py similarity index 100% rename from mitmproxy/mitmproxy/console/window.py rename to mitmproxy/console/window.py diff --git a/mitmproxy/mitmproxy/contentviews.py b/mitmproxy/contentviews.py similarity index 100% rename from mitmproxy/mitmproxy/contentviews.py rename to mitmproxy/contentviews.py diff --git a/mitmproxy/mitmproxy/contrib/README b/mitmproxy/contrib/README similarity index 100% rename from mitmproxy/mitmproxy/contrib/README rename to mitmproxy/contrib/README diff --git a/mitmproxy/mitmproxy/contrib/__init__.py b/mitmproxy/contrib/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/__init__.py rename to mitmproxy/contrib/__init__.py diff --git a/mitmproxy/mitmproxy/contrib/jsbeautifier/__init__.py b/mitmproxy/contrib/jsbeautifier/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/jsbeautifier/__init__.py rename to mitmproxy/contrib/jsbeautifier/__init__.py diff --git a/mitmproxy/mitmproxy/contrib/jsbeautifier/unpackers/README.specs.mkd b/mitmproxy/contrib/jsbeautifier/unpackers/README.specs.mkd similarity index 100% rename from mitmproxy/mitmproxy/contrib/jsbeautifier/unpackers/README.specs.mkd rename to mitmproxy/contrib/jsbeautifier/unpackers/README.specs.mkd diff --git a/mitmproxy/mitmproxy/contrib/jsbeautifier/unpackers/__init__.py b/mitmproxy/contrib/jsbeautifier/unpackers/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/jsbeautifier/unpackers/__init__.py rename to mitmproxy/contrib/jsbeautifier/unpackers/__init__.py diff --git a/mitmproxy/mitmproxy/contrib/jsbeautifier/unpackers/evalbased.py b/mitmproxy/contrib/jsbeautifier/unpackers/evalbased.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/jsbeautifier/unpackers/evalbased.py rename to mitmproxy/contrib/jsbeautifier/unpackers/evalbased.py diff --git a/mitmproxy/mitmproxy/contrib/jsbeautifier/unpackers/javascriptobfuscator.py b/mitmproxy/contrib/jsbeautifier/unpackers/javascriptobfuscator.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/jsbeautifier/unpackers/javascriptobfuscator.py rename to mitmproxy/contrib/jsbeautifier/unpackers/javascriptobfuscator.py diff --git a/mitmproxy/mitmproxy/contrib/jsbeautifier/unpackers/myobfuscate.py b/mitmproxy/contrib/jsbeautifier/unpackers/myobfuscate.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/jsbeautifier/unpackers/myobfuscate.py rename to mitmproxy/contrib/jsbeautifier/unpackers/myobfuscate.py diff --git a/mitmproxy/mitmproxy/contrib/jsbeautifier/unpackers/packer.py b/mitmproxy/contrib/jsbeautifier/unpackers/packer.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/jsbeautifier/unpackers/packer.py rename to mitmproxy/contrib/jsbeautifier/unpackers/packer.py diff --git a/mitmproxy/mitmproxy/contrib/jsbeautifier/unpackers/urlencode.py b/mitmproxy/contrib/jsbeautifier/unpackers/urlencode.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/jsbeautifier/unpackers/urlencode.py rename to mitmproxy/contrib/jsbeautifier/unpackers/urlencode.py diff --git a/mitmproxy/mitmproxy/contrib/tls/__init__.py b/mitmproxy/contrib/tls/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/tls/__init__.py rename to mitmproxy/contrib/tls/__init__.py diff --git a/mitmproxy/mitmproxy/contrib/tls/_constructs.py b/mitmproxy/contrib/tls/_constructs.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/tls/_constructs.py rename to mitmproxy/contrib/tls/_constructs.py diff --git a/mitmproxy/mitmproxy/contrib/tls/utils.py b/mitmproxy/contrib/tls/utils.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/tls/utils.py rename to mitmproxy/contrib/tls/utils.py diff --git a/mitmproxy/mitmproxy/contrib/wbxml/ASCommandResponse.py b/mitmproxy/contrib/wbxml/ASCommandResponse.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/wbxml/ASCommandResponse.py rename to mitmproxy/contrib/wbxml/ASCommandResponse.py diff --git a/mitmproxy/mitmproxy/contrib/wbxml/ASWBXML.py b/mitmproxy/contrib/wbxml/ASWBXML.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/wbxml/ASWBXML.py rename to mitmproxy/contrib/wbxml/ASWBXML.py diff --git a/mitmproxy/mitmproxy/contrib/wbxml/ASWBXMLByteQueue.py b/mitmproxy/contrib/wbxml/ASWBXMLByteQueue.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/wbxml/ASWBXMLByteQueue.py rename to mitmproxy/contrib/wbxml/ASWBXMLByteQueue.py diff --git a/mitmproxy/mitmproxy/contrib/wbxml/ASWBXMLCodePage.py b/mitmproxy/contrib/wbxml/ASWBXMLCodePage.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/wbxml/ASWBXMLCodePage.py rename to mitmproxy/contrib/wbxml/ASWBXMLCodePage.py diff --git a/mitmproxy/mitmproxy/contrib/wbxml/GlobalTokens.py b/mitmproxy/contrib/wbxml/GlobalTokens.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/wbxml/GlobalTokens.py rename to mitmproxy/contrib/wbxml/GlobalTokens.py diff --git a/mitmproxy/mitmproxy/contrib/wbxml/InvalidDataException.py b/mitmproxy/contrib/wbxml/InvalidDataException.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/wbxml/InvalidDataException.py rename to mitmproxy/contrib/wbxml/InvalidDataException.py diff --git a/mitmproxy/mitmproxy/contrib/wbxml/__init__.py b/mitmproxy/contrib/wbxml/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/contrib/wbxml/__init__.py rename to mitmproxy/contrib/wbxml/__init__.py diff --git a/mitmproxy/mitmproxy/controller.py b/mitmproxy/controller.py similarity index 100% rename from mitmproxy/mitmproxy/controller.py rename to mitmproxy/controller.py diff --git a/mitmproxy/mitmproxy/dump.py b/mitmproxy/dump.py similarity index 100% rename from mitmproxy/mitmproxy/dump.py rename to mitmproxy/dump.py diff --git a/mitmproxy/mitmproxy/exceptions.py b/mitmproxy/exceptions.py similarity index 100% rename from mitmproxy/mitmproxy/exceptions.py rename to mitmproxy/exceptions.py diff --git a/mitmproxy/mitmproxy/filt.py b/mitmproxy/filt.py similarity index 100% rename from mitmproxy/mitmproxy/filt.py rename to mitmproxy/filt.py diff --git a/mitmproxy/mitmproxy/flow.py b/mitmproxy/flow.py similarity index 100% rename from mitmproxy/mitmproxy/flow.py rename to mitmproxy/flow.py diff --git a/mitmproxy/mitmproxy/flow_export.py b/mitmproxy/flow_export.py similarity index 100% rename from mitmproxy/mitmproxy/flow_export.py rename to mitmproxy/flow_export.py diff --git a/mitmproxy/mitmproxy/flow_format_compat.py b/mitmproxy/flow_format_compat.py similarity index 100% rename from mitmproxy/mitmproxy/flow_format_compat.py rename to mitmproxy/flow_format_compat.py diff --git a/mitmproxy/mitmproxy/main.py b/mitmproxy/main.py similarity index 100% rename from mitmproxy/mitmproxy/main.py rename to mitmproxy/main.py diff --git a/mitmproxy/mitmproxy/models/__init__.py b/mitmproxy/models/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/models/__init__.py rename to mitmproxy/models/__init__.py diff --git a/mitmproxy/mitmproxy/models/connections.py b/mitmproxy/models/connections.py similarity index 100% rename from mitmproxy/mitmproxy/models/connections.py rename to mitmproxy/models/connections.py diff --git a/mitmproxy/mitmproxy/models/flow.py b/mitmproxy/models/flow.py similarity index 100% rename from mitmproxy/mitmproxy/models/flow.py rename to mitmproxy/models/flow.py diff --git a/mitmproxy/mitmproxy/models/http.py b/mitmproxy/models/http.py similarity index 100% rename from mitmproxy/mitmproxy/models/http.py rename to mitmproxy/models/http.py diff --git a/mitmproxy/mitmproxy/onboarding/__init__.py b/mitmproxy/onboarding/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/onboarding/__init__.py rename to mitmproxy/onboarding/__init__.py diff --git a/mitmproxy/mitmproxy/onboarding/app.py b/mitmproxy/onboarding/app.py similarity index 100% rename from mitmproxy/mitmproxy/onboarding/app.py rename to mitmproxy/onboarding/app.py diff --git a/mitmproxy/mitmproxy/onboarding/static/bootstrap.min.css b/mitmproxy/onboarding/static/bootstrap.min.css similarity index 100% rename from mitmproxy/mitmproxy/onboarding/static/bootstrap.min.css rename to mitmproxy/onboarding/static/bootstrap.min.css diff --git a/mitmproxy/mitmproxy/onboarding/static/fontawesome/css/font-awesome.css b/mitmproxy/onboarding/static/fontawesome/css/font-awesome.css similarity index 100% rename from mitmproxy/mitmproxy/onboarding/static/fontawesome/css/font-awesome.css rename to mitmproxy/onboarding/static/fontawesome/css/font-awesome.css diff --git a/mitmproxy/mitmproxy/onboarding/static/fontawesome/css/font-awesome.min.css b/mitmproxy/onboarding/static/fontawesome/css/font-awesome.min.css similarity index 100% rename from mitmproxy/mitmproxy/onboarding/static/fontawesome/css/font-awesome.min.css rename to mitmproxy/onboarding/static/fontawesome/css/font-awesome.min.css diff --git a/mitmproxy/mitmproxy/onboarding/static/fontawesome/fonts/FontAwesome.otf b/mitmproxy/onboarding/static/fontawesome/fonts/FontAwesome.otf similarity index 100% rename from mitmproxy/mitmproxy/onboarding/static/fontawesome/fonts/FontAwesome.otf rename to mitmproxy/onboarding/static/fontawesome/fonts/FontAwesome.otf diff --git a/mitmproxy/mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.eot b/mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.eot similarity index 100% rename from mitmproxy/mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.eot rename to mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.eot diff --git a/mitmproxy/mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.svg b/mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.svg similarity index 100% rename from mitmproxy/mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.svg rename to mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.svg diff --git a/mitmproxy/mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.ttf b/mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.ttf similarity index 100% rename from mitmproxy/mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.ttf rename to mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.ttf diff --git a/mitmproxy/mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.woff b/mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.woff similarity index 100% rename from mitmproxy/mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.woff rename to mitmproxy/onboarding/static/fontawesome/fonts/fontawesome-webfont.woff diff --git a/mitmproxy/mitmproxy/onboarding/static/mitmproxy.css b/mitmproxy/onboarding/static/mitmproxy.css similarity index 100% rename from mitmproxy/mitmproxy/onboarding/static/mitmproxy.css rename to mitmproxy/onboarding/static/mitmproxy.css diff --git a/mitmproxy/mitmproxy/onboarding/templates/frame.html b/mitmproxy/onboarding/templates/frame.html similarity index 100% rename from mitmproxy/mitmproxy/onboarding/templates/frame.html rename to mitmproxy/onboarding/templates/frame.html diff --git a/mitmproxy/mitmproxy/onboarding/templates/index.html b/mitmproxy/onboarding/templates/index.html similarity index 100% rename from mitmproxy/mitmproxy/onboarding/templates/index.html rename to mitmproxy/onboarding/templates/index.html diff --git a/mitmproxy/mitmproxy/onboarding/templates/layout.html b/mitmproxy/onboarding/templates/layout.html similarity index 100% rename from mitmproxy/mitmproxy/onboarding/templates/layout.html rename to mitmproxy/onboarding/templates/layout.html diff --git a/mitmproxy/mitmproxy/platform/__init__.py b/mitmproxy/platform/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/platform/__init__.py rename to mitmproxy/platform/__init__.py diff --git a/mitmproxy/mitmproxy/platform/linux.py b/mitmproxy/platform/linux.py similarity index 100% rename from mitmproxy/mitmproxy/platform/linux.py rename to mitmproxy/platform/linux.py diff --git a/mitmproxy/mitmproxy/platform/osx.py b/mitmproxy/platform/osx.py similarity index 100% rename from mitmproxy/mitmproxy/platform/osx.py rename to mitmproxy/platform/osx.py diff --git a/mitmproxy/mitmproxy/platform/pf.py b/mitmproxy/platform/pf.py similarity index 100% rename from mitmproxy/mitmproxy/platform/pf.py rename to mitmproxy/platform/pf.py diff --git a/mitmproxy/mitmproxy/platform/windows.py b/mitmproxy/platform/windows.py similarity index 100% rename from mitmproxy/mitmproxy/platform/windows.py rename to mitmproxy/platform/windows.py diff --git a/mitmproxy/mitmproxy/protocol/__init__.py b/mitmproxy/protocol/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/protocol/__init__.py rename to mitmproxy/protocol/__init__.py diff --git a/mitmproxy/mitmproxy/protocol/base.py b/mitmproxy/protocol/base.py similarity index 100% rename from mitmproxy/mitmproxy/protocol/base.py rename to mitmproxy/protocol/base.py diff --git a/mitmproxy/mitmproxy/protocol/http.py b/mitmproxy/protocol/http.py similarity index 100% rename from mitmproxy/mitmproxy/protocol/http.py rename to mitmproxy/protocol/http.py diff --git a/mitmproxy/mitmproxy/protocol/http1.py b/mitmproxy/protocol/http1.py similarity index 100% rename from mitmproxy/mitmproxy/protocol/http1.py rename to mitmproxy/protocol/http1.py diff --git a/mitmproxy/mitmproxy/protocol/http2.py b/mitmproxy/protocol/http2.py similarity index 100% rename from mitmproxy/mitmproxy/protocol/http2.py rename to mitmproxy/protocol/http2.py diff --git a/mitmproxy/mitmproxy/protocol/http_replay.py b/mitmproxy/protocol/http_replay.py similarity index 100% rename from mitmproxy/mitmproxy/protocol/http_replay.py rename to mitmproxy/protocol/http_replay.py diff --git a/mitmproxy/mitmproxy/protocol/rawtcp.py b/mitmproxy/protocol/rawtcp.py similarity index 100% rename from mitmproxy/mitmproxy/protocol/rawtcp.py rename to mitmproxy/protocol/rawtcp.py diff --git a/mitmproxy/mitmproxy/protocol/tls.py b/mitmproxy/protocol/tls.py similarity index 100% rename from mitmproxy/mitmproxy/protocol/tls.py rename to mitmproxy/protocol/tls.py diff --git a/mitmproxy/mitmproxy/proxy/__init__.py b/mitmproxy/proxy/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/proxy/__init__.py rename to mitmproxy/proxy/__init__.py diff --git a/mitmproxy/mitmproxy/proxy/config.py b/mitmproxy/proxy/config.py similarity index 100% rename from mitmproxy/mitmproxy/proxy/config.py rename to mitmproxy/proxy/config.py diff --git a/mitmproxy/mitmproxy/proxy/modes/__init__.py b/mitmproxy/proxy/modes/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/proxy/modes/__init__.py rename to mitmproxy/proxy/modes/__init__.py diff --git a/mitmproxy/mitmproxy/proxy/modes/http_proxy.py b/mitmproxy/proxy/modes/http_proxy.py similarity index 100% rename from mitmproxy/mitmproxy/proxy/modes/http_proxy.py rename to mitmproxy/proxy/modes/http_proxy.py diff --git a/mitmproxy/mitmproxy/proxy/modes/reverse_proxy.py b/mitmproxy/proxy/modes/reverse_proxy.py similarity index 100% rename from mitmproxy/mitmproxy/proxy/modes/reverse_proxy.py rename to mitmproxy/proxy/modes/reverse_proxy.py diff --git a/mitmproxy/mitmproxy/proxy/modes/socks_proxy.py b/mitmproxy/proxy/modes/socks_proxy.py similarity index 100% rename from mitmproxy/mitmproxy/proxy/modes/socks_proxy.py rename to mitmproxy/proxy/modes/socks_proxy.py diff --git a/mitmproxy/mitmproxy/proxy/modes/transparent_proxy.py b/mitmproxy/proxy/modes/transparent_proxy.py similarity index 100% rename from mitmproxy/mitmproxy/proxy/modes/transparent_proxy.py rename to mitmproxy/proxy/modes/transparent_proxy.py diff --git a/mitmproxy/mitmproxy/proxy/root_context.py b/mitmproxy/proxy/root_context.py similarity index 100% rename from mitmproxy/mitmproxy/proxy/root_context.py rename to mitmproxy/proxy/root_context.py diff --git a/mitmproxy/mitmproxy/proxy/server.py b/mitmproxy/proxy/server.py similarity index 100% rename from mitmproxy/mitmproxy/proxy/server.py rename to mitmproxy/proxy/server.py diff --git a/mitmproxy/mitmproxy/script/__init__.py b/mitmproxy/script/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/script/__init__.py rename to mitmproxy/script/__init__.py diff --git a/mitmproxy/mitmproxy/script/concurrent.py b/mitmproxy/script/concurrent.py similarity index 100% rename from mitmproxy/mitmproxy/script/concurrent.py rename to mitmproxy/script/concurrent.py diff --git a/mitmproxy/mitmproxy/script/reloader.py b/mitmproxy/script/reloader.py similarity index 100% rename from mitmproxy/mitmproxy/script/reloader.py rename to mitmproxy/script/reloader.py diff --git a/mitmproxy/mitmproxy/script/script.py b/mitmproxy/script/script.py similarity index 100% rename from mitmproxy/mitmproxy/script/script.py rename to mitmproxy/script/script.py diff --git a/mitmproxy/mitmproxy/script/script_context.py b/mitmproxy/script/script_context.py similarity index 100% rename from mitmproxy/mitmproxy/script/script_context.py rename to mitmproxy/script/script_context.py diff --git a/mitmproxy/mitmproxy/stateobject.py b/mitmproxy/stateobject.py similarity index 100% rename from mitmproxy/mitmproxy/stateobject.py rename to mitmproxy/stateobject.py diff --git a/mitmproxy/mitmproxy/tnetstring.py b/mitmproxy/tnetstring.py similarity index 100% rename from mitmproxy/mitmproxy/tnetstring.py rename to mitmproxy/tnetstring.py diff --git a/mitmproxy/mitmproxy/utils.py b/mitmproxy/utils.py similarity index 100% rename from mitmproxy/mitmproxy/utils.py rename to mitmproxy/utils.py diff --git a/mitmproxy/mitmproxy/version.py b/mitmproxy/version.py similarity index 100% rename from mitmproxy/mitmproxy/version.py rename to mitmproxy/version.py diff --git a/mitmproxy/mitmproxy/web/__init__.py b/mitmproxy/web/__init__.py similarity index 100% rename from mitmproxy/mitmproxy/web/__init__.py rename to mitmproxy/web/__init__.py diff --git a/mitmproxy/mitmproxy/web/app.py b/mitmproxy/web/app.py similarity index 100% rename from mitmproxy/mitmproxy/web/app.py rename to mitmproxy/web/app.py diff --git a/mitmproxy/mitmproxy/web/static/app.css b/mitmproxy/web/static/app.css similarity index 100% rename from mitmproxy/mitmproxy/web/static/app.css rename to mitmproxy/web/static/app.css diff --git a/mitmproxy/mitmproxy/web/static/app.js b/mitmproxy/web/static/app.js similarity index 100% rename from mitmproxy/mitmproxy/web/static/app.js rename to mitmproxy/web/static/app.js diff --git a/mitmproxy/mitmproxy/web/static/fonts/fontawesome-webfont.eot b/mitmproxy/web/static/fonts/fontawesome-webfont.eot similarity index 100% rename from mitmproxy/mitmproxy/web/static/fonts/fontawesome-webfont.eot rename to mitmproxy/web/static/fonts/fontawesome-webfont.eot diff --git a/mitmproxy/mitmproxy/web/static/fonts/fontawesome-webfont.svg b/mitmproxy/web/static/fonts/fontawesome-webfont.svg similarity index 100% rename from mitmproxy/mitmproxy/web/static/fonts/fontawesome-webfont.svg rename to mitmproxy/web/static/fonts/fontawesome-webfont.svg diff --git a/mitmproxy/mitmproxy/web/static/fonts/fontawesome-webfont.ttf b/mitmproxy/web/static/fonts/fontawesome-webfont.ttf similarity index 100% rename from mitmproxy/mitmproxy/web/static/fonts/fontawesome-webfont.ttf rename to mitmproxy/web/static/fonts/fontawesome-webfont.ttf diff --git a/mitmproxy/mitmproxy/web/static/fonts/fontawesome-webfont.woff b/mitmproxy/web/static/fonts/fontawesome-webfont.woff similarity index 100% rename from mitmproxy/mitmproxy/web/static/fonts/fontawesome-webfont.woff rename to mitmproxy/web/static/fonts/fontawesome-webfont.woff diff --git a/mitmproxy/mitmproxy/web/static/images/chrome-devtools/LICENSE b/mitmproxy/web/static/images/chrome-devtools/LICENSE similarity index 100% rename from mitmproxy/mitmproxy/web/static/images/chrome-devtools/LICENSE rename to mitmproxy/web/static/images/chrome-devtools/LICENSE diff --git a/mitmproxy/mitmproxy/web/static/images/chrome-devtools/resourceCSSIcon.png b/mitmproxy/web/static/images/chrome-devtools/resourceCSSIcon.png similarity index 100% rename from mitmproxy/mitmproxy/web/static/images/chrome-devtools/resourceCSSIcon.png rename to mitmproxy/web/static/images/chrome-devtools/resourceCSSIcon.png diff --git a/mitmproxy/mitmproxy/web/static/images/chrome-devtools/resourceDocumentIcon.png b/mitmproxy/web/static/images/chrome-devtools/resourceDocumentIcon.png similarity index 100% rename from mitmproxy/mitmproxy/web/static/images/chrome-devtools/resourceDocumentIcon.png rename to mitmproxy/web/static/images/chrome-devtools/resourceDocumentIcon.png diff --git a/mitmproxy/mitmproxy/web/static/images/chrome-devtools/resourceJSIcon.png b/mitmproxy/web/static/images/chrome-devtools/resourceJSIcon.png similarity index 100% rename from mitmproxy/mitmproxy/web/static/images/chrome-devtools/resourceJSIcon.png rename to mitmproxy/web/static/images/chrome-devtools/resourceJSIcon.png diff --git a/mitmproxy/mitmproxy/web/static/images/chrome-devtools/resourcePlainIcon.png b/mitmproxy/web/static/images/chrome-devtools/resourcePlainIcon.png similarity index 100% rename from mitmproxy/mitmproxy/web/static/images/chrome-devtools/resourcePlainIcon.png rename to mitmproxy/web/static/images/chrome-devtools/resourcePlainIcon.png diff --git a/mitmproxy/mitmproxy/web/static/images/resourceExecutableIcon.png b/mitmproxy/web/static/images/resourceExecutableIcon.png similarity index 100% rename from mitmproxy/mitmproxy/web/static/images/resourceExecutableIcon.png rename to mitmproxy/web/static/images/resourceExecutableIcon.png diff --git a/mitmproxy/mitmproxy/web/static/images/resourceFlashIcon.png b/mitmproxy/web/static/images/resourceFlashIcon.png similarity index 100% rename from mitmproxy/mitmproxy/web/static/images/resourceFlashIcon.png rename to mitmproxy/web/static/images/resourceFlashIcon.png diff --git a/mitmproxy/mitmproxy/web/static/images/resourceImageIcon.png b/mitmproxy/web/static/images/resourceImageIcon.png similarity index 100% rename from mitmproxy/mitmproxy/web/static/images/resourceImageIcon.png rename to mitmproxy/web/static/images/resourceImageIcon.png diff --git a/mitmproxy/mitmproxy/web/static/images/resourceJavaIcon.png b/mitmproxy/web/static/images/resourceJavaIcon.png similarity index 100% rename from mitmproxy/mitmproxy/web/static/images/resourceJavaIcon.png rename to mitmproxy/web/static/images/resourceJavaIcon.png diff --git a/mitmproxy/mitmproxy/web/static/images/resourceNotModifiedIcon.png b/mitmproxy/web/static/images/resourceNotModifiedIcon.png similarity index 100% rename from mitmproxy/mitmproxy/web/static/images/resourceNotModifiedIcon.png rename to mitmproxy/web/static/images/resourceNotModifiedIcon.png diff --git a/mitmproxy/mitmproxy/web/static/images/resourceRedirectIcon.png b/mitmproxy/web/static/images/resourceRedirectIcon.png similarity index 100% rename from mitmproxy/mitmproxy/web/static/images/resourceRedirectIcon.png rename to mitmproxy/web/static/images/resourceRedirectIcon.png diff --git a/mitmproxy/mitmproxy/web/static/vendor.css b/mitmproxy/web/static/vendor.css similarity index 100% rename from mitmproxy/mitmproxy/web/static/vendor.css rename to mitmproxy/web/static/vendor.css diff --git a/mitmproxy/mitmproxy/web/static/vendor.js b/mitmproxy/web/static/vendor.js similarity index 100% rename from mitmproxy/mitmproxy/web/static/vendor.js rename to mitmproxy/web/static/vendor.js diff --git a/mitmproxy/mitmproxy/web/templates/index.html b/mitmproxy/web/templates/index.html similarity index 100% rename from mitmproxy/mitmproxy/web/templates/index.html rename to mitmproxy/web/templates/index.html diff --git a/mitmproxy/mitmproxy/webfonts/fontawesome-webfont.eot b/mitmproxy/webfonts/fontawesome-webfont.eot similarity index 100% rename from mitmproxy/mitmproxy/webfonts/fontawesome-webfont.eot rename to mitmproxy/webfonts/fontawesome-webfont.eot diff --git a/mitmproxy/mitmproxy/webfonts/fontawesome-webfont.svg b/mitmproxy/webfonts/fontawesome-webfont.svg similarity index 100% rename from mitmproxy/mitmproxy/webfonts/fontawesome-webfont.svg rename to mitmproxy/webfonts/fontawesome-webfont.svg diff --git a/mitmproxy/mitmproxy/webfonts/fontawesome-webfont.ttf b/mitmproxy/webfonts/fontawesome-webfont.ttf similarity index 100% rename from mitmproxy/mitmproxy/webfonts/fontawesome-webfont.ttf rename to mitmproxy/webfonts/fontawesome-webfont.ttf diff --git a/mitmproxy/mitmproxy/webfonts/fontawesome-webfont.woff b/mitmproxy/webfonts/fontawesome-webfont.woff similarity index 100% rename from mitmproxy/mitmproxy/webfonts/fontawesome-webfont.woff rename to mitmproxy/webfonts/fontawesome-webfont.woff diff --git a/netlib/README.rst b/netlib/README.rst deleted file mode 100644 index 16bd65a7d..000000000 --- a/netlib/README.rst +++ /dev/null @@ -1,35 +0,0 @@ -|travis| |coveralls| |downloads| |latest_release| |python_versions| - -Netlib is a collection of network utility classes, used by the pathod and -mitmproxy projects. It differs from other projects in some fundamental -respects, because both pathod and mitmproxy often need to violate standards. -This means that protocols are implemented as small, well-contained and flexible -functions, and are designed to allow misbehaviour when needed. - - -Development ------------ - -If you'd like to work on netlib, check out the instructions in mitmproxy's README_. - -.. |travis| image:: https://shields.mitmproxy.org/travis/mitmproxy/netlib/master.svg - :target: https://travis-ci.org/mitmproxy/netlib - :alt: Build Status - -.. |coveralls| image:: https://shields.mitmproxy.org/coveralls/mitmproxy/netlib/master.svg - :target: https://coveralls.io/r/mitmproxy/netlib - :alt: Coverage Status - -.. |downloads| image:: https://shields.mitmproxy.org/pypi/dm/netlib.svg?color=orange - :target: https://pypi.python.org/pypi/netlib - :alt: Downloads - -.. |latest_release| image:: https://shields.mitmproxy.org/pypi/v/netlib.svg - :target: https://pypi.python.org/pypi/netlib - :alt: Latest Version - -.. |python_versions| image:: https://shields.mitmproxy.org/pypi/pyversions/netlib.svg - :target: https://pypi.python.org/pypi/netlib - :alt: Supported Python versions - -.. _README: https://github.com/mitmproxy/mitmproxy#hacking \ No newline at end of file diff --git a/netlib/netlib/__init__.py b/netlib/__init__.py similarity index 100% rename from netlib/netlib/__init__.py rename to netlib/__init__.py diff --git a/netlib/netlib/certutils.py b/netlib/certutils.py similarity index 100% rename from netlib/netlib/certutils.py rename to netlib/certutils.py diff --git a/netlib/netlib/encoding.py b/netlib/encoding.py similarity index 100% rename from netlib/netlib/encoding.py rename to netlib/encoding.py diff --git a/netlib/netlib/exceptions.py b/netlib/exceptions.py similarity index 100% rename from netlib/netlib/exceptions.py rename to netlib/exceptions.py diff --git a/netlib/netlib/http/__init__.py b/netlib/http/__init__.py similarity index 100% rename from netlib/netlib/http/__init__.py rename to netlib/http/__init__.py diff --git a/netlib/netlib/http/authentication.py b/netlib/http/authentication.py similarity index 100% rename from netlib/netlib/http/authentication.py rename to netlib/http/authentication.py diff --git a/netlib/netlib/http/cookies.py b/netlib/http/cookies.py similarity index 100% rename from netlib/netlib/http/cookies.py rename to netlib/http/cookies.py diff --git a/netlib/netlib/http/headers.py b/netlib/http/headers.py similarity index 100% rename from netlib/netlib/http/headers.py rename to netlib/http/headers.py diff --git a/netlib/netlib/http/http1/__init__.py b/netlib/http/http1/__init__.py similarity index 100% rename from netlib/netlib/http/http1/__init__.py rename to netlib/http/http1/__init__.py diff --git a/netlib/netlib/http/http1/assemble.py b/netlib/http/http1/assemble.py similarity index 100% rename from netlib/netlib/http/http1/assemble.py rename to netlib/http/http1/assemble.py diff --git a/netlib/netlib/http/http1/read.py b/netlib/http/http1/read.py similarity index 100% rename from netlib/netlib/http/http1/read.py rename to netlib/http/http1/read.py diff --git a/netlib/netlib/http/http2/__init__.py b/netlib/http/http2/__init__.py similarity index 100% rename from netlib/netlib/http/http2/__init__.py rename to netlib/http/http2/__init__.py diff --git a/netlib/netlib/http/http2/connections.py b/netlib/http/http2/connections.py similarity index 100% rename from netlib/netlib/http/http2/connections.py rename to netlib/http/http2/connections.py diff --git a/netlib/netlib/http/message.py b/netlib/http/message.py similarity index 100% rename from netlib/netlib/http/message.py rename to netlib/http/message.py diff --git a/netlib/netlib/http/request.py b/netlib/http/request.py similarity index 100% rename from netlib/netlib/http/request.py rename to netlib/http/request.py diff --git a/netlib/netlib/http/response.py b/netlib/http/response.py similarity index 100% rename from netlib/netlib/http/response.py rename to netlib/http/response.py diff --git a/netlib/netlib/http/status_codes.py b/netlib/http/status_codes.py similarity index 100% rename from netlib/netlib/http/status_codes.py rename to netlib/http/status_codes.py diff --git a/netlib/netlib/http/user_agents.py b/netlib/http/user_agents.py similarity index 100% rename from netlib/netlib/http/user_agents.py rename to netlib/http/user_agents.py diff --git a/netlib/netlib/odict.py b/netlib/odict.py similarity index 100% rename from netlib/netlib/odict.py rename to netlib/odict.py diff --git a/netlib/setup.cfg b/netlib/setup.cfg deleted file mode 100644 index 3480374bc..000000000 --- a/netlib/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 \ No newline at end of file diff --git a/netlib/setup.py b/netlib/setup.py deleted file mode 100644 index 0c9a721de..000000000 --- a/netlib/setup.py +++ /dev/null @@ -1,70 +0,0 @@ -from setuptools import setup, find_packages -from codecs import open -import os -import sys - -from netlib import version - -# Based on https://github.com/pypa/sampleproject/blob/master/setup.py -# and https://python-packaging-user-guide.readthedocs.org/ -# and https://caremad.io/2014/11/distributing-a-cffi-project/ - -here = os.path.abspath(os.path.dirname(__file__)) - -with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f: - long_description = f.read() - -setup( - name="netlib", - version=version.VERSION, - description="A collection of network utilities used by pathod and mitmproxy.", - long_description=long_description, - url="http://github.com/mitmproxy/netlib", - author="Aldo Cortesi", - author_email="aldo@corte.si", - license="MIT", - classifiers=[ - "License :: OSI Approved :: MIT License", - "Development Status :: 3 - Alpha", - "Operating System :: POSIX", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Internet :: WWW/HTTP :: HTTP Servers", - "Topic :: Software Development :: Testing", - "Topic :: Software Development :: Testing :: Traffic Generation", - ], - packages=find_packages(), - install_requires=[ - "pyasn1>=0.1.9, <0.2", - "pyOpenSSL>=0.15.1, <0.16", - "cryptography>=1.2.2, <1.3", - "passlib>=1.6.5, <1.7", - "hpack>=2.1.0, <3.0", - "hyperframe>=3.2.0, <4.0", - "six>=1.10.0, <1.11", - "certifi>=2015.11.20.1", # no semver here - this should always be on the last release! - "backports.ssl_match_hostname>=3.5.0.1, <3.6", - ], - extras_require={ - # Do not use a range operator here: https://bitbucket.org/pypa/setuptools/issues/380 - # Ubuntu Trusty and other still ship with setuptools < 17.1 - ':python_version == "2.7"': [ - "ipaddress>=1.0.15, <1.1", - ], - 'dev': [ - "mock>=1.3.0, <1.4", - "pytest>=2.8.7, <2.9", - "pytest-xdist>=1.14, <1.15", - "pytest-cov>=2.2.1, <2.3", - "pytest-timeout>=1.0.0, <1.1", - "coveralls>=1.1, <1.2" - ] - }, -) diff --git a/netlib/netlib/socks.py b/netlib/socks.py similarity index 100% rename from netlib/netlib/socks.py rename to netlib/socks.py diff --git a/netlib/netlib/tcp.py b/netlib/tcp.py similarity index 100% rename from netlib/netlib/tcp.py rename to netlib/tcp.py diff --git a/netlib/netlib/tutils.py b/netlib/tutils.py similarity index 100% rename from netlib/netlib/tutils.py rename to netlib/tutils.py diff --git a/netlib/netlib/utils.py b/netlib/utils.py similarity index 100% rename from netlib/netlib/utils.py rename to netlib/utils.py diff --git a/netlib/netlib/version.py b/netlib/version.py similarity index 100% rename from netlib/netlib/version.py rename to netlib/version.py diff --git a/netlib/netlib/version_check.py b/netlib/version_check.py similarity index 100% rename from netlib/netlib/version_check.py rename to netlib/version_check.py diff --git a/netlib/netlib/websockets/__init__.py b/netlib/websockets/__init__.py similarity index 100% rename from netlib/netlib/websockets/__init__.py rename to netlib/websockets/__init__.py diff --git a/netlib/netlib/websockets/frame.py b/netlib/websockets/frame.py similarity index 100% rename from netlib/netlib/websockets/frame.py rename to netlib/websockets/frame.py diff --git a/netlib/netlib/websockets/protocol.py b/netlib/websockets/protocol.py similarity index 100% rename from netlib/netlib/websockets/protocol.py rename to netlib/websockets/protocol.py diff --git a/netlib/netlib/wsgi.py b/netlib/wsgi.py similarity index 100% rename from netlib/netlib/wsgi.py rename to netlib/wsgi.py diff --git a/pathod/.jsbeautifyrc b/pathod/.jsbeautifyrc deleted file mode 100644 index 725c15ad9..000000000 --- a/pathod/.jsbeautifyrc +++ /dev/null @@ -1,22 +0,0 @@ -{ - "indent_size": 4, - "indent_char": " ", - "eol": "\n", - "indent_level": 0, - "indent_with_tabs": false, - "preserve_newlines": true, - "max_preserve_newlines": 10, - "jslint_happy": false, - "space_after_anon_function": false, - "brace_style": "collapse", - "keep_array_indentation": false, - "keep_function_indentation": false, - "space_before_conditional": true, - "break_chained_methods": false, - "eval_code": false, - "unescape_strings": false, - "wrap_line_length": 80, - "wrap_attributes": "auto", - "wrap_attributes_indent_size": 4, - "end_with_newline": true -} diff --git a/pathod/README.rst b/pathod/README.rst deleted file mode 100644 index fbedc5ba7..000000000 --- a/pathod/README.rst +++ /dev/null @@ -1,60 +0,0 @@ -pathod -^^^^^^ - -|travis| |coveralls| |downloads| |latest_release| |python_versions| - -**pathod** is a collection of pathological tools for testing and torturing HTTP -clients and servers. The project has three components: - -- ``pathod``, an pathological HTTP daemon. -- ``pathoc``, a perverse HTTP client. -- ``pathod.test``, an API for easily using pathod and pathoc in unit tests. - -Installing ----------- - -If you already have **pip** on your system, installing **pathod** and its -dependencies is dead simple: - -.. code-block:: text - - pip install pathod - -Documentation -------------- - -The pathod documentation is self-hosted. Just fire up pathod, like so: - -.. code-block:: text - - ./pathod - -And then browse to: - -``_ - -You can always view the documentation for the latest release at the pathod -website: - -``_ - - -.. |travis| image:: https://shields.mitmproxy.org/travis/mitmproxy/pathod/master.svg - :target: https://travis-ci.org/mitmproxy/pathod - :alt: Build Status - -.. |coveralls| image:: https://shields.mitmproxy.org/coveralls/mitmproxy/pathod/master.svg - :target: https://coveralls.io/r/mitmproxy/pathod - :alt: Coverage Status - -.. |downloads| image:: https://shields.mitmproxy.org/pypi/dm/pathod.svg?color=orange - :target: https://pypi.python.org/pypi/pathod - :alt: Downloads - -.. |latest_release| image:: https://shields.mitmproxy.org/pypi/v/pathod.svg - :target: https://pypi.python.org/pypi/pathod - :alt: Latest Version - -.. |python_versions| image:: https://shields.mitmproxy.org/pypi/pyversions/pathod.svg - :target: https://pypi.python.org/pypi/pathod - :alt: Supported Python versions \ No newline at end of file diff --git a/pathod/pathod/__init__.py b/pathod/__init__.py similarity index 100% rename from pathod/pathod/__init__.py rename to pathod/__init__.py diff --git a/pathod/pathod/app.py b/pathod/app.py similarity index 100% rename from pathod/pathod/app.py rename to pathod/app.py diff --git a/pathod/pathod/language/__init__.py b/pathod/language/__init__.py similarity index 100% rename from pathod/pathod/language/__init__.py rename to pathod/language/__init__.py diff --git a/pathod/pathod/language/actions.py b/pathod/language/actions.py similarity index 100% rename from pathod/pathod/language/actions.py rename to pathod/language/actions.py diff --git a/pathod/pathod/language/base.py b/pathod/language/base.py similarity index 100% rename from pathod/pathod/language/base.py rename to pathod/language/base.py diff --git a/pathod/pathod/language/exceptions.py b/pathod/language/exceptions.py similarity index 100% rename from pathod/pathod/language/exceptions.py rename to pathod/language/exceptions.py diff --git a/pathod/pathod/language/generators.py b/pathod/language/generators.py similarity index 100% rename from pathod/pathod/language/generators.py rename to pathod/language/generators.py diff --git a/pathod/pathod/language/http.py b/pathod/language/http.py similarity index 100% rename from pathod/pathod/language/http.py rename to pathod/language/http.py diff --git a/pathod/pathod/language/http2.py b/pathod/language/http2.py similarity index 100% rename from pathod/pathod/language/http2.py rename to pathod/language/http2.py diff --git a/pathod/pathod/language/message.py b/pathod/language/message.py similarity index 100% rename from pathod/pathod/language/message.py rename to pathod/language/message.py diff --git a/pathod/pathod/language/websockets.py b/pathod/language/websockets.py similarity index 100% rename from pathod/pathod/language/websockets.py rename to pathod/language/websockets.py diff --git a/pathod/pathod/language/writer.py b/pathod/language/writer.py similarity index 100% rename from pathod/pathod/language/writer.py rename to pathod/language/writer.py diff --git a/pathod/pathod/log.py b/pathod/log.py similarity index 100% rename from pathod/pathod/log.py rename to pathod/log.py diff --git a/pathod/pathod/pathoc.py b/pathod/pathoc.py similarity index 100% rename from pathod/pathod/pathoc.py rename to pathod/pathoc.py diff --git a/pathod/pathod/pathoc_cmdline.py b/pathod/pathoc_cmdline.py similarity index 100% rename from pathod/pathod/pathoc_cmdline.py rename to pathod/pathoc_cmdline.py diff --git a/pathod/pathod/pathod.py b/pathod/pathod.py similarity index 100% rename from pathod/pathod/pathod.py rename to pathod/pathod.py diff --git a/pathod/pathod/pathod_cmdline.py b/pathod/pathod_cmdline.py similarity index 100% rename from pathod/pathod/pathod_cmdline.py rename to pathod/pathod_cmdline.py diff --git a/pathod/pathod/protocols/__init__.py b/pathod/protocols/__init__.py similarity index 100% rename from pathod/pathod/protocols/__init__.py rename to pathod/protocols/__init__.py diff --git a/pathod/pathod/protocols/http.py b/pathod/protocols/http.py similarity index 100% rename from pathod/pathod/protocols/http.py rename to pathod/protocols/http.py diff --git a/pathod/pathod/protocols/http2.py b/pathod/protocols/http2.py similarity index 100% rename from pathod/pathod/protocols/http2.py rename to pathod/protocols/http2.py diff --git a/pathod/pathod/protocols/websockets.py b/pathod/protocols/websockets.py similarity index 100% rename from pathod/pathod/protocols/websockets.py rename to pathod/protocols/websockets.py diff --git a/pathod/setup.py b/pathod/setup.py deleted file mode 100644 index 23e26f423..000000000 --- a/pathod/setup.py +++ /dev/null @@ -1,65 +0,0 @@ -from setuptools import setup, find_packages -from codecs import open -import os -import sys - -# Based on https://github.com/pypa/sampleproject/blob/master/setup.py -# and https://python-packaging-user-guide.readthedocs.org/ - -here = os.path.abspath(os.path.dirname(__file__)) - -sys.path.append(os.path.join(here, "..", "netlib")) -from pathod import version - -with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f: - long_description = f.read() - -setup( - name="pathod", - version=version.VERSION, - description="A pathological HTTP/S daemon for testing and stressing clients.", - long_description=long_description, - url="http://pathod.net", - author="Aldo Cortesi", - author_email="aldo@corte.si", - license="MIT", - classifiers=[ - "License :: OSI Approved :: MIT License", - "Development Status :: 5 - Production/Stable", - "Operating System :: POSIX", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Internet", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Internet :: WWW/HTTP :: HTTP Servers", - "Topic :: Software Development :: Testing", - "Topic :: Software Development :: Testing :: Traffic Generation", - ], - packages=find_packages(), - include_package_data=True, - entry_points={ - 'console_scripts': [ - "pathod = pathod.pathod_cmdline:go_pathod", - "pathoc = pathod.pathoc_cmdline:go_pathoc" - ] - }, - install_requires=[ - "netlib=={}".format(version.VERSION), - "requests>=2.9.1, <2.10", - "Flask>=0.10.1, <0.11", - "pyparsing>=2.1,<2.2" - ], - extras_require={ - 'dev': [ - "mock>=1.3.0, <1.4", - "pytest>=2.8.0", - "pytest-xdist>=1.14, <1.15", - "pytest-cov>=2.2.1, <2.3", - "pytest-timeout>=1.0.0, <1.1", - "coveralls>=1.1, <1.2" - ] - } -) diff --git a/pathod/pathod/static/bootstrap.min.css b/pathod/static/bootstrap.min.css similarity index 100% rename from pathod/pathod/static/bootstrap.min.css rename to pathod/static/bootstrap.min.css diff --git a/pathod/pathod/static/bootstrap.min.js b/pathod/static/bootstrap.min.js similarity index 100% rename from pathod/pathod/static/bootstrap.min.js rename to pathod/static/bootstrap.min.js diff --git a/pathod/pathod/static/jquery-1.7.2.min.js b/pathod/static/jquery-1.7.2.min.js similarity index 100% rename from pathod/pathod/static/jquery-1.7.2.min.js rename to pathod/static/jquery-1.7.2.min.js diff --git a/pathod/pathod/static/jquery.localscroll-min.js b/pathod/static/jquery.localscroll-min.js similarity index 95% rename from pathod/pathod/static/jquery.localscroll-min.js rename to pathod/static/jquery.localscroll-min.js index 3f8d64cce..fa583a451 100644 --- a/pathod/pathod/static/jquery.localscroll-min.js +++ b/pathod/static/jquery.localscroll-min.js @@ -1,9 +1,9 @@ -/** - * jQuery.LocalScroll - Animated scrolling navigation, using anchors. - * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com - * Dual licensed under MIT and GPL. - * Date: 3/11/2009 - * @author Ariel Flesler - * @version 1.2.7 - **/ +/** + * jQuery.LocalScroll - Animated scrolling navigation, using anchors. + * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com + * Dual licensed under MIT and GPL. + * Date: 3/11/2009 + * @author Ariel Flesler + * @version 1.2.7 + **/ ;(function($){var l=location.href.replace(/#.*/,'');var g=$.localScroll=function(a){$('body').localScroll(a)};g.defaults={duration:1e3,axis:'y',event:'click',stop:true,target:window,reset:true};g.hash=function(a){if(location.hash){a=$.extend({},g.defaults,a);a.hash=false;if(a.reset){var e=a.duration;delete a.duration;$(a.target).scrollTo(0,a);a.duration=e}i(0,location,a)}};$.fn.localScroll=function(b){b=$.extend({},g.defaults,b);return b.lazy?this.bind(b.event,function(a){var e=$([a.target,a.target.parentNode]).filter(d)[0];if(e)i(a,e,b)}):this.find('a,area').filter(d).bind(b.event,function(a){i(a,this,b)}).end().end();function d(){return!!this.href&&!!this.hash&&this.href.replace(this.hash,'')==l&&(!b.filter||$(this).is(b.filter))}};function i(a,e,b){var d=e.hash.slice(1),f=document.getElementById(d)||document.getElementsByName(d)[0];if(!f)return;if(a)a.preventDefault();var h=$(b.target);if(b.lock&&h.is(':animated')||b.onBefore&&b.onBefore.call(b,a,f,h)===false)return;if(b.stop)h.stop(true);if(b.hash){var j=f.id==d?'id':'name',k=$(' ').attr(j,d).css({position:'absolute',top:$(window).scrollTop(),left:$(window).scrollLeft()});f[j]='';$('body').prepend(k);location=e.hash;k.remove();f[j]=d}h.scrollTo(f,b).trigger('notify.serialScroll',[f])}})(jQuery); \ No newline at end of file diff --git a/pathod/pathod/static/jquery.scrollTo-min.js b/pathod/static/jquery.scrollTo-min.js similarity index 99% rename from pathod/pathod/static/jquery.scrollTo-min.js rename to pathod/static/jquery.scrollTo-min.js index 7d4001dce..8503c892c 100644 --- a/pathod/pathod/static/jquery.scrollTo-min.js +++ b/pathod/static/jquery.scrollTo-min.js @@ -1,11 +1,11 @@ -/** - * jQuery.ScrollTo - Easy element scrolling using jQuery. - * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com - * Dual licensed under MIT and GPL. - * Date: 3/9/2009 - * @author Ariel Flesler - * @version 1.4.1 - * - * http://flesler.blogspot.com/2007/10/jqueryscrollto.html - */ +/** + * jQuery.ScrollTo - Easy element scrolling using jQuery. + * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com + * Dual licensed under MIT and GPL. + * Date: 3/9/2009 + * @author Ariel Flesler + * @version 1.4.1 + * + * http://flesler.blogspot.com/2007/10/jqueryscrollto.html + */ ;(function($){var m=$.scrollTo=function(b,h,f){$(window).scrollTo(b,h,f)};m.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1};m.window=function(b){return $(window).scrollable()};$.fn.scrollable=function(){return this.map(function(){var b=this,h=!b.nodeName||$.inArray(b.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!h)return b;var f=(b.contentWindow||b).document||b.ownerDocument||b;return $.browser.safari||f.compatMode=='BackCompat'?f.body:f.documentElement})};$.fn.scrollTo=function(l,j,a){if(typeof j=='object'){a=j;j=0}if(typeof a=='function')a={onAfter:a};if(l=='max')l=9e9;a=$.extend({},m.defaults,a);j=j||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;if(a.queue)j/=2;a.offset=n(a.offset);a.over=n(a.over);return this.scrollable().each(function(){var k=this,o=$(k),d=l,p,g={},q=o.is('html,body');switch(typeof d){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px)?$/.test(d)){d=n(d);break}d=$(d,this);case'object':if(d.is||d.style)p=(d=$(d)).offset()}$.each(a.axis.split(''),function(b,h){var f=h=='x'?'Left':'Top',i=f.toLowerCase(),c='scroll'+f,r=k[c],s=h=='x'?'Width':'Height';if(p){g[c]=p[i]+(q?0:r-o.offset()[i]);if(a.margin){g[c]-=parseInt(d.css('margin'+f))||0;g[c]-=parseInt(d.css('border'+f+'Width'))||0}g[c]+=a.offset[i]||0;if(a.over[i])g[c]+=d[s.toLowerCase()]()*a.over[i]}else g[c]=d[i];if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],u(s));if(!b&&a.queue){if(r!=g[c])t(a.onAfterFirst);delete g[c]}});t(a.onAfter);function t(b){o.animate(g,j,a.easing,b&&function(){b.call(this,l,a)})};function u(b){var h='scroll'+b;if(!q)return k[h];var f='client'+b,i=k.ownerDocument.documentElement,c=k.ownerDocument.body;return Math.max(i[h],c[h])-Math.min(i[f],c[f])}}).end()};function n(b){return typeof b=='object'?b:{top:b,left:b}}})(jQuery); \ No newline at end of file diff --git a/pathod/pathod/static/pathod.css b/pathod/static/pathod.css similarity index 100% rename from pathod/pathod/static/pathod.css rename to pathod/static/pathod.css diff --git a/pathod/pathod/static/start_quote.png b/pathod/static/start_quote.png similarity index 100% rename from pathod/pathod/static/start_quote.png rename to pathod/static/start_quote.png diff --git a/pathod/pathod/static/syntax.css b/pathod/static/syntax.css similarity index 100% rename from pathod/pathod/static/syntax.css rename to pathod/static/syntax.css diff --git a/pathod/pathod/static/torture.png b/pathod/static/torture.png similarity index 100% rename from pathod/pathod/static/torture.png rename to pathod/static/torture.png diff --git a/pathod/pathod/templates/about.html b/pathod/templates/about.html similarity index 100% rename from pathod/pathod/templates/about.html rename to pathod/templates/about.html diff --git a/pathod/pathod/templates/docframe.html b/pathod/templates/docframe.html similarity index 100% rename from pathod/pathod/templates/docframe.html rename to pathod/templates/docframe.html diff --git a/pathod/pathod/templates/docs_lang.html b/pathod/templates/docs_lang.html similarity index 100% rename from pathod/pathod/templates/docs_lang.html rename to pathod/templates/docs_lang.html diff --git a/pathod/pathod/templates/docs_lang_requests.html b/pathod/templates/docs_lang_requests.html similarity index 100% rename from pathod/pathod/templates/docs_lang_requests.html rename to pathod/templates/docs_lang_requests.html diff --git a/pathod/pathod/templates/docs_lang_responses.html b/pathod/templates/docs_lang_responses.html similarity index 100% rename from pathod/pathod/templates/docs_lang_responses.html rename to pathod/templates/docs_lang_responses.html diff --git a/pathod/pathod/templates/docs_lang_websockets.html b/pathod/templates/docs_lang_websockets.html similarity index 100% rename from pathod/pathod/templates/docs_lang_websockets.html rename to pathod/templates/docs_lang_websockets.html diff --git a/pathod/pathod/templates/docs_libpathod.html b/pathod/templates/docs_libpathod.html similarity index 100% rename from pathod/pathod/templates/docs_libpathod.html rename to pathod/templates/docs_libpathod.html diff --git a/pathod/pathod/templates/docs_pathoc.html b/pathod/templates/docs_pathoc.html similarity index 100% rename from pathod/pathod/templates/docs_pathoc.html rename to pathod/templates/docs_pathoc.html diff --git a/pathod/pathod/templates/docs_pathod.html b/pathod/templates/docs_pathod.html similarity index 100% rename from pathod/pathod/templates/docs_pathod.html rename to pathod/templates/docs_pathod.html diff --git a/pathod/pathod/templates/docs_test.html b/pathod/templates/docs_test.html similarity index 100% rename from pathod/pathod/templates/docs_test.html rename to pathod/templates/docs_test.html diff --git a/pathod/pathod/templates/download.html b/pathod/templates/download.html similarity index 100% rename from pathod/pathod/templates/download.html rename to pathod/templates/download.html diff --git a/pathod/pathod/templates/examples_context.html b/pathod/templates/examples_context.html similarity index 100% rename from pathod/pathod/templates/examples_context.html rename to pathod/templates/examples_context.html diff --git a/pathod/pathod/templates/examples_setup.html b/pathod/templates/examples_setup.html similarity index 100% rename from pathod/pathod/templates/examples_setup.html rename to pathod/templates/examples_setup.html diff --git a/pathod/pathod/templates/examples_setupall.html b/pathod/templates/examples_setupall.html similarity index 100% rename from pathod/pathod/templates/examples_setupall.html rename to pathod/templates/examples_setupall.html diff --git a/pathod/pathod/templates/frame.html b/pathod/templates/frame.html similarity index 100% rename from pathod/pathod/templates/frame.html rename to pathod/templates/frame.html diff --git a/pathod/pathod/templates/index.html b/pathod/templates/index.html similarity index 100% rename from pathod/pathod/templates/index.html rename to pathod/templates/index.html diff --git a/pathod/pathod/templates/layout.html b/pathod/templates/layout.html similarity index 100% rename from pathod/pathod/templates/layout.html rename to pathod/templates/layout.html diff --git a/pathod/pathod/templates/log.html b/pathod/templates/log.html similarity index 100% rename from pathod/pathod/templates/log.html rename to pathod/templates/log.html diff --git a/pathod/pathod/templates/onelog.html b/pathod/templates/onelog.html similarity index 100% rename from pathod/pathod/templates/onelog.html rename to pathod/templates/onelog.html diff --git a/pathod/pathod/templates/request_preview.html b/pathod/templates/request_preview.html similarity index 100% rename from pathod/pathod/templates/request_preview.html rename to pathod/templates/request_preview.html diff --git a/pathod/pathod/templates/request_previewform.html b/pathod/templates/request_previewform.html similarity index 100% rename from pathod/pathod/templates/request_previewform.html rename to pathod/templates/request_previewform.html diff --git a/pathod/pathod/templates/response_preview.html b/pathod/templates/response_preview.html similarity index 100% rename from pathod/pathod/templates/response_preview.html rename to pathod/templates/response_preview.html diff --git a/pathod/pathod/templates/response_previewform.html b/pathod/templates/response_previewform.html similarity index 100% rename from pathod/pathod/templates/response_previewform.html rename to pathod/templates/response_previewform.html diff --git a/pathod/pathod/test.py b/pathod/test.py similarity index 100% rename from pathod/pathod/test.py rename to pathod/test.py diff --git a/pathod/pathod/utils.py b/pathod/utils.py similarity index 100% rename from pathod/pathod/utils.py rename to pathod/utils.py diff --git a/pathod/pathod/version.py b/pathod/version.py similarity index 100% rename from pathod/pathod/version.py rename to pathod/version.py diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 6efbdeae4..000000000 --- a/pytest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pytest] -testpaths = test -addopts = --timeout 30 -s diff --git a/requirements.txt b/requirements.txt index e8b49f2fe..9d5d5bbbd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,2 @@ --e ./netlib[dev] --e ./pathod[dev] --e ./mitmproxy[dev,examples,contentviews] +-e .[dev,examples,contentviews] -e ./release \ No newline at end of file diff --git a/mitmproxy/setup.cfg b/setup.cfg similarity index 85% rename from mitmproxy/setup.cfg rename to setup.cfg index 1151288f1..2155af3c5 100644 --- a/mitmproxy/setup.cfg +++ b/setup.cfg @@ -9,3 +9,4 @@ ignore = E251 [pytest] testpaths = test +addopts = --timeout 30 -s \ No newline at end of file diff --git a/mitmproxy/setup.py b/setup.py similarity index 76% rename from mitmproxy/setup.py rename to setup.py index 5f8c6d424..d7c86e3c2 100644 --- a/mitmproxy/setup.py +++ b/setup.py @@ -8,7 +8,6 @@ import sys here = os.path.abspath(os.path.dirname(__file__)) -sys.path.append(os.path.join(here, "..", "netlib")) from mitmproxy import version with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f: @@ -30,6 +29,7 @@ setup( "Environment :: Console :: Curses", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", + "Operating System :: Microsoft :: Windows", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", @@ -41,37 +41,52 @@ setup( "Topic :: Internet :: Proxy Servers", "Topic :: Software Development :: Testing" ], - packages=find_packages(), + packages=find_packages(include=[ + "mitmproxy", "mitmproxy.*", + "pathod", "pathod.*", + "netlib", "netlib.*" + ]), include_package_data=True, entry_points={ 'console_scripts': [ - 'mitmproxy = mitmproxy.main:mitmproxy', - 'mitmdump = mitmproxy.main:mitmdump', - 'mitmweb = mitmproxy.main:mitmweb' + "mitmproxy = mitmproxy.main:mitmproxy", + "mitmdump = mitmproxy.main:mitmdump", + "mitmweb = mitmproxy.main:mitmweb", + "pathod = pathod.pathod_cmdline:go_pathod", + "pathoc = pathod.pathoc_cmdline:go_pathoc" ] }, # https://packaging.python.org/en/latest/requirements/#install-requires # It is not considered best practice to use install_requires to pin dependencies to specific versions. install_requires=[ - "netlib=={}".format(version.VERSION), - "h2>=2.1.2, <3.0", - "tornado>=4.3, <4.4", - "configargparse>=0.10, <0.11", - "pyperclip>=1.5.22, <1.6", + "backports.ssl_match_hostname>=3.5.0.1, <3.6", "blinker>=1.4, <1.5", - "pyparsing>=2.1,<2.2", - "html2text==2016.1.8", - "construct>=2.5.2, <2.6", - "six>=1.10, <1.11", - "Pillow>=3.1, <3.2", - "watchdog>=0.8.3, <0.9", "click>=6.2, <7.0", + "certifi>=2015.11.20.1", # no semver here - this should always be on the last release! + "configargparse>=0.10, <0.11", + "construct>=2.5.2, <2.6", + "cryptography>=1.2.2, <1.3", + "Flask>=0.10.1, <0.11", + "h2>=2.1.2, <3.0", + "hpack>=2.1.0, <3.0", + "html2text==2016.1.8", + "hyperframe>=3.2.0, <4.0", + "Pillow>=3.1, <3.2", + "passlib>=1.6.5, <1.7", + "pyasn1>=0.1.9, <0.2", + "pyOpenSSL>=0.15.1, <0.16", + "pyparsing>=2.1,<2.2", + "pyperclip>=1.5.22, <1.6", + "requests>=2.9.1, <2.10", + "six>=1.10, <1.11", + "tornado>=4.3, <4.4", "urwid>=1.3.1, <1.4", + "watchdog>=0.8.3, <0.9", ], extras_require={ ':sys_platform == "win32"': [ - "pydivert>=0.0.7, <0.1", "lxml==3.4.4", # there are no Windows wheels for newer versions, so we pin this. + "pydivert>=0.0.7, <0.1", ], ':sys_platform != "win32"': [ "lxml>=3.5.0, <3.6", @@ -80,28 +95,28 @@ setup( # Ubuntu Trusty and other still ship with setuptools < 17.1 ':python_version == "2.7"': [ "enum34>=1.0.4, <2", + "ipaddress>=1.0.15, <1.1", ], 'dev': [ + "coveralls>=1.1, <1.2", "mock>=1.3.0, <1.4", "pytest>=2.8.7, <2.9", - "pytest-xdist>=1.14, <1.15", "pytest-cov>=2.2.1, <2.3", "pytest-timeout>=1.0.0, <1.1", - "coveralls>=1.1, <1.2", - "pathod=={}".format(version.VERSION), + "pytest-xdist>=1.14, <1.15", "sphinx>=1.3.5, <1.4", "sphinx-autobuild>=0.5.2, <0.7", - "sphinxcontrib-documentedlist>=0.3.0, <0.4" + "sphinxcontrib-documentedlist>=0.3.0, <0.4", ], 'contentviews': [ - "pyamf>=0.8.0, <0.9", + "cssutils>=1.0.1, <1.1", "protobuf>=2.6.1, <2.7", - "cssutils>=1.0.1, <1.1" + "pyamf>=0.8.0, <0.9", ], 'examples': [ - "pytz==2015.7.0", - "harparser>=0.2, <0.3", "beautifulsoup4>=4.4.1, <4.5", + "harparser>=0.2, <0.3", + "pytz==2015.7.0", ] } )