From 1e1f560d0c228afb75a8ccd1b0a7bbc12460ab4a Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 14 Jan 2013 16:24:28 +0100 Subject: [PATCH 1/8] Minor cosmetics --- lib/utils/xrange.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/xrange.py b/lib/utils/xrange.py index 6ce1b9f48..d9b6ec14a 100644 --- a/lib/utils/xrange.py +++ b/lib/utils/xrange.py @@ -14,7 +14,7 @@ class xrange(object): __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) From 2a86c1cadc0560d0b983bcacf53c48db02dd6899 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 14 Jan 2013 16:24:55 +0100 Subject: [PATCH 2/8] Another cosmetics --- lib/utils/xrange.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/xrange.py b/lib/utils/xrange.py index d9b6ec14a..ff8c7256d 100644 --- a/lib/utils/xrange.py +++ b/lib/utils/xrange.py @@ -7,7 +7,7 @@ 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/ """ From 31302eb7079452169aa21208522f2a2c3cd6c138 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 14 Jan 2013 16:26:07 +0100 Subject: [PATCH 3/8] Minor update --- lib/utils/xrange.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/utils/xrange.py b/lib/utils/xrange.py index ff8c7256d..088f0d615 100644 --- a/lib/utils/xrange.py +++ b/lib/utils/xrange.py @@ -19,8 +19,6 @@ class xrange(object): 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 From 2cac7e860e957478ebca230bb7d776b0000fc2d4 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 14 Jan 2013 16:27:50 +0100 Subject: [PATCH 4/8] Minor refactoring --- lib/utils/xrange.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/xrange.py b/lib/utils/xrange.py index 088f0d615..b8737745a 100644 --- a/lib/utils/xrange.py +++ b/lib/utils/xrange.py @@ -45,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): From 5ee653dd89b0d69c434926b6d3540fb5d2056136 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 15 Jan 2013 10:14:02 +0100 Subject: [PATCH 5/8] Merging commit 57bcbb458eade2850a6d7623ecddbe49c69cf334 from @morisson --- lib/request/connect.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) From 498a576e39450e67f8ce50ad87e0811d2807b9d1 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 15 Jan 2013 10:59:46 +0100 Subject: [PATCH 6/8] Removing obsolete data --- xml/queries.xml | 12 ------------ 1 file changed, 12 deletions(-) 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 @@ - From 02f0e72cc6f47fbe08c5a28fcb07f7de757450c7 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 15 Jan 2013 11:10:03 +0100 Subject: [PATCH 7/8] Minor update of other/corner case titles --- xml/livetests.xml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/xml/livetests.xml b/xml/livetests.xml index 21015e621..f08cbeb87 100644 --- a/xml/livetests.xml +++ b/xml/livetests.xml @@ -1952,8 +1952,8 @@ - - + + @@ -1966,7 +1966,7 @@ - + @@ -1981,7 +1981,7 @@ - + @@ -1992,7 +1992,7 @@ - + @@ -2002,7 +2002,7 @@ - + @@ -2017,7 +2017,7 @@ - + @@ -2029,7 +2029,7 @@ - + @@ -2040,7 +2040,7 @@ - + @@ -2051,7 +2051,7 @@ - + @@ -2060,7 +2060,7 @@ - + @@ -2075,7 +2075,7 @@ - + @@ -2090,10 +2090,10 @@ - + - + @@ -2105,7 +2105,7 @@ - + @@ -2117,7 +2117,7 @@ - + From 04aa39f0c6ca2d60a10b8c0d007d27b77af2b566 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 15 Jan 2013 13:51:19 +0100 Subject: [PATCH 8/8] Minor update --- lib/techniques/error/use.py | 3 ++- lib/techniques/union/use.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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)