diff options
| author | ColdFire <9128903+fenilgandhi@users.noreply.github.com> | 2018-02-23 00:27:10 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-23 00:27:10 +0530 |
| commit | 777cb98a86f3e8883383935661e2ed20ed9b6bd4 (patch) | |
| tree | 67d3e1259dccb83866496f45fe20ac3bd76961ce /examples/simple | |
| parent | 6bf250aa3e8ede84d16170d95728c6488444a5a8 (diff) | |
| parent | 58ccad7576e5fd33e937aba58df2f9edc389e52e (diff) | |
| download | mitmproxy-777cb98a86f3e8883383935661e2ed20ed9b6bd4.tar.gz mitmproxy-777cb98a86f3e8883383935661e2ed20ed9b6bd4.tar.bz2 mitmproxy-777cb98a86f3e8883383935661e2ed20ed9b6bd4.zip | |
Merge branch 'master' into issue-2872
Diffstat (limited to 'examples/simple')
| -rw-r--r-- | examples/simple/custom_contentview.py | 4 | ||||
| -rw-r--r-- | examples/simple/custom_option.py | 10 | ||||
| -rw-r--r-- | examples/simple/log_events.py | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/examples/simple/custom_contentview.py b/examples/simple/custom_contentview.py index b958bdce..77d32474 100644 --- a/examples/simple/custom_contentview.py +++ b/examples/simple/custom_contentview.py @@ -7,10 +7,6 @@ from mitmproxy import contentviews class ViewSwapCase(contentviews.View): name = "swapcase" - - # We don't have a good solution for the keyboard shortcut yet - - # you manually need to find a free letter. Contributions welcome :) - prompt = ("swap case text", "z") content_types = ["text/plain"] def __call__(self, data, **metadata) -> contentviews.TViewResult: diff --git a/examples/simple/custom_option.py b/examples/simple/custom_option.py index 5b6070dd..8d0cfe7f 100644 --- a/examples/simple/custom_option.py +++ b/examples/simple/custom_option.py @@ -1,3 +1,13 @@ +""" +This example shows how addons can register custom options +that can be configured at startup or during execution +from the options dialog within mitmproxy. + +Example: + +$ mitmproxy --set custom=true +$ mitmproxy --set custom # shorthand for boolean options +""" from mitmproxy import ctx diff --git a/examples/simple/log_events.py b/examples/simple/log_events.py index 581b99f3..b9aa2c1f 100644 --- a/examples/simple/log_events.py +++ b/examples/simple/log_events.py @@ -1,8 +1,6 @@ """ It is recommended to use `ctx.log` for logging within a script. -This goes to the event log in mitmproxy and to stdout in mitmdump. - -If you want to help us out: https://github.com/mitmproxy/mitmproxy/issues/1530 :-) +print() statements are equivalent to ctx.log.warn(). """ from mitmproxy import ctx |
