Update tamper_proof_service.py

pull/700/head
Mr Chen 3 months ago
parent 4eda80baa8
commit 5528336698
  1. 10
      plugins/tamper_proof_py/tamper_proof_service.py

@ -1,4 +1,4 @@
# coding=utf-8 # coding=utf-8
# +-------------------------------------------------------------------- # +--------------------------------------------------------------------
# | 事件型防篡改 # | 事件型防篡改
@ -494,7 +494,7 @@ def run():
# 处理网站属性 # 处理网站属性
sites = event.get_sites() sites = event.get_sites()
print("=" * 60) print("=" * 60)
print("{}】正在启动防篡改,请稍候...".format(mw.formatDate())) print("{} Starting anti tampering, please wait...".format(mw.formatDate()))
print("-" * 60) print("-" * 60)
tip_path = event._PLUGIN_PATH + '/tips/' tip_path = event._PLUGIN_PATH + '/tips/'
if not os.path.exists(tip_path): if not os.path.exists(tip_path):
@ -506,11 +506,11 @@ def run():
if not siteInfo['open']: if not siteInfo['open']:
continue continue
if sys.version_info[0] == 2: if sys.version_info[0] == 2:
print("{}|-网站[{}]".format(mw.formatDate(), print("{}|-网站[{}]".format(mw.formatDate(),
siteInfo['siteName'])), siteInfo['siteName'])),
else: else:
os.system( os.system(
"echo -e '{}|-网站[{}]\c'".format(mw.formatDate(), siteInfo['siteName'])) "echo -e '{}|-网站[{}]\c'".format(mw.formatDate(), siteInfo['siteName']))
# print("【{}】|-网站[{}]".format(public.format_date(),siteInfo['siteName']),end=" ") # print("【{}】|-网站[{}]".format(public.format_date(),siteInfo['siteName']),end=" ")
mw.writeFile(speed_file, "正在处理网站[{}],请稍候...".format( mw.writeFile(speed_file, "正在处理网站[{}],请稍候...".format(
siteInfo['siteName'])) siteInfo['siteName']))
@ -530,7 +530,7 @@ def run():
mw.writeLog('防篡改程序', "网站防篡改服务已成功启动,耗时[%s]秒" % endtime) mw.writeLog('防篡改程序', "网站防篡改服务已成功启动,耗时[%s]秒" % endtime)
notifier = pyinotify.Notifier(watchManager, event) notifier = pyinotify.Notifier(watchManager, event)
print("-" * 60) print("-" * 60)
print('|-防篡改服务已启动') print('|-Anti tampering service has been started')
print("=" * 60) print("=" * 60)
end_tips = ">>>>>>>>>>END<<<<<<<<<<" end_tips = ">>>>>>>>>>END<<<<<<<<<<"
print(end_tips) print(end_tips)

Loading…
Cancel
Save