mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-06 14:49:05 +00:00
fix regarding proper string isinstance checking (including unicode)
This commit is contained in:
@@ -179,7 +179,7 @@ class Metasploit:
|
||||
return self.__skeletonSelection("SMB port", self.__msfSMBPortsList)
|
||||
|
||||
def __selectEncoder(self, encode=True):
|
||||
if isinstance(encode, str):
|
||||
if isinstance(encode, basestring):
|
||||
return encode
|
||||
|
||||
elif kb.os == "Windows" and encode:
|
||||
|
||||
@@ -227,7 +227,7 @@ class UDF:
|
||||
while True:
|
||||
udfCount = readInput(msg, default=1)
|
||||
|
||||
if isinstance(udfCount, str) and udfCount.isdigit():
|
||||
if isinstance(udfCount, basestring) and udfCount.isdigit():
|
||||
udfCount = int(udfCount)
|
||||
|
||||
if udfCount <= 0:
|
||||
@@ -267,7 +267,7 @@ class UDF:
|
||||
while True:
|
||||
parCount = readInput(msg, default=default)
|
||||
|
||||
if isinstance(parCount, str) and parCount.isdigit() and int(parCount) >= 0:
|
||||
if isinstance(parCount, basestring) and parCount.isdigit() and int(parCount) >= 0:
|
||||
parCount = int(parCount)
|
||||
break
|
||||
|
||||
@@ -284,7 +284,7 @@ class UDF:
|
||||
while True:
|
||||
parType = readInput(msg, default=defaultType)
|
||||
|
||||
if isinstance(parType, str) and parType.isdigit():
|
||||
if isinstance(parType, basestring) and parType.isdigit():
|
||||
logger.warn("you need to specify the data-type of the parameter")
|
||||
|
||||
else:
|
||||
@@ -297,7 +297,7 @@ class UDF:
|
||||
while True:
|
||||
retType = readInput(msg, default=defaultType)
|
||||
|
||||
if isinstance(retType, str) and retType.isdigit():
|
||||
if isinstance(retType, basestring) and retType.isdigit():
|
||||
logger.warn("you need to specify the data-type of the return value")
|
||||
else:
|
||||
self.udfs[udfName]["return"] = retType
|
||||
@@ -328,7 +328,7 @@ class UDF:
|
||||
|
||||
if choice and choice[0] in ( "q", "Q" ):
|
||||
break
|
||||
elif isinstance(choice, str) and choice.isdigit() and int(choice) > 0 and int(choice) <= len(udfList):
|
||||
elif isinstance(choice, basestring) and choice.isdigit() and int(choice) > 0 and int(choice) <= len(udfList):
|
||||
choice = int(choice)
|
||||
break
|
||||
elif isinstance(choice, int) and choice > 0 and choice <= len(udfList):
|
||||
|
||||
Reference in New Issue
Block a user