anti-abuse/main.py
2025-03-24 18:03:56 +00:00

35 lines
792 B
Python

#region Imports
import time, os, tomllib
from utils.Logger import Log
from utils.WatchdogHandler import DirWatcher
#endregion
#region Initialize
t = time.time()
with open("config.toml", "rb") as f:
data = tomllib.load(f)
path = data['DETECTION']['watchdogPath']
Log.v("""
____ ____
/ __ \\____ _/ __ \\____ ______
/ /_/ / __ `/ / / / __ `/ ___/
/ _, _/ /_/ / /_/ / /_/ / /
/_/ |_|\\__,_/_____/\\__,_/_/ (ver. {})
""".format(data['ver']))
#endregion
if __name__ == "__main__":
with DirWatcher(path, interval=1) as watcher:
watcher.run()
Log.s(data['LANGUGAE']['english']['radarStarted'].format(str(round(time.time() - t, 1))))
try:
while True:
time.sleep(1)
except KeyboardInterrupt:
exit()