mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Dealing with basesting (one baby step closer to Py3 salvation)
This commit is contained in:
parent
915bc1fc99
commit
afe497a954
25 changed files with 112 additions and 98 deletions
|
|
@ -45,6 +45,7 @@ from lib.core.subprocessng import blockingWriteToFD
|
|||
from lib.core.subprocessng import Popen as execute
|
||||
from lib.core.subprocessng import send_all
|
||||
from lib.core.subprocessng import recv_some
|
||||
from thirdparty import six
|
||||
|
||||
if IS_WIN:
|
||||
import msvcrt
|
||||
|
|
@ -186,7 +187,7 @@ class Metasploit:
|
|||
# choose which encoder to use. When called from --os-pwn the encoder
|
||||
# is always x86/alpha_mixed - used for sys_bineval() and
|
||||
# shellcodeexec
|
||||
if isinstance(encode, basestring):
|
||||
if isinstance(encode, six.string_types):
|
||||
return encode
|
||||
|
||||
elif encode:
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ class UDF:
|
|||
while True:
|
||||
retType = readInput(msg, default=defaultType)
|
||||
|
||||
if isinstance(retType, basestring) and retType.isdigit():
|
||||
if hasattr(retType, "isdigit") and retType.isdigit():
|
||||
logger.warn("you need to specify the data-type of the return value")
|
||||
else:
|
||||
self.udfs[udfName]["return"] = retType
|
||||
|
|
@ -338,7 +338,7 @@ class UDF:
|
|||
|
||||
if choice == 'Q':
|
||||
break
|
||||
elif isinstance(choice, basestring) and choice.isdigit() and int(choice) > 0 and int(choice) <= len(udfList):
|
||||
elif hasattr(choice, "isdigit") 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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue