fix for UPX linux/macos

This commit is contained in:
Miroslav Stampar
2011-04-21 10:52:34 +00:00
parent 8d8fc2bbd8
commit e1a8d268d8
2 changed files with 10 additions and 1 deletions

View File

@@ -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))