From 66b9684e4312bd113683d811fc1564dde4c09e6e Mon Sep 17 00:00:00 2001 From: SushiCannibale Date: Thu, 5 Jun 2025 20:17:23 +0200 Subject: [PATCH] HmMmm le jambon... --- .gitignore | 11 +++++++++++ .python-version | 1 + main.py | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 9 +++++++++ 4 files changed, 73 insertions(+) create mode 100644 .gitignore create mode 100644 .python-version create mode 100644 main.py create mode 100644 pyproject.toml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3899dbb --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +# Python-generated files +__pycache__/ +*.py[oc] +build/ +dist/ +wheels/ +*.egg-info + +# Virtual environments +.venv +ul.lock diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..24ee5b1 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.13 diff --git a/main.py b/main.py new file mode 100644 index 0000000..93a48ab --- /dev/null +++ b/main.py @@ -0,0 +1,52 @@ +import requests +from random import randint +from time import sleep + +def make_data(delta : int): + data = f""" + SK-JPN-L1-NA-PE-NA-NA-Y-3 + 0 + 1 + general + 1 + false + 86 + 3 + 0 + 121 + """ + str(delta) + """ + 186467 + 1749145824044 + false + + """ + return data + +def main(): + url = "https://tracking.rosettastone.com/ee/ce/a0fb3563-1d51-41d6-af0b-35fa6b7ebb1b/users/4272153/path_scores?course=SK-JPN-L1-NA-PE-NA-NA-Y-3&unit_index=0&lesson_index=1&path_type=general&occurrence=1&_method=put" + headers = { + 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0', + 'Accept': '*/*', + 'content-type': 'text/xml', + 'x-rosettastone-app-version': 'ZoomCourse/11.11.3', + 'x-rosettastone-protocol-version': '8', + 'x-rosettastone-session-token': '90c735245deedd362c732041d61066f02f770e7ffa6a914821b72807cdc6be2c4eb9357a1dbc63f1', + 'Origin': 'https://totale.rosettastone.com', + } + + while True: + rand_time = randint(120_000, 180_000) + data = make_data(rand_time) + + print(data) + resp = requests.post(url, headers=headers, data=data) + print(resp) + + if not resp.ok: + print("Aborting.") + break + + sleep(60) + +if __name__ == "__main__": + main() diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..e975895 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,9 @@ +[project] +name = "rosette" +version = "0.1.0" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.13" +dependencies = [ + 'requests' +]