diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-11-16 22:39:15 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-11-18 12:59:59 +0100 |
commit | 5ce370e2a9eef7d81d5bafb5d1fa0e2cb1397c83 (patch) | |
tree | 7e079036b4e04830f810f3ba8fc87b8974aa1507 | |
parent | e8067a247418db62f1d2453bcf3c9a4a266f4588 (diff) | |
download | mitmproxy-5ce370e2a9eef7d81d5bafb5d1fa0e2cb1397c83.tar.gz mitmproxy-5ce370e2a9eef7d81d5bafb5d1fa0e2cb1397c83.tar.bz2 mitmproxy-5ce370e2a9eef7d81d5bafb5d1fa0e2cb1397c83.zip |
lint!
-rw-r--r-- | mitmproxy/flowfilter.py | 2 | ||||
-rw-r--r-- | mitmproxy/http.py | 1 | ||||
-rw-r--r-- | mitmproxy/net/http/cookies.py | 1 | ||||
-rw-r--r-- | mitmproxy/net/socks.py | 1 | ||||
-rw-r--r-- | mitmproxy/net/tcp.py | 1 | ||||
-rw-r--r-- | mitmproxy/tools/console/common.py | 1 | ||||
-rw-r--r-- | mitmproxy/tools/console/flowlist.py | 2 | ||||
-rw-r--r-- | mitmproxy/tools/console/flowview.py | 3 | ||||
-rw-r--r-- | mitmproxy/tools/console/options.py | 2 | ||||
-rw-r--r-- | mitmproxy/tools/console/palettepicker.py | 2 | ||||
-rw-r--r-- | mitmproxy/tools/console/signals.py | 1 | ||||
-rw-r--r-- | test/mitmproxy/tools/benchtool.py | 1 | ||||
-rw-r--r-- | test/mitmproxy/tools/passive_close.py | 1 |
13 files changed, 18 insertions, 1 deletions
diff --git a/mitmproxy/flowfilter.py b/mitmproxy/flowfilter.py index ee5224c6..3a44efd1 100644 --- a/mitmproxy/flowfilter.py +++ b/mitmproxy/flowfilter.py @@ -482,9 +482,9 @@ def _make(): ]) expr = pp.OneOrMore(expr) return expr.setParseAction(lambda x: FAnd(x) if len(x) != 1 else x) -bnf = _make() +bnf = _make() TFilter = Callable[[flow.Flow], bool] diff --git a/mitmproxy/http.py b/mitmproxy/http.py index dafd4782..9c59984a 100644 --- a/mitmproxy/http.py +++ b/mitmproxy/http.py @@ -251,6 +251,7 @@ def make_connect_response(http_version): b"", ) + expect_continue_response = HTTPResponse( b"HTTP/1.1", 100, b"Continue", http.Headers(), b"" ) diff --git a/mitmproxy/net/http/cookies.py b/mitmproxy/net/http/cookies.py index 2f99568b..01d42d46 100644 --- a/mitmproxy/net/http/cookies.py +++ b/mitmproxy/net/http/cookies.py @@ -42,6 +42,7 @@ class CookieAttrs(multidict.MultiDict): # if we take the last part. return values[-1] + SetCookie = collections.namedtuple("SetCookie", ["value", "attrs"]) diff --git a/mitmproxy/net/socks.py b/mitmproxy/net/socks.py index 115949f5..a972283e 100644 --- a/mitmproxy/net/socks.py +++ b/mitmproxy/net/socks.py @@ -12,6 +12,7 @@ class SocksError(Exception): super().__init__(message) self.code = code + VERSION = bidi.BiDi( SOCKS4=0x04, SOCKS5=0x05 diff --git a/mitmproxy/net/tcp.py b/mitmproxy/net/tcp.py index ac368a9c..3437452f 100644 --- a/mitmproxy/net/tcp.py +++ b/mitmproxy/net/tcp.py @@ -106,6 +106,7 @@ class SSLKeyLogger: return SSLKeyLogger(filename) return False + log_ssl_key = SSLKeyLogger.create_logfun( os.getenv("MITMPROXY_SSLKEYLOGFILE") or os.getenv("SSLKEYLOGFILE")) diff --git a/mitmproxy/tools/console/common.py b/mitmproxy/tools/console/common.py index cfc69bfc..a8e7f59f 100644 --- a/mitmproxy/tools/console/common.py +++ b/mitmproxy/tools/console/common.py @@ -119,6 +119,7 @@ def fcol(s, attr): ) ) + if urwid.util.detected_encoding: SYMBOL_REPLAY = u"\u21ba" SYMBOL_RETURN = u"\u2190" diff --git a/mitmproxy/tools/console/flowlist.py b/mitmproxy/tools/console/flowlist.py index c70ebba4..395a9d52 100644 --- a/mitmproxy/tools/console/flowlist.py +++ b/mitmproxy/tools/console/flowlist.py @@ -41,6 +41,8 @@ def _mkhelp(): ] text.extend(common.format_keyvals(keys, key="key", val="text", indent=4)) return text + + help_context = _mkhelp() footer = [ diff --git a/mitmproxy/tools/console/flowview.py b/mitmproxy/tools/console/flowview.py index a66a0cea..e2b24fab 100644 --- a/mitmproxy/tools/console/flowview.py +++ b/mitmproxy/tools/console/flowview.py @@ -90,6 +90,8 @@ def _mkhelp(): ] text.extend(common.format_keyvals(keys, key="key", val="text", indent=4)) return text + + help_context = _mkhelp() footer = [ @@ -120,6 +122,7 @@ class FlowViewHeader(urwid.WidgetWrap): hostheader=self.master.options.showhost ) + TAB_REQ = 0 TAB_RESP = 1 diff --git a/mitmproxy/tools/console/options.py b/mitmproxy/tools/console/options.py index a1b6bd3c..824041dc 100644 --- a/mitmproxy/tools/console/options.py +++ b/mitmproxy/tools/console/options.py @@ -21,6 +21,8 @@ def _mkhelp(): ] text.extend(common.format_keyvals(keys, key="key", val="text", indent=4)) return text + + help_context = _mkhelp() diff --git a/mitmproxy/tools/console/palettepicker.py b/mitmproxy/tools/console/palettepicker.py index 4554a1b6..a3eb9b90 100644 --- a/mitmproxy/tools/console/palettepicker.py +++ b/mitmproxy/tools/console/palettepicker.py @@ -17,6 +17,8 @@ def _mkhelp(): ] text.extend(common.format_keyvals(keys, key="key", val="text", indent=4)) return text + + help_context = _mkhelp() diff --git a/mitmproxy/tools/console/signals.py b/mitmproxy/tools/console/signals.py index 3cd8bc4b..cb71c5c1 100644 --- a/mitmproxy/tools/console/signals.py +++ b/mitmproxy/tools/console/signals.py @@ -11,6 +11,7 @@ def add_log(e, level): level=level ) + # Show a status message in the action bar status_message = blinker.Signal() diff --git a/test/mitmproxy/tools/benchtool.py b/test/mitmproxy/tools/benchtool.py index 9e2ab8ee..b9078d0e 100644 --- a/test/mitmproxy/tools/benchtool.py +++ b/test/mitmproxy/tools/benchtool.py @@ -51,5 +51,6 @@ def main(profiler, clock_type, concurrency): stats.save(outfile, type='callgrind') print("Done.") + if __name__ == '__main__': main() diff --git a/test/mitmproxy/tools/passive_close.py b/test/mitmproxy/tools/passive_close.py index 71b1022f..6f97ea4f 100644 --- a/test/mitmproxy/tools/passive_close.py +++ b/test/mitmproxy/tools/passive_close.py @@ -19,5 +19,6 @@ class service(socketserver.BaseRequestHandler): class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer): pass + server = ThreadedTCPServer(('', 1520), service) server.serve_forever() |