refactor: from project.verify_filename to def.py:VerifyFilename

This commit is contained in:
Dobin
2024-02-19 19:30:15 +00:00
parent 0f68a242da
commit b66c7cc6d8
6 changed files with 12 additions and 12 deletions
+3 -3
View File
@@ -81,16 +81,16 @@ def injected_fix_iat(exe_out: FilePath, exe_info: ExeInfo):
def verify_injected_exe(exefile: FilePath) -> int:
logger.info("---[ Verify infected exe: {} ".format(exefile))
# remove indicator file
pathlib.Path(project.verify_filename).unlink(missing_ok=True)
pathlib.Path(VerifyFilename).unlink(missing_ok=True)
run_process_checkret([
exefile,
], check=False)
time.sleep(SHC_VERIFY_SLEEP)
if os.path.isfile(project.verify_filename):
if os.path.isfile(VerifyFilename):
logger.info("---> Verify OK. Infected exe works (file was created)")
# better to remove it immediately
os.remove(project.verify_filename)
os.remove(VerifyFilename)
return 0
else:
logger.warning("---> Verify FAIL. Infected exe does not work (no file created)")