From 31b4c24116070e692791c2ef3758e4e8e8a97ebe Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Sat, 3 Jun 2023 10:50:51 +0400 Subject: [PATCH 1/3] Warning message --- README.md | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 838acf1..1b51457 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 From bc01f9ab135cbb9e4908df71d012c0cd56688c36 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Sat, 3 Jun 2023 16:45:58 +0400 Subject: [PATCH 2/3] Fix for #80 (token and sec were empty) --- python_aternos/atclient.py | 2 ++ 1 file changed, 2 insertions(+) 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: From abb8e739baa633248ef88b5113bd12f2eee5c716 Mon Sep 17 00:00:00 2001 From: hiikion Date: Thu, 22 Jun 2023 15:16:56 +0300 Subject: [PATCH 3/3] Fix issue #85 --- python_aternos/atjsparse.py | 1 + 1 file changed, 1 insertion(+) 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