aboutsummaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* configure(options, updated) -> configure(updated)Aldo Cortesi2017-04-262-10/+5
| | | | | Options are now available globally on ctx, so the first argument of configure is redundant.
* Revamp how addons workAldo Cortesi2017-04-256-49/+26
| | | | | | | | | | | | | | | | | | | - Addons now nest, which means that addons can manage addons. This has a number of salutary effects - the scripts addon no longer has to poke into the global addons list, we no longer have to replace/remove/boot-outof parent addons when we load scripts, and this paves the way for making our top-level tools into addons themselves. - All addon calls are now wrapped in a safe execution environment where exceptions are caught, and output to stdout/stderr are intercepted and turned into logs. - We no longer support script arguments in sys.argv - creating an option properly is the only way to pass arguments. This means that all scripts are always directly controllable from interctive tooling, and that arguments are type-checked. For now, I've disabled testing of the har dump example - it needs to be moved to the new argument handling, and become a class addon. I'll address that in a separate patch.
* proxapp -> proxapp.localMaximilian Hils2017-03-261-2/+2
| | | Chrome doesn't like it if there's no TLD.
* addon loader: add boot_into, which replaces returning from start()Aldo Cortesi2017-03-2513-20/+20
| | | | | While we're here, expand test coverage for addonmanager to 100%, and promote to individual coverage.
* addons: start -> load throughoutAldo Cortesi2017-03-2513-13/+13
|
* Remove test handlers by using taddons.RecordingMasterAldo Cortesi2017-03-161-43/+0
| | | | | This also means expanding and tweaking the recording master API, which we reflect through the current test suite
* Enable custom options in config filesAldo Cortesi2017-03-141-1/+2
| | | | | We also now ignore unknown options in config files by default, and print a warning if verbosity is incremented.
* Optmanager: handle unknown options in value setsAldo Cortesi2017-03-141-1/+1
|
* Enable custom options for addonsAldo Cortesi2017-03-1413-19/+30
| | | | | | | | - Add an options parameter to the start() event. This is to be used by addons on startup to add custom options. - Add a running() event that is called once the proxy is up and running. - With the new paradigm we can't log during master __init__, so add a tiny termstatus addon to print proxy status to terminal once we're running.
* fix tcp.Address leftoversMaximilian Hils2017-03-081-1/+1
| | | this fixes the issue described in https://github.com/mitmproxy/mitmproxy/issues/2119#issuecomment-285067292
* Merge branch 'master' into on-issuesNikhil Soni2017-03-032-7/+410
|\
| * added XSS scanner example (#1907)David Dworken2017-02-271-0/+407
| |
| * Remove pytz in hardumpUjjwal Verma2017-02-251-7/+3
| |
* | Changes dns_spoofing example to use --keep-host-headerNikhil Soni2017-03-031-8/+3
|/
* protobuf: coverage++Thomas Kriechbaumer2017-02-191-1/+1
|
* .headers["host"] -> .host_headerMaximilian Hils2017-02-181-2/+2
|
* fix typoMaximilian Hils2017-02-141-1/+1
|
* Encoding fixes and testsUjjwal Verma2017-02-051-1/+2
|
* Reset the host header to the correct destinationAmmonite2017-01-301-0/+1
|
* Store original host in flow metadataAmmonite2017-01-291-7/+5
|
* Fix host extractionAmmonite2017-01-221-1/+1
|
* Follow PEP-8 and add commentAmmonite2017-01-221-5/+8
|
* Add blank lines for lintAmmonite2017-01-211-0/+2
|
* Change class nameAmmonite2017-01-201-2/+2
|
* Get the the original header in requestheaders instead of requestAmmonite2017-01-201-19/+28
|
* update stream.pyFeei2017-01-161-2/+2
|
* update log_events.pyFeei2017-01-161-2/+2
|
* rename logging.py example. this conflicted with Python's stdlibMaximilian Hils2016-12-191-0/+0
|
* fix #1858Maximilian Hils2016-12-191-1/+1
|
* minor fixesMaximilian Hils2016-12-101-1/+1
|
* remove lxml-dependent codeMaximilian Hils2016-12-101-1/+1
|
* mitmweb: 100% app test coverage, numerous fixesMaximilian Hils2016-11-231-1/+2
|
* remove mitmweb authMaximilian Hils2016-11-221-1/+1
| | | | | 9b08279c7c3384f716b66329fefbe97a368189a2 removed the actual functionality. we should not have a command line switch that does nothing. :)
* remove stickycookie exampleMaximilian Hils2016-11-212-43/+0
| | | | The recommended way to do this is mitmproxy/addons/stickycookie.py
* organize examplesMaximilian Hils2016-11-2140-236/+159
| | | | | | | This commit is largely based on work by Thiago Arrais (@thiagoarrais) and Shane Bradfield (@l33tLumberjack). I wasn't really able to get their PR reasonably merged onto the latest master, so I reapplied their changes manually here and did some further improvements on that.
* Remove dead run_scripthooks example reference.Mike Fotinakis2016-11-171-1/+1
|
* explain host=pretty_host assignmentMaximilian Hils2016-11-091-0/+4
|
* fix SNI for transparent mode - #1638phackt2016-11-081-0/+1
| | | | | | In transparent mode host is set with the target server ip. Attribute flow.request.host is used as SNI while mitmproxy is initiating TLS handshake, so it should be set with the pretty_host.
* Let's not over-ride __bool__ on connection objectsAldo Cortesi2016-11-041-1/+1
| | | | | If I had a thousand years and every thesaurus in the world, I still couldn't adequately express how much I dislike this piece of interface design.
* rename logging .py to prevent import errorsThomas Kriechbaumer2016-10-291-0/+0
|
* fix #1678Maximilian Hils2016-10-271-3/+4
|
* minor fixesMaximilian Hils2016-10-251-3/+3
|
* Include `boudary=...` in mutipart postData Slobodan Mišković2016-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | While the HAR spec is not very explicit and their example shows just this one example: ```json "postData": { "mimeType": "multipart/form-data" } ``` Would it not make sense to include all the information necessary to parse out the post data `text`. Eg. ```json "postData": { "text": "--xYzZY\r\nContent-Disposition: form-data; name=\"sort1\"\r\n\r\noldest date first\r\n--xYzZY--\r\n", "mimeType": "multipart/form-data; boundary=xYzZY" }, ``` Currently, full mimeType is included only in `content-type` request header. Elsewhere in HAR spec they include the 'extras', eg ```json "content": { "mimeType": "text/html; charset=utf-8" } ``` So one could argue that `mimeType` should include all information necessary to interpret the data. In case of `multipart/form-data`, as per RFC2046 http://www.ietf.org/rfc/rfc2046.txt ``` The Content-Type field for multipart entities requires one parameter, "boundary". ``` I believe that earlier incarnations, eg `har_exporter.py` included it in the mimeType.
* various encoding fixes, fix #1650Maximilian Hils2016-10-221-22/+17
|
* Handle `bytes` in request parametersSlobodan Mišković2016-10-221-2/+10
|
* The first argument should be the filter, then the flow.Brady Law2016-10-211-1/+1
|
* The final piece: netlib -> mitproxy.netAldo Cortesi2016-10-201-1/+1
|
* netlib.strutils -> mitmproxy.utils.strutilsAldo Cortesi2016-10-203-3/+3
|
* netlib.version -> mitmproxy.versionAldo Cortesi2016-10-201-1/+1
|
* mitmproxy.protocol -> mitmproxy.proxy.protocolAldo Cortesi2016-10-191-1/+1
| | | | | The protocols here are compltely proxy-specific, are only used from within the proxy module, and are not exposed to users.