mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-03 22:31:34 +00:00
cloaked upx for windows (used mkstemp because of execution and file access rights problem)
This commit is contained in:
parent
200518724c
commit
92817159dc
5 changed files with 25 additions and 1 deletions
|
|
@ -34,6 +34,7 @@ import ntpath
|
|||
import posixpath
|
||||
|
||||
from tempfile import NamedTemporaryFile
|
||||
from tempfile import mkstemp
|
||||
|
||||
from extra.cloak.cloak import decloak
|
||||
from lib.contrib import magic
|
||||
|
|
@ -885,3 +886,10 @@ def decloakToNamedTemporaryFile(filepath, name=None):
|
|||
retVal.old_name = retVal.name
|
||||
retVal.name = name
|
||||
return retVal
|
||||
|
||||
def decloakToMkstemp(filepath, **kwargs):
|
||||
name = mkstemp(**kwargs)[1]
|
||||
retVal = open(name, 'w+b')
|
||||
retVal.write(decloak(filepath))
|
||||
retVal.seek(0)
|
||||
return retVal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue