mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-24 07:30:50 +03:00
Fixes #4382
This commit is contained in:
parent
4687383a44
commit
3663fa936b
|
@ -418,14 +418,30 @@ def _setBulkMultipleTargets():
|
|||
return
|
||||
|
||||
if isinstance(conf.bulkFile, collections.Iterable):
|
||||
def _():
|
||||
for line in conf.bulkFile:
|
||||
class _(object):
|
||||
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:
|
||||
match = re.search(r"\bhttps?://[^\s'\"]+", line, re.I)
|
||||
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:
|
||||
break
|
||||
raise StopIteration()
|
||||
|
||||
def add(self, elem):
|
||||
self.__rest.add(elem)
|
||||
|
||||
kb.targets = _()
|
||||
else:
|
||||
conf.bulkFile = safeExpandUser(conf.bulkFile)
|
||||
|
|
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
|||
from thirdparty.six import unichr as _unichr
|
||||
|
||||
# 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_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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user