feature: keep exe and dll files in project folder

This commit is contained in:
Dobin
2024-04-29 19:24:29 +01:00
parent 58045529d2
commit 3e6c1e06cf
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -46,6 +46,15 @@ def prepare_project(project_name, settings):
continue continue
if file.startswith("."): if file.startswith("."):
continue continue
if file.endswith(".exe"):
# keep all exes except:
if file != "main.exe" and not file.endswith(".infected.exe"):
continue
if file.endswith(".dll"):
# keep all dlls except:
if not file.endswith(".infected.dll"):
continue
os.remove(dst + file) os.remove(dst + file)
# copy *.c *.h files from src directory to dst directory # copy *.c *.h files from src directory to dst directory
+1 -1
View File
@@ -86,7 +86,7 @@ def main():
logger.info("Could not find: {}".format(args.inject)) logger.info("Could not find: {}".format(args.inject))
return return
settings.inject_exe_in = args.inject settings.inject_exe_in = args.inject
settings.inject_exe_out = args.inject.replace(".exe", ".infected.exe") settings.inject_exe_out = args.inject.replace(".exe", ".infected.exe").replace(".dll", ".infected.dll")
settings.prep_web("default") settings.prep_web("default")
write_webproject("default", settings) write_webproject("default", settings)