mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-23 19:34:13 +03:00
Minor refactoring for #4077
This commit is contained in:
parent
a6c26fe792
commit
3776f2eeea
|
@ -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.23"
|
VERSION = "1.4.1.24"
|
||||||
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)
|
||||||
|
|
|
@ -13,6 +13,7 @@ from lib.core.common import popValue
|
||||||
from lib.core.common import pushValue
|
from lib.core.common import pushValue
|
||||||
from lib.core.common import readInput
|
from lib.core.common import readInput
|
||||||
from lib.core.common import urlencode
|
from lib.core.common import urlencode
|
||||||
|
from lib.core.convert import getBytes
|
||||||
from lib.core.convert import getUnicode
|
from lib.core.convert import getUnicode
|
||||||
from lib.core.data import conf
|
from lib.core.data import conf
|
||||||
from lib.core.data import kb
|
from lib.core.data import kb
|
||||||
|
@ -132,7 +133,7 @@ def _search(dork):
|
||||||
regex = DUCKDUCKGO_REGEX
|
regex = DUCKDUCKGO_REGEX
|
||||||
|
|
||||||
try:
|
try:
|
||||||
req = _urllib.request.Request(url, data=data.encode("utf-8"), headers=requestHeaders)
|
req = _urllib.request.Request(url, data=getBytes(data), headers=requestHeaders)
|
||||||
conn = _urllib.request.urlopen(req)
|
conn = _urllib.request.urlopen(req)
|
||||||
|
|
||||||
requestMsg = "HTTP request:\nGET %s" % url
|
requestMsg = "HTTP request:\nGET %s" % url
|
||||||
|
|
Loading…
Reference in New Issue
Block a user