diff options
| author | Aldo Cortesi <aldo@nullcube.com> | 2011-07-15 16:16:43 +1200 | 
|---|---|---|
| committer | Aldo Cortesi <aldo@nullcube.com> | 2011-07-15 16:46:54 +1200 | 
| commit | 94ae720a220da4beaa2fc6111b4cafb60b41d33b (patch) | |
| tree | 6608a4263b21c62b72245864431dc11e95f609e5 /libmproxy/utils.py | |
| parent | 76b4c6ba82f9a1d6411710c82c67cf264d3bb1d3 (diff) | |
| download | mitmproxy-94ae720a220da4beaa2fc6111b4cafb60b41d33b.tar.gz mitmproxy-94ae720a220da4beaa2fc6111b4cafb60b41d33b.tar.bz2 mitmproxy-94ae720a220da4beaa2fc6111b4cafb60b41d33b.zip | |
Add a pretty-printing mode for urlencoded form data.
Diffstat (limited to 'libmproxy/utils.py')
| -rw-r--r-- | libmproxy/utils.py | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/libmproxy/utils.py b/libmproxy/utils.py index 38fc6107..04a145d5 100644 --- a/libmproxy/utils.py +++ b/libmproxy/utils.py @@ -12,7 +12,8 @@  #   # You should have received a copy of the GNU General Public License  # along with this program.  If not, see <http://www.gnu.org/licenses/>. -import re, os, subprocess, datetime, textwrap, errno, sys, time, functools, copy +import re, os, subprocess, datetime, textwrap, errno +import time, functools, copy, cgi  import json  CERT_SLEEP_TIME = 1 @@ -120,6 +121,10 @@ def pretty_json(s):      return json.dumps(p, sort_keys=True, indent=4).split("\n") +def urldecode(s): +    return cgi.parse_qsl(s) + +  def hexdump(s):      """          Returns a set of typles: | 
