mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
minor fixes
This commit is contained in:
parent
e05109812f
commit
2504f4edb8
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user