mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 04:53:48 +03:00
fix for UPX linux/macos
This commit is contained in:
parent
8d8fc2bbd8
commit
e1a8d268d8
|
@ -1410,7 +1410,11 @@ def decloakToNamedTemporaryFile(filepath, name=None):
|
|||
return retVal
|
||||
|
||||
def decloakToMkstemp(filepath, **kwargs):
|
||||
name = mkstemp(**kwargs)[1]
|
||||
handle, name = mkstemp(**kwargs)
|
||||
|
||||
fptr = os.fdopen(handle)
|
||||
fptr.close() # close low level handle (causing problems latter)
|
||||
|
||||
retVal = open(name, 'w+b')
|
||||
|
||||
retVal.write(decloak(filepath))
|
||||
|
|
|
@ -9,6 +9,7 @@ See the file 'doc/COPYING' for copying permission
|
|||
|
||||
|
||||
import os
|
||||
import stat
|
||||
import time
|
||||
|
||||
from subprocess import PIPE
|
||||
|
@ -19,6 +20,7 @@ from lib.core.common import dataToStdout
|
|||
from lib.core.common import decloakToMkstemp
|
||||
from lib.core.data import logger
|
||||
from lib.core.data import paths
|
||||
from lib.core.settings import IS_WIN
|
||||
from lib.core.settings import PLATFORM
|
||||
from lib.core.subprocessng import pollProcess
|
||||
|
||||
|
@ -51,6 +53,9 @@ class UPX:
|
|||
self.__upxPath = self.__upxTemp.name
|
||||
self.__upxTemp.close() #needed for execution rights
|
||||
|
||||
if not IS_WIN:
|
||||
os.chmod(self.__upxPath, stat.S_IXUSR)
|
||||
|
||||
self.__upxCmd = "%s -9 -qq %s" % (self.__upxPath, srcFile)
|
||||
|
||||
if dstFile:
|
||||
|
|
Loading…
Reference in New Issue
Block a user