diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-10-01 12:48:26 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-10-01 12:48:26 +1300 |
commit | 41f1c66772c6546fc39b9dcf64d8c04992a2e1ab (patch) | |
tree | d23e4c8eac5da25693f936e5e77d9fdb2b015e71 /pathod | |
parent | 915bcfbd305d7b18de07f4f40dab1e49a06b132c (diff) | |
download | mitmproxy-41f1c66772c6546fc39b9dcf64d8c04992a2e1ab.tar.gz mitmproxy-41f1c66772c6546fc39b9dcf64d8c04992a2e1ab.tar.bz2 mitmproxy-41f1c66772c6546fc39b9dcf64d8c04992a2e1ab.zip |
Add -q and -r flags to pathod, logging request and respnose bytes.
- These flags also mean that a bytes log is included in the internal log
buffer.
- There's an -x flag to turn on hex dump output in the text logs (does
not affect the log buffer).
Diffstat (limited to 'pathod')
-rwxr-xr-x | pathod | 33 |
1 files changed, 24 insertions, 9 deletions
@@ -89,7 +89,10 @@ def main(parser, args): nocraft = args.nocraft, noapi = args.noapi, nohang = args.nohang, - timeout = args.timeout + timeout = args.timeout, + logreq = args.logreq, + logresp = args.logresp, + hexdump = args.hexdump ) except pathod.PathodError, v: parser.error(str(v)) @@ -124,14 +127,6 @@ if __name__ == "__main__": help='Daemonize.' ) parser.add_argument( - "-f", dest='logfile', default=None, type=str, - help='Log file.' - ) - parser.add_argument( - "--debug", dest='debug', default=False, action="store_true", - help='Enable debug output.' - ) - parser.add_argument( "-s", dest='ssl', default=False, action="store_true", help='Serve with SSL.' ) @@ -167,6 +162,26 @@ if __name__ == "__main__": "--certfile", dest='ssl_certfile', default=None, type=str, help='SSL cert file. If not specified, a default cert is used.' ) + + + group = parser.add_argument_group('Controlling Output') + group.add_argument( + "-f", dest='logfile', default=None, type=str, + help='Log to file.' + ) + group.add_argument( + "-q", dest="logreq", action="store_true", default=False, + help="Log full request" + ) + group.add_argument( + "-r", dest="logresp", action="store_true", default=False, + help="Log full response" + ) + group.add_argument( + "-x", dest="hexdump", action="store_true", default=False, + help="Log request/response in hexdump format" + ) + args = parser.parse_args() if args.daemonize: daemonize() |