pull/700/head
Mr Chen 3 months ago
parent 5528336698
commit 2f5b1bb205
  1. 4
      plugins/tamper_proof_py/install.sh
  2. 6
      plugins/tamper_proof_py/tamper_proof_service.py

@ -7,12 +7,14 @@ rootPath=$(dirname "$curPath")
rootPath=$(dirname "$rootPath")
serverPath=$(dirname "$rootPath")
pip install pyinotify
# pip install pyinotify
if [ -f ${rootPath}/bin/activate ];then
source ${rootPath}/bin/activate
fi
pip install pyinotify
# cd /www/server/mdserver-web/plugins/tamper_proof_py && bash install.sh install 1.0
# cd /www/server/mdserver-web && python3 plugins/tamper_proof_py/index.py start 1.0
# cd /www/server/mdserver-web && python3 plugins/tamper_proof_py/index.py service_admin {"serviceStatus":"start"}
# systemctl start tamper_proof_py

@ -427,7 +427,7 @@ class MyEventHandler(pyinotify.ProcessEvent):
sites = self.get_sites()
print("")
print("=" * 60)
print("{}】正在关闭防篡改,请稍候...".format(mw.formatDate()))
print("{}Disabling anti tampering, please wait...".format(mw.formatDate()))
print("-" * 60)
for siteInfo in sites:
tip = self._PLUGIN_PATH + '/tips/' + siteInfo['siteName'] + '.pl'
@ -440,14 +440,14 @@ class MyEventHandler(pyinotify.ProcessEvent):
"{}】|-解锁网站[{}]".format(mw.formatDate(), siteInfo['siteName'])),
else:
os.system(
"echo -e '{}|-解锁网站[{}]\c'".format(mw.formatDate(), siteInfo['siteName']))
"echo -e '{}|-解锁网站[{}]\c'".format(mw.formatDate(), siteInfo['siteName']))
#print("【{}】|-解锁网站[{}]".format(mw.format_date(),siteInfo['siteName']),end=" ")
self.unlock(siteInfo['path'])
if os.path.exists(tip):
os.remove(tip)
print("\t=> 完成")
print("-" * 60)
print('|-防篡改已关闭')
print('|-Anti tampering has been turned off')
print("=" * 60)
print(">>>>>>>>>>END<<<<<<<<<<")

Loading…
Cancel
Save