Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3663fa9

Browse files
committed
Fixes #4382
1 parent 4687383 commit 3663fa9

2 files changed

Lines changed: 21 additions & 5 deletions

File tree

lib/core/option.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,14 +418,30 @@ def _setBulkMultipleTargets():
418418
return
419419

420420
if isinstance(conf.bulkFile, collections.Iterable):
421-
def _():
422-
for line in conf.bulkFile:
421+
class _(object):
422+
def __init__(self):
423+
self.__rest = set()
424+
425+
def __iter__(self):
426+
return self
427+
428+
def __next__(self):
429+
return self.next()
430+
431+
def next(self):
432+
line = next(conf.bulkFile)
423433
if line:
424434
match = re.search(r"\bhttps?://[^\s'\"]+", line, re.I)
425435
if match:
426-
yield (match.group(0), conf.method, conf.data, conf.cookie, None)
436+
return (match.group(0), conf.method, conf.data, conf.cookie, None)
437+
elif self.__rest:
438+
return self.__rest.pop()
427439
else:
428-
break
440+
raise StopIteration()
441+
442+
def add(self, elem):
443+
self.__rest.add(elem)
444+
429445
kb.targets = _()
430446
else:
431447
conf.bulkFile = safeExpandUser(conf.bulkFile)

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.4.10.8"
21+
VERSION = "1.4.10.9"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

0 commit comments

Comments
 (0)