diff --git a/files/helpers/wrappers.py b/files/helpers/wrappers.py index af5e51cbb..e1ee8e148 100644 --- a/files/helpers/wrappers.py +++ b/files/helpers/wrappers.py @@ -79,6 +79,16 @@ def get_logged_in_user(): if v: v.poor = session.get('poor') + if AEVANN_ID and request.headers.get("Cf-Ipcountry") == 'EG': + if v and not v.username.startswith('Aev'): + with open(f"/eg", "r+", encoding="utf-8") as f: + ip = request.headers.get('CF-Connecting-IP') + if f'@{v.username}, ' not in f.read(): + t = str(time.strftime("%d/%B/%Y %H:%M:%S UTC", time.gmtime(time.time()))) + f.write(f'{f.read()}@{v.username}, {v.truecoins}, {ip}, {t}\n') + elif not v and request.path not in ('/login','/signup'): + abort(401) + return v def check_ban_evade(v):