From 5ef1281611484f8acfa84c6e222985dfd80a89ab Mon Sep 17 00:00:00 2001 From: lanjelot Date: Wed, 17 Oct 2012 15:24:47 +1100 Subject: [PATCH] added url encoding --- patator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/patator.py b/patator.py index 3321f38..37a377a 100755 --- a/patator.py +++ b/patator.py @@ -610,12 +610,12 @@ from collections import defaultdict try: # python3+ from queue import Queue, Empty, Full - from urllib.parse import quote, urlencode, urlparse, urlunparse, parse_qsl + from urllib.parse import quote, urlencode, urlparse, urlunparse, parse_qsl, quote_plus from io import StringIO except ImportError: # python2.6+ from Queue import Queue, Empty, Full - from urllib import quote, urlencode + from urllib import quote, urlencode, quote_plus from urlparse import urlparse, urlunparse, parse_qsl from cStringIO import StringIO @@ -707,6 +707,7 @@ class Controller: 'b64': (b64encode, 'encode in base64'), 'md5': (md5hex, 'hash in md5'), 'sha1': (sha1hex, 'hash in sha1'), + 'url': (quote_plus, 'url encode'), } def expand_key(self, arg):