diff --git a/lib/request/connect.py b/lib/request/connect.py index 488586f7b..080a7773f 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -736,7 +736,9 @@ class Connect(object): else: get += "%s%s=%s" % (delimiter, name, value) - get = urlencode(get, limit=True) + if not skipUrlEncode: + get = urlencode(get, limit=True) + if post is not None: if place not in (PLACE.POST, PLACE.CUSTOM_POST) and hasattr(post, UNENCODED_ORIGINAL_VALUE): post = getattr(post, UNENCODED_ORIGINAL_VALUE) diff --git a/lib/techniques/error/use.py b/lib/techniques/error/use.py index 9bec5ec65..a06148956 100644 --- a/lib/techniques/error/use.py +++ b/lib/techniques/error/use.py @@ -119,7 +119,8 @@ def _oneShotErrorUse(expression, field=None): threadData.lastRequestUID else None, re.DOTALL | re.IGNORECASE) if trimmed: - warnMsg = "possible server trimmed output detected (due to its length): " + warnMsg = "possible server trimmed output detected " + warnMsg += "(due to its length and/or content): " warnMsg += safecharencode(trimmed) logger.warn(warnMsg) diff --git a/lib/techniques/union/use.py b/lib/techniques/union/use.py index 2325b9daf..6e78263b6 100644 --- a/lib/techniques/union/use.py +++ b/lib/techniques/union/use.py @@ -102,7 +102,8 @@ def _oneShotUnionUse(expression, unpack=True, limited=False): trimmed = _("%s(?P.*?)<" % (kb.chars.start)) if trimmed: - warnMsg = "possible server trimmed output detected (probably due to its length): " + warnMsg = "possible server trimmed output detected " + warnMsg += "(probably due to its length and/or content): " warnMsg += safecharencode(trimmed) logger.warn(warnMsg) diff --git a/lib/utils/xrange.py b/lib/utils/xrange.py index 6ce1b9f48..b8737745a 100644 --- a/lib/utils/xrange.py +++ b/lib/utils/xrange.py @@ -7,20 +7,18 @@ See the file 'doc/COPYING' for copying permission class xrange(object): """ - Advanced implementation of xrange (supports slice/copy/etc.) + Advanced (re)implementation of xrange (supports slice/copy/etc.) Reference: http://code.activestate.com/recipes/521885-a-pythonic-implementation-of-xrange/ """ __slots__ = ['_slice'] def __init__(self, *args): - if args and isinstance(args[0], xrange): + if args and isinstance(args[0], type(self)): self._slice = slice(args[0].start, args[0].stop, args[0].step) else: self._slice = slice(*args) if self._slice.stop is None: - # slice(*args) will never put None in stop unless it was - # given as None explicitly. raise TypeError("xrange stop must not be None") @property @@ -47,7 +45,7 @@ class xrange(object): cmp(self._slice, other._slice)) def __repr__(self): - return '%s(%r, %r, %r)' % (self.__class__.__name__, + return '%s(%r, %r, %r)' % (type(self).__name__, self.start, self.stop, self.step) def __len__(self): diff --git a/xml/livetests.xml b/xml/livetests.xml index 5a78cf303..2b47fbab1 100644 --- a/xml/livetests.xml +++ b/xml/livetests.xml @@ -2003,8 +2003,8 @@ - - + + @@ -2017,7 +2017,7 @@ - + @@ -2032,7 +2032,7 @@ - + @@ -2043,7 +2043,7 @@ - + @@ -2053,7 +2053,7 @@ - + @@ -2068,7 +2068,7 @@ - + @@ -2080,7 +2080,7 @@ - + @@ -2091,7 +2091,7 @@ - + @@ -2102,7 +2102,7 @@ - + @@ -2111,7 +2111,7 @@ - + @@ -2126,7 +2126,7 @@ - + @@ -2141,10 +2141,10 @@ - + - + @@ -2156,7 +2156,7 @@ - + @@ -2168,7 +2168,7 @@ - + diff --git a/xml/queries.xml b/xml/queries.xml index 3a186642e..917a865d2 100644 --- a/xml/queries.xml +++ b/xml/queries.xml @@ -15,12 +15,6 @@ - @@ -89,12 +83,6 @@ -