mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 05:01:30 +00:00
Some code refactoring
This commit is contained in:
@@ -172,11 +172,11 @@ class Enumeration(GenericEnumeration):
|
||||
return kb.data.cachedColumns
|
||||
|
||||
message = "do you want to use common column existence check? [y/N/q] "
|
||||
test = readInput(message, default="Y" if "Y" in message else "N")
|
||||
choice = readInput(message, default='Y' if 'Y' in message else 'N').strip().upper()
|
||||
|
||||
if test[0] in ("n", "N"):
|
||||
if choice == 'N':
|
||||
return
|
||||
elif test[0] in ("q", "Q"):
|
||||
elif choice == 'Q':
|
||||
raise SqlmapUserQuitException
|
||||
else:
|
||||
return columnExists(paths.COMMON_COLUMNS)
|
||||
|
||||
@@ -382,27 +382,24 @@ class Filesystem(GenericFilesystem):
|
||||
if written is False:
|
||||
message = "do you want to try to upload the file with "
|
||||
message += "the custom Visual Basic script technique? [Y/n] "
|
||||
choice = readInput(message, default="Y")
|
||||
|
||||
if not choice or choice.lower() == "y":
|
||||
if readInput(message, default='Y', boolean=True):
|
||||
self._stackedWriteFileVbs(tmpPath, wFileContent, dFile, fileType)
|
||||
written = self.askCheckWrittenFile(wFile, dFile, forceCheck)
|
||||
|
||||
if written is False:
|
||||
message = "do you want to try to upload the file with "
|
||||
message += "the built-in debug.exe technique? [Y/n] "
|
||||
choice = readInput(message, default="Y")
|
||||
|
||||
if not choice or choice.lower() == "y":
|
||||
if readInput(message, default='Y', boolean=True):
|
||||
self._stackedWriteFileDebugExe(tmpPath, wFile, wFileContent, dFile, fileType)
|
||||
written = self.askCheckWrittenFile(wFile, dFile, forceCheck)
|
||||
|
||||
if written is False:
|
||||
message = "do you want to try to upload the file with "
|
||||
message += "the built-in certutil.exe technique? [Y/n] "
|
||||
choice = readInput(message, default="Y")
|
||||
|
||||
if not choice or choice.lower() == "y":
|
||||
if readInput(message, default='Y', boolean=True):
|
||||
self._stackedWriteFileCertutilExe(tmpPath, wFile, wFileContent, dFile, fileType)
|
||||
written = self.askCheckWrittenFile(wFile, dFile, forceCheck)
|
||||
|
||||
|
||||
@@ -240,11 +240,11 @@ class Enumeration(GenericEnumeration):
|
||||
return kb.data.cachedColumns
|
||||
|
||||
message = "do you want to use common column existence check? [y/N/q] "
|
||||
test = readInput(message, default="Y" if "Y" in message else "N")
|
||||
choice = readInput(message, default='Y' if 'Y' in message else 'N').strip().upper()
|
||||
|
||||
if test[0] in ("n", "N"):
|
||||
if choice == 'N':
|
||||
return
|
||||
elif test[0] in ("q", "Q"):
|
||||
elif choice == 'Q':
|
||||
raise SqlmapUserQuitException
|
||||
else:
|
||||
return columnExists(paths.COMMON_COLUMNS)
|
||||
|
||||
Reference in New Issue
Block a user