diff options
author | Marcelo Glezer <mg@tekii.com.ar> | 2015-01-16 13:08:25 -0300 |
---|---|---|
committer | Marcelo Glezer <mg@tekii.com.ar> | 2015-01-16 13:08:25 -0300 |
commit | e5922ae30ad1074fd2412019db3d6dff9cc010a1 (patch) | |
tree | a38efb00ee1f0b7ead3c4e12759978b1acc966f6 /libmproxy/console/common.py | |
parent | d80e2e2b2b125a6b38baef6e9ba6d4282354775a (diff) | |
download | mitmproxy-e5922ae30ad1074fd2412019db3d6dff9cc010a1.tar.gz mitmproxy-e5922ae30ad1074fd2412019db3d6dff9cc010a1.tar.bz2 mitmproxy-e5922ae30ad1074fd2412019db3d6dff9cc010a1.zip |
added support for 'b' key in flowlist
Diffstat (limited to 'libmproxy/console/common.py')
-rw-r--r-- | libmproxy/console/common.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libmproxy/console/common.py b/libmproxy/console/common.py index 33738c0a..2f6c909c 100644 --- a/libmproxy/console/common.py +++ b/libmproxy/console/common.py @@ -189,8 +189,36 @@ def ask_save_body(k, master, state, content): content, ) +def which_body_save(k, master, state, flow): + if k == "q": + master.path_prompt( + "Save request content: ", + state.last_saveload, + save_body, + master, + state, + flow.request.get_decoded_content(), + ) + elif k == "r": + if flow.response: + master.path_prompt( + "Save response content: ", + state.last_saveload, + save_body, + master, + state, + flow.response.get_decoded_content(), + ) + else: + master.statusbar.message("Flow has no response") + ## common copy_message parts def copy_message( k, master, state, message): + if not message: + # only response could be None + master.statusbar.message("Flow has no response") + return + if pyperclip: if k == "c": try: |