From 2504f4edb8324ff7715c9e13e1ac8b7fd1ddb654 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 3 Apr 2012 10:10:33 +0000 Subject: [PATCH] minor fixes --- lib/request/dns.py | 11 ++--------- lib/request/inject.py | 2 +- procs/README.txt | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/request/dns.py b/lib/request/dns.py index 52c7c1178..4cbd45d4b 100644 --- a/lib/request/dns.py +++ b/lib/request/dns.py @@ -57,18 +57,11 @@ class DNSServer: self._socket.bind(("", 53)) self._running = False - def pop(self): - retVal = None - with self._lock: - if len(self._requests): - retVal = self._requests.pop(0) - return retVal - - def pop(self, prefix, suffix): + def pop(self, prefix=None, suffix=None): retVal = None with self._lock: for _ in self._requests: - if re.search("%s\..+\.%s" % (prefix, suffix), _, re.I): + if prefix is None and suffix is None or re.search("%s\..+\.%s" % (prefix, suffix), _, re.I): retVal = _ self._requests.remove(_) break diff --git a/lib/request/inject.py b/lib/request/inject.py index 8630460fa..b4dafc8f7 100644 --- a/lib/request/inject.py +++ b/lib/request/inject.py @@ -86,7 +86,7 @@ def __goDns(payload, expression): if conf.dnsDomain and kb.dnsTest is not False: if kb.dnsTest is None: randInt = randomInt() - kb.dnsTest = dnsUse(payload, "SELECT %d" % randInt) == str(randInt) + kb.dnsTest = dnsUse(payload, "SELECT %d%s" % (randInt, FROM_DUMMY_TABLE.get(Backend.getIdentifiedDbms(), ""))) == str(randInt) if not kb.dnsTest: errMsg = "test for data retrieval through DNS channel failed. Turning off DNS exfiltration support" logger.error(errMsg) diff --git a/procs/README.txt b/procs/README.txt index c0e09e309..c2218e561 100755 --- a/procs/README.txt +++ b/procs/README.txt @@ -1,3 +1,3 @@ -Files in this folder represent SQL (Procedural Language) snippets used +Files in this folder represent SPL/SQL snippets used by sqlmap on the target system. They are licensed under the terms of the GNU Lesser General Public License.