Dealing with deprecated next()

This commit is contained in:
Miroslav Stampar
2019-01-22 02:47:06 +01:00
parent 2c270ed250
commit 1adc66b763
13 changed files with 32 additions and 32 deletions

View File

@@ -313,7 +313,7 @@ def _setRequestFromFile():
infoMsg = "parsing second-order HTTP request from '%s'" % conf.secondReq
logger.info(infoMsg)
target = parseRequestFile(conf.secondReq, False).next()
target = next(parseRequestFile(conf.secondReq, False))
kb.secondReq = target
def _setCrawler():

View File

@@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
from lib.core.enums import OS
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.3.1.64"
VERSION = "1.3.1.65"
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)

View File

@@ -68,7 +68,7 @@ class Wordlist(object):
while True:
self.counter += 1
try:
retVal = self.iter.next().rstrip()
retVal = next(self.iter).rstrip()
except zipfile.error as ex:
errMsg = "something appears to be wrong with "
errMsg += "the file '%s' ('%s'). Please make " % (self.current, getSafeExString(ex))
@@ -76,7 +76,7 @@ class Wordlist(object):
raise SqlmapInstallationException(errMsg)
except StopIteration:
self.adjust()
retVal = self.iter.next().rstrip()
retVal = next(self.iter).rstrip()
if not self.proc_count or self.counter % self.proc_count == self.proc_id:
break
return retVal