More verbose when reporting failure to create shellcode/payload stager (via Metasploit)

This commit is contained in:
Bernardo Damele 2009-04-23 20:39:32 +00:00
parent aec2419410
commit 4ce74764b7
2 changed files with 4 additions and 6 deletions

View File

@ -284,10 +284,6 @@ class Agent:
fieldsToCastList = fieldsToCastStr.replace(", ", ",")
fieldsToCastList = fieldsToCastList.split(",")
# TODO: really needed?!
#if query.startswith("SELECT ") and "(SELECT " in query:
# fieldsSelectFrom = None
return fieldsSelectFrom, fieldsSelect, fieldsNoSelect, fieldsSelectTop, fieldsSelectCase, fieldsToCastList, fieldsToCastStr

View File

@ -539,7 +539,8 @@ class Metasploit:
debugMsg = "the shellcode size is %s bytes" % payloadSize
logger.debug(debugMsg)
else:
raise sqlmapFilePathException, "failed to create the shellcode"
errMsg = "failed to create the shellcode (%s)" % payloadStderr
raise sqlmapFilePathException, errMsg
self.__shellcodeFileP = open(self.__shellcodeFilePath, "rb")
self.__shellcodeString = self.__shellcodeFileP.read()
@ -612,7 +613,8 @@ class Metasploit:
logger.debug(debugMsg)
else:
raise sqlmapFilePathException, "failed to create the payload stager"
errMsg = "failed to create the payload stager (%s)" % payloadStderr
raise sqlmapFilePathException, errMsg
def uploadMsfPayloadStager(self):