This commit is contained in:
Miroslav Stampar 2020-10-14 23:04:01 +02:00
parent 4687383a44
commit 3663fa936b
2 changed files with 21 additions and 5 deletions

View File

@ -418,14 +418,30 @@ def _setBulkMultipleTargets():
return return
if isinstance(conf.bulkFile, collections.Iterable): if isinstance(conf.bulkFile, collections.Iterable):
def _(): class _(object):
for line in conf.bulkFile: def __init__(self):
self.__rest = set()
def __iter__(self):
return self
def __next__(self):
return self.next()
def next(self):
line = next(conf.bulkFile)
if line: if line:
match = re.search(r"\bhttps?://[^\s'\"]+", line, re.I) match = re.search(r"\bhttps?://[^\s'\"]+", line, re.I)
if match: if match:
yield (match.group(0), conf.method, conf.data, conf.cookie, None) return (match.group(0), conf.method, conf.data, conf.cookie, None)
elif self.__rest:
return self.__rest.pop()
else: else:
break raise StopIteration()
def add(self, elem):
self.__rest.add(elem)
kb.targets = _() kb.targets = _()
else: else:
conf.bulkFile = safeExpandUser(conf.bulkFile) conf.bulkFile = safeExpandUser(conf.bulkFile)

View File

@ -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.10.8" VERSION = "1.4.10.9"
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)