diff --git a/lib/core/option.py b/lib/core/option.py index 83da7f6de..89654fd29 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -150,7 +150,7 @@ proxyHandler = urllib2.BaseHandler() redirectHandler = SmartRedirectHandler() rangeHandler = HTTPRangeHandler() -def __urllib2Opener(): +def _urllib2Opener(): """ This function creates the urllib2 OpenerDirector. """ @@ -1300,9 +1300,9 @@ def _cleanupOptions(): width = getConsoleWidth() if conf.eta: - conf.progressWidth = width-26 + conf.progressWidth = width - 26 else: - conf.progressWidth = width-46 + conf.progressWidth = width - 46 if conf.testParameter: conf.testParameter = urldecode(conf.testParameter) @@ -2087,7 +2087,7 @@ def init(inputOptions=AttribDict(), overrideOptions=False): _setSafeUrl() _setGoogleDorking() _setBulkMultipleTargets() - __urllib2Opener() + _urllib2Opener() _checkTor() _setCrawler() _findPageForms() diff --git a/lib/parse/payloads.py b/lib/parse/payloads.py index 30e9b8533..9a8a2568d 100644 --- a/lib/parse/payloads.py +++ b/lib/parse/payloads.py @@ -16,21 +16,13 @@ def cleanupVals(text, tag): text = text.split(',') if isinstance(text, basestring): - if text.isdigit(): - text = int(text) - else: - text = str(text) + text = int(text) if text.isdigit() else str(text) elif isinstance(text, list): count = 0 - for t in text: - if t.isdigit(): - t = int(t) - else: - t = str(t) - - text[count] = t + for _ in text: + text[count] = int(_) if _.isdigit() else str(_) count += 1 if len(text) == 1 and tag not in ("clause", "where"):