Skip to content

Commit b4fd71e

Browse files
committed
Minor adjustment to reflect Metasploit r6849 (http://trac.metasploit.com/changeset/6849) and minor code refactoring.
1 parent 8096a37 commit b4fd71e

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

lib/core/common.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -781,11 +781,13 @@ def pollProcess(process):
781781

782782
returncode = process.poll()
783783

784-
if returncode != None:
784+
if returncode is not None:
785785
if returncode == 0:
786786
dataToStdout(" done\n")
787-
else:
788-
dataToStdout(" quit unexpectedly by signal %d\n" % returncode)
787+
elif returncode < 0:
788+
dataToStdout(" process terminated by signal %d\n" % returncode)
789+
elif returncode > 0:
790+
dataToStdout(" quit unexpectedly with return code %d\n" % returncode)
789791

790792
break
791793

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131

3232
# sqlmap version and site
33-
VERSION = "0.7rc4"
33+
VERSION = "0.7rc5"
3434
VERSION_STRING = "sqlmap/%s" % VERSION
3535
SITE = "http://sqlmap.sourceforge.net"
3636

lib/takeover/upx.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,25 @@ def pack(self, srcFile, dstFile=None):
7878

7979
dataToStdout("\r[%s] [INFO] compression in progress " % time.strftime("%X"))
8080
pollProcess(process)
81-
upxStderr = process.communicate()[1]
81+
upxStdout, upxStderr = process.communicate()
8282

83-
if upxStderr:
84-
logger.warn("failed to compress the file")
83+
warnMsg = "failed to compress the file"
84+
85+
if "NotCompressibleException" in upxStdout:
86+
warnMsg += " because you provided a Metasploit version above "
87+
warnMsg += "3.3-dev revision 6681. This will not inficiate "
88+
warnMsg += "the correct execution of sqlmap. It might "
89+
warnMsg += "only slow down a bit the execution of sqlmap"
90+
logger.info(warnMsg)
91+
92+
elif upxStderr:
93+
logger.warn(warnMsg)
8594

86-
return None
8795
else:
8896
return os.path.getsize(srcFile)
8997

98+
return None
99+
90100

91101
def unpack(self, srcFile, dstFile=None):
92102
pass

0 commit comments

Comments
 (0)