diff options
-rw-r--r-- | libmproxy/proxy.py | 4 | ||||
-rwxr-xr-x | mitmdump | 8 | ||||
-rwxr-xr-x | mitmplayback | 9 | ||||
-rwxr-xr-x | mitmproxy | 9 | ||||
-rwxr-xr-x | mitmrecord | 9 |
5 files changed, 34 insertions, 5 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 631e2470..f3ea2ed2 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -22,8 +22,9 @@ class ProxyError(Exception): class Config: - def __init__(self, pemfile): + def __init__(self, pemfile, ciphers = None): self.pemfile = pemfile + self.ciphers = ciphers def read_chunked(fp): @@ -520,6 +521,7 @@ class ProxyHandler(SocketServer.StreamRequestHandler): keyfile = config.pemfile, server_side = True, ssl_version = ssl.PROTOCOL_SSLv23, + ciphers = config.ciphers, do_handshake_on_connect = False ) self.rfile = FileLike(self.connection) @@ -32,6 +32,11 @@ if __name__ == '__main__': help = "SSL certificate file." ) parser.add_option( + "--ciphers", action="store", + type = "str", dest="ciphers", default=None, + help = "SSL ciphers." + ) + parser.add_option( "-p", "--port", action="store", type = "int", dest="port", default=8080, help = "Port." @@ -54,7 +59,8 @@ if __name__ == '__main__': utils.make_bogus_cert(certpath) proxy.config = proxy.Config( - certpath + certpath, + ciphers = options.ciphers ) server = proxy.ProxyServer(options.port) m = dump.DumpMaster(server, options.verbose) diff --git a/mitmplayback b/mitmplayback index ea802094..eb147cd9 100755 --- a/mitmplayback +++ b/mitmplayback @@ -37,6 +37,12 @@ if __name__ == '__main__': ) parser.add_option( + "--ciphers", action="store", + type = "str", dest="ciphers", default=None, + help = "SSL ciphers." + ) + + parser.add_option( "-p", "--port", action="store", type = "int", dest="port", default=8080, help = "Port." @@ -68,7 +74,8 @@ if __name__ == '__main__': utils.make_bogus_cert(certpath) proxy.config = proxy.Config( - certpath + certpath, + ciphers = options.ciphers ) server = proxy.ProxyServer(options.port) m = playback.PlaybackMaster(server, options) @@ -40,6 +40,12 @@ if __name__ == '__main__': ) parser.add_option( + "--ciphers", action="store", + type = "str", dest="ciphers", default=None, + help = "SSL ciphers." + ) + + parser.add_option( "-p", "--port", action="store", type = "int", dest="port", default=8080, help = "Port." @@ -97,7 +103,8 @@ if __name__ == '__main__': utils.make_bogus_cert(certpath) proxy.config = proxy.Config( - certpath + certpath, + ciphers = options.ciphers ) if options.cache is not None: utils.mkdir_p(options.cache) @@ -36,6 +36,12 @@ if __name__ == '__main__': ) parser.add_option( + "--ciphers", action="store", + type = "str", dest="ciphers", default=None, + help = "SSL ciphers." + ) + + parser.add_option( "-p", "--port", action="store", type = "int", dest="port", default=8080, help = "Port." @@ -73,7 +79,8 @@ if __name__ == '__main__': utils.make_bogus_cert(certpath) proxy.config = proxy.Config( - certpath + certpath, + ciphers = options.ciphers ) server = proxy.ProxyServer(options.port) utils.mkdir_p(options.cache) |