From a14301f7695364540619bca8ec340233ca3dd53d Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 2 Dec 2024 14:53:23 +0800 Subject: [PATCH] Update tamper_proof_service.py --- plugins/tamper_proof_py/tamper_proof_service.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/tamper_proof_py/tamper_proof_service.py b/plugins/tamper_proof_py/tamper_proof_service.py index 61645db3a..8c020b836 100644 --- a/plugins/tamper_proof_py/tamper_proof_service.py +++ b/plugins/tamper_proof_py/tamper_proof_service.py @@ -12,8 +12,12 @@ import psutil import threading import datetime -sys.path.append(os.getcwd() + "/class/core") -import mw +web_dir = os.getcwd() + "/web" +if os.path.exists(web_dir): + sys.path.append(web_dir) + os.chdir(web_dir) + +import core.mw as mw class MyEventHandler(pyinotify.ProcessEvent):