mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-04-28 21:03:45 +03:00
Minor refactoring
This commit is contained in:
parent
22bf77161a
commit
f38a2c2028
|
@ -28,7 +28,7 @@ def cachedmethod(f):
|
||||||
>>> __ = cachedmethod(lambda *args, **kwargs: args[0])
|
>>> __ = cachedmethod(lambda *args, **kwargs: args[0])
|
||||||
>>> __(2)
|
>>> __(2)
|
||||||
2
|
2
|
||||||
>>> __ = cachedmethod(lambda *args, **kwargs: list(kwargs.values())[0])
|
>>> __ = cachedmethod(lambda *args, **kwargs: next(iter(kwargs.values())))
|
||||||
>>> __(foobar=3)
|
>>> __(foobar=3)
|
||||||
3
|
3
|
||||||
|
|
||||||
|
|
|
@ -347,7 +347,7 @@ def _setCrawler():
|
||||||
if conf.url:
|
if conf.url:
|
||||||
crawl(conf.url)
|
crawl(conf.url)
|
||||||
elif conf.requestFile and kb.targets:
|
elif conf.requestFile and kb.targets:
|
||||||
target = list(kb.targets)[0]
|
target = next(iter(kb.targets))
|
||||||
crawl(target[0], target[2], target[3])
|
crawl(target[0], target[2], target[3])
|
||||||
|
|
||||||
def _doSearch():
|
def _doSearch():
|
||||||
|
@ -1735,8 +1735,7 @@ def _cleanupOptions():
|
||||||
conf.__setitem__(_, True)
|
conf.__setitem__(_, True)
|
||||||
|
|
||||||
if conf.noCast:
|
if conf.noCast:
|
||||||
for _ in list(DUMP_REPLACEMENTS.keys()):
|
DUMP_REPLACEMENTS.clear()
|
||||||
del DUMP_REPLACEMENTS[_]
|
|
||||||
|
|
||||||
if conf.dumpFormat:
|
if conf.dumpFormat:
|
||||||
conf.dumpFormat = conf.dumpFormat.upper()
|
conf.dumpFormat = conf.dumpFormat.upper()
|
||||||
|
|
|
@ -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.59"
|
VERSION = "1.4.1.60"
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user