anti-abuse/main.py

35 lines
792 B
Python
Raw Normal View History

2025-03-23 19:03:28 +01:00
#region Imports
import time, os, tomllib
2025-03-24 18:03:56 +00:00
from utils.Logger import Log
from utils.WatchdogHandler import DirWatcher
#endregion
2025-03-23 19:03:28 +01:00
#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__":
2025-03-24 18:03:56 +00:00
with DirWatcher(path, interval=1) as watcher:
watcher.run()
Log.s(data['LANGUGAE']['english']['radarStarted'].format(str(round(time.time() - t, 1))))
2025-03-23 19:03:28 +01:00
try:
while True:
time.sleep(1)
except KeyboardInterrupt:
2025-03-24 18:03:56 +00:00
exit()