commit 4cc1ff7620c5ceded15ef277425ba337350d7d2c Author: Clair Delafuente Date: Mon Aug 18 14:55:10 2025 -0400 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9af7446 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# Ignore production configuration +config.py + +# Ignore Poetry garbage +poetry.lock \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..d159a20 --- /dev/null +++ b/__init__.py @@ -0,0 +1,54 @@ +import requests +import os +import config +import logging +import sys +import json + +VERSION = "0.0.1" + +# Load configuration +ROBLOSECURITY = config.roblosecurity or None +DST_DIR = config.dst_dir or './AppSettings' + +# Collect AppSettings endpoints +AppSettings = { + "PCStudioApp": "https://clientsettingscdn.roblox.com/v2/settings/application/PCStudioApp", + "PCDesktopClient": "https://clientsettingscdn.roblox.com/v2/settings/application/PCDesktopClient", + "MacDesktopClient": "https://clientsettingscdn.roblox.com/v2/settings/application/MacDesktopClient", + "MacStudioClient": "https://clientsettingscdn.roblox.com/v2/settings/application/MacStudioApp", + "UWPApp": "https://clientsettingscdn.roblox.com/v2/settings/application/UWPApp", + "XboxClient": "https://clientsettingscdn.roblox.com/v2/settings/application/XboxClient", + "AndroidApp": "https://clientsettingscdn.roblox.com/v2/settings/application/AndroidApp", +} + +# Prepare logs +if not os.path.exists("logs"): + os.makedirs("logs") +log_format = logging.Formatter( + "[%(asctime)s] {%(filename)s:%(lineno)d} %(levelname)s - %(message)s" +) +stdout_handler = logging.StreamHandler(sys.stdout) +stdout_handler.setFormatter(log_format) +logfile_handler = logging.FileHandler("logs/appsettings.log", mode="w") +logfile_handler.setFormatter(log_format) +log = logging.getLogger("AppSettings-archiver") +log.setLevel(logging.INFO) +log.addHandler(stdout_handler) +log.addHandler(logfile_handler) + +if ROBLOSECURITY is None: + log.warning(f"{"#"*6} ROBLOSECURITY IS NOT SET, SOME FFLAGS MAY BE MISSING {"#"*6}") + +os.makedirs(DST_DIR, exist_ok=True) + +for AppSetting in AppSettings: + log.info(f"Processing {AppSetting}") + response = requests.get(AppSettings[AppSetting], headers={"Cookie": f".ROBLOSECURITY={ROBLOSECURITY}"}) + if response.status_code == 200: + log.info(f"Successfully retrieved {AppSetting}") + with open(os.path.join(DST_DIR, f"{AppSetting}.json"), "w") as f: + formatted_response = json.dumps(response.json(), indent=4) + f.write(formatted_response) + else: + log.error(f"Failed to retrieve {AppSetting}: {response.status_code}") \ No newline at end of file diff --git a/__pycache__/config.cpython-313.pyc b/__pycache__/config.cpython-313.pyc new file mode 100644 index 0000000..1ef81eb Binary files /dev/null and b/__pycache__/config.cpython-313.pyc differ diff --git a/config.example.py b/config.example.py new file mode 100644 index 0000000..882a80d --- /dev/null +++ b/config.example.py @@ -0,0 +1,5 @@ +# PROVIDE YOUR ROBLOSECURITY HERE!!! +roblosecurity = "" + +# Unpacked luggage +dst_dir = "./AppSettings" \ No newline at end of file diff --git a/logs/appsettings.log b/logs/appsettings.log new file mode 100644 index 0000000..de4b99c --- /dev/null +++ b/logs/appsettings.log @@ -0,0 +1,15 @@ +[2025-08-18 14:53:00,449] {__init__.py:41} WARNING - ###### ROBLOSECURITY IS NOT SET, SOME FFLAGS MAY BE MISSING ###### +[2025-08-18 14:53:00,450] {__init__.py:46} INFO - Processing PCStudioApp +[2025-08-18 14:53:00,517] {__init__.py:49} INFO - Successfully retrieved PCStudioApp +[2025-08-18 14:53:00,534] {__init__.py:46} INFO - Processing PCDesktopClient +[2025-08-18 14:53:00,598] {__init__.py:49} INFO - Successfully retrieved PCDesktopClient +[2025-08-18 14:53:00,612] {__init__.py:46} INFO - Processing MacDesktopClient +[2025-08-18 14:53:00,689] {__init__.py:49} INFO - Successfully retrieved MacDesktopClient +[2025-08-18 14:53:00,705] {__init__.py:46} INFO - Processing MacStudioClient +[2025-08-18 14:53:00,767] {__init__.py:49} INFO - Successfully retrieved MacStudioClient +[2025-08-18 14:53:00,782] {__init__.py:46} INFO - Processing UWPAPP +[2025-08-18 14:53:00,891] {__init__.py:49} INFO - Successfully retrieved UWPAPP +[2025-08-18 14:53:00,904] {__init__.py:46} INFO - Processing XboxClient +[2025-08-18 14:53:00,975] {__init__.py:49} INFO - Successfully retrieved XboxClient +[2025-08-18 14:53:00,990] {__init__.py:46} INFO - Processing AndroidApp +[2025-08-18 14:53:01,052] {__init__.py:49} INFO - Successfully retrieved AndroidApp diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..7e71971 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,20 @@ +[project] +name = "appsettings-archiver" +version = "0.1.0" +description = "" +authors = [ + {name = "dfault-user",email = "32969563+dfault-user@users.noreply.github.com"} +] +readme = "README.md" +requires-python = ">=3.13" +dependencies = [ + "requests", + "dotenv", +] + +[tool.poetry] +package-mode = false + +[build-system] +requires = ["poetry-core>=2.0.0,<3.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/src/appsettings_archiver/__init__.py b/src/appsettings_archiver/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29