diff --git a/README.md b/README.md index 095db49..72e25a3 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,18 @@ An unofficial Aternos API written in Python. It uses [aternos](https://aternos.org/)' private API and html parsing. +> **WARNING** +> +> Recently, Aternos started somehow detecting +> API requests from this library. +> Any automated access is prohibited according +> to [Terms of Service §5.2e](https://aternos.gmbh/en/aternos/terms#:~:text=Automatically%20accessing%20our%20website%20or%20automating%20actions%20on%20our%20website.), +> and results in **permanent ban**. +> +> **USE AT YOUR OWN RISK** +> +> I will try to fix that as soon as possible. + Python Aternos supports: - Logging in to account with password (plain or hashed) or `ATERNOS_SESSION` cookie value @@ -34,19 +46,6 @@ Python Aternos supports: - Changing server subdomain and MOTD (message-of-the-day) - Managing files, settings, players (whitelist, operators, etc.) -> **Warning** -> -> According to the Aternos' [Terms of Service §5.2e](https://aternos.gmbh/en/aternos/terms#:~:text=Automatically%20accessing%20our%20website%20or%20automating%20actions%20on%20our%20website.), -> you must not use any software or APIs for automated access, -> beacuse they don't receive money from advertisting in this case. -> -> I always try to hide automated python-aternos requests -> using browser-specific headers/cookies, -> but you should make backups to restore your world -> if Aternos detects violation of ToS and bans your account -> (view issues [#16](https://github.com/DarkCat09/python-aternos/issues/16) -> and [#46](https://github.com/DarkCat09/python-aternos/issues/46)). - ## Install ### Common diff --git a/python_aternos/atclient.py b/python_aternos/atclient.py index 4d8e592..a07da0b 100644 --- a/python_aternos/atclient.py +++ b/python_aternos/atclient.py @@ -125,6 +125,8 @@ class Client: session (str): Session cookie value """ + self.atconn.parse_token() + self.atconn.generate_sec() self.atconn.session.cookies['ATERNOS_SESSION'] = session def logout(self) -> None: diff --git a/python_aternos/atjsparse.py b/python_aternos/atjsparse.py index 9bf77bf..bb6cf46 100644 --- a/python_aternos/atjsparse.py +++ b/python_aternos/atjsparse.py @@ -139,6 +139,7 @@ class Js2PyInterpreter(Interpreter): ctx.execute('window.Map = function(_i){ };') ctx.execute('window.setTimeout = function(_f,_t){ };') ctx.execute('window.setInterval = function(_f,_t){ };') + ctx.execute('document.getElementById = function(_a) { };') ctx.execute('window.encodeURIComponent = function(_s){ };') self.ctx = ctx