mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
Fixes #4081
This commit is contained in:
parent
6b1f4965ed
commit
984808cc26
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.4.1.40"
|
VERSION = "1.4.1.41"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
|
@ -19,12 +19,15 @@ class DNSQuery(object):
|
||||||
"""
|
"""
|
||||||
>>> DNSQuery(b'|K\\x01 \\x00\\x01\\x00\\x00\\x00\\x00\\x00\\x01\\x03www\\x06google\\x03com\\x00\\x00\\x01\\x00\\x01\\x00\\x00)\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x0c\\x00\\n\\x00\\x08O4|Np!\\x1d\\xb3')._query == b"www.google.com."
|
>>> DNSQuery(b'|K\\x01 \\x00\\x01\\x00\\x00\\x00\\x00\\x00\\x01\\x03www\\x06google\\x03com\\x00\\x00\\x01\\x00\\x01\\x00\\x00)\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x0c\\x00\\n\\x00\\x08O4|Np!\\x1d\\xb3')._query == b"www.google.com."
|
||||||
True
|
True
|
||||||
|
>>> DNSQuery(b'\\x00')._query == b""
|
||||||
|
True
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, raw):
|
def __init__(self, raw):
|
||||||
self._raw = raw
|
self._raw = raw
|
||||||
self._query = b""
|
self._query = b""
|
||||||
|
|
||||||
|
try:
|
||||||
type_ = (ord(raw[2:3]) >> 3) & 15 # Opcode bits
|
type_ = (ord(raw[2:3]) >> 3) & 15 # Opcode bits
|
||||||
|
|
||||||
if type_ == 0: # Standard query
|
if type_ == 0: # Standard query
|
||||||
|
@ -35,6 +38,8 @@ class DNSQuery(object):
|
||||||
self._query += raw[i + 1:i + j + 1] + b'.'
|
self._query += raw[i + 1:i + j + 1] + b'.'
|
||||||
i = i + j + 1
|
i = i + j + 1
|
||||||
j = ord(raw[i:i + 1])
|
j = ord(raw[i:i + 1])
|
||||||
|
except TypeError:
|
||||||
|
pass
|
||||||
|
|
||||||
def response(self, resolution):
|
def response(self, resolution):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user