Now it works also on Mac OS X

This commit is contained in:
Bernardo Damele
2009-04-30 10:46:50 +00:00
parent 722ca8bf2f
commit e8c115500d
5 changed files with 23 additions and 7 deletions

View File

@@ -48,11 +48,22 @@ class UPX:
"""
def __initialize(self, srcFile, dstFile=None):
if "win" in PLATFORM:
if "darwin" in PLATFORM:
self.__upxPath = "%s/upx/macosx/upx" % paths.SQLMAP_CONTRIB_PATH
elif "win" in PLATFORM:
self.__upxPath = "%s/upx/windows/upx.exe" % paths.SQLMAP_CONTRIB_PATH
elif "linux" in PLATFORM:
self.__upxPath = "%s/upx/linux/upx" % paths.SQLMAP_CONTRIB_PATH
else:
warnMsg = "unsupported platform for the compression tool "
warnMsg += "(upx), sqlmap will continue anyway"
logger.warn(warnMsg)
self.__upxPath = "%s/upx/linux/upx" % paths.SQLMAP_CONTRIB_PATH
self.__upxCmd = "%s -9 -qq %s" % (self.__upxPath, srcFile)
if dstFile: