mirror of
https://github.com/klezVirus/inceptor.git
synced 2024-06-16 11:58:42 +00:00
Fix /DEF option (partially)
This commit is contained in:
parent
a07bf92cc7
commit
8fffbe731d
@ -142,9 +142,6 @@ class NativeArtifactGenerator(Generator):
|
||||
modules=[]
|
||||
)
|
||||
self.dll_payload = None
|
||||
self.dll_compiler_args = self.compiler.default_dll_args(self.outfiles["dll-temp"])
|
||||
if self.exports and os.path.isfile(self.exports):
|
||||
self.dll_compiler_args["/DEF"] = f'"{os.path.abspath(self.exports)}"'
|
||||
|
||||
def compile_dll(self, shellcode=None):
|
||||
if not shellcode:
|
||||
@ -152,6 +149,8 @@ class NativeArtifactGenerator(Generator):
|
||||
self.dll_writer.write_source(shellcode=shellcode)
|
||||
self.compiler.aargs = ""
|
||||
self.compiler.default_dll_args(outfile=self.outfiles["dll-temp"])
|
||||
if self.exports and os.path.isfile(self.exports):
|
||||
self.compiler.args["/DEF"] = f'"{Path(self.exports).absolute()}"'
|
||||
self.compiler.compile([self.dll_writer.outfile])
|
||||
if not os.path.isfile(self.outfiles["dll-temp"]):
|
||||
raise FileNotFoundError("Error generating DLL")
|
||||
|
Loading…
Reference in New Issue
Block a user