LaunchRoblox 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,81 @@
1
+ Metadata-Version: 2.4
2
+ Name: LaunchRoblox
3
+ Version: 0.1.0
4
+ Summary: A lightweight utility to programmatically authenticate and launch the Roblox client.
5
+ Author-email: noaclr <154766525+noaclr@users.noreply.github.com>
6
+ Project-URL: Homepage, https://github.com/noaclr/LaunchRoblox
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.7
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: requests>=2.25.0
14
+ Dynamic: license-file
15
+
16
+ # LaunchRoblox
17
+
18
+ A lightweight, cross-platform Python utility to programmatically authenticate and launch the Roblox client using a `.ROBLOSECURITY` cookie and a specific Place ID.
19
+
20
+ ## Features
21
+
22
+ - **Automated Auth Flow:** Seamlessly exchanges a `.ROBLOSECURITY` cookie for an official `rbx-authentication-ticket` using the secure Roblox authentication endpoints.
23
+ - **Cross-Platform Support:** Native client launching support across **Windows** (`os.startfile`), **macOS** (`open`), and **Linux** (`xdg-open`).
24
+ - **Defensive Error Handling:** Built-in validation checks to catch expired, missing, or invalid authentication tokens before launching.
25
+ - **Zero Disk Overhead:** Clean, direct execution without bloating your local environment.
26
+
27
+ ## Installation
28
+
29
+ Install the package directly from PyPI:
30
+
31
+ ```bash
32
+ pip install LaunchRoblox
33
+
34
+ ```
35
+
36
+ ## Quick Start
37
+
38
+ ```python
39
+ from roblox_launcher import launchRoblox, AuthenticationError
40
+
41
+ # Replace with your actual .ROBLOSECURITY cookie
42
+ cookie = "_|WARNING:-DO-NOT-SHARE-THIS..."
43
+ # The Place ID you want to join (e.g., 2753915549 for Blox Fruits)
44
+ placeId = 2753915549
45
+
46
+ try:
47
+ print("Authenticating and launching client...")
48
+ launchRoblox(placeId, cookie)
49
+ print("Success! Roblox protocol handler triggered.")
50
+ except AuthenticationError as e:
51
+ print(f"Authentication failed: {e}")
52
+ except Exception as e:
53
+ print(f"An unexpected error occurred: {e}")
54
+
55
+ ```
56
+
57
+ ## API Reference
58
+
59
+ ### `launchRoblox(placeId, cookie)`
60
+
61
+ Generates an authentication ticket and fires the platform's native URI scheme (`roblox-player:1+...`) to open the game client.
62
+
63
+ * `placeId` *(int)*: The unique ID of the Roblox place/experience.
64
+ * `cookie` *(str)*: The full `.ROBLOSECURITY` token for the target account.
65
+
66
+ ### `fetchAuthTicket(cookie)`
67
+
68
+ Handles the underlying backend API handshake to retrieve a valid launch token. This involves retrieving a client assertion, obtaining a valid CSRF token, and exchanging them for the final authentication ticket.
69
+
70
+ * `cookie` *(str)*: The target account's cookie.
71
+ * **Returns:** *(str)* A valid `rbx-authentication-ticket`.
72
+ * **Raises:** `AuthenticationError` if the cookie is invalid, missing, or if the API communication fails.
73
+
74
+ ## Requirements
75
+
76
+ * Python >= 3.7
77
+ * `requests` library
78
+
79
+ ## License
80
+
81
+ This project is licensed under the MIT License - see the LICENSE file for details.
@@ -0,0 +1,7 @@
1
+ launchroblox-0.1.0.dist-info/licenses/LICENSE,sha256=TX0BhGAOhJT76UUlxGPlMr51t_d8tTPtRAjB4DP2bHg,1082
2
+ roblox_launcher/__init__.py,sha256=SmfQDlU6kIGE0lcjyTwsJldm4k814Tl7XXj3chkOdSQ,144
3
+ roblox_launcher/launcher.py,sha256=XqNDFQXcfq_Q__LRC0p289hAl5hiPykNRUtmOiEPtLg,2826
4
+ launchroblox-0.1.0.dist-info/METADATA,sha256=L0FdjevHcEKHR4U3LuCtdKan7kuix4UaPOCLfETI_XM,2985
5
+ launchroblox-0.1.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
6
+ launchroblox-0.1.0.dist-info/top_level.txt,sha256=zaL9x1PK_DN3oMVMNbVhNO1xInU_b9_5jwiFSPe72Ho,16
7
+ launchroblox-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (83.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 noaclr
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ roblox_launcher
@@ -0,0 +1,3 @@
1
+ from .launcher import launchRoblox, fetchAuthTicket, AuthenticationError
2
+
3
+ __all__ = ["launchRoblox", "fetchAuthTicket", "AuthenticationError"]
@@ -0,0 +1,82 @@
1
+ import os
2
+ import sys
3
+ import time
4
+ import requests
5
+ from urllib.parse import urlencode, quote
6
+
7
+ class AuthenticationError(Exception):
8
+ pass
9
+
10
+ def fetchAuthTicket(cookie):
11
+ cookies = {".ROBLOSECURITY": cookie}
12
+
13
+ try:
14
+ r = requests.get("https://auth.roblox.com/v1/client-assertion", cookies=cookies)
15
+ rJson = r.json()
16
+ except (requests.RequestException, ValueError):
17
+ raise AuthenticationError("Failed to communicate with the Roblox auth API.")
18
+
19
+ if "clientAssertion" not in rJson:
20
+ errorMsg = rJson.get("errors", [{}])[0].get("message", r.text)
21
+ if "Authentication token is missing" in errorMsg:
22
+ raise AuthenticationError("You forgot to provide a valid .ROBLOSECURITY cookie.")
23
+ elif "User is not authenticated" in errorMsg:
24
+ raise AuthenticationError("You provided an invalid .ROBLOSECURITY cookie.")
25
+ raise AuthenticationError(f"API Error: {errorMsg}")
26
+
27
+ clientAssertion = rJson["clientAssertion"]
28
+
29
+ r = requests.post("https://auth.roblox.com/v2/logout", cookies=cookies)
30
+ csrfToken = r.headers.get("x-csrf-token")
31
+ if not csrfToken:
32
+ raise AuthenticationError("Could not retrieve x-csrf-token header.")
33
+
34
+ payload = {"clientAssertion": clientAssertion}
35
+ headers = {"x-csrf-token": csrfToken, "Referer": "https://www.roblox.com/"}
36
+
37
+ r = requests.post(
38
+ "https://auth.roblox.com/v1/authentication-ticket",
39
+ data=payload,
40
+ cookies=cookies,
41
+ headers=headers
42
+ )
43
+
44
+ authTicket = r.headers.get("rbx-authentication-ticket")
45
+ if not authTicket:
46
+ raise AuthenticationError("Failed to obtain rbx-authentication-ticket from response headers.")
47
+
48
+ return authTicket
49
+
50
+ def launchRoblox(placeId, cookie):
51
+ query = urlencode({
52
+ "request": "RequestGame",
53
+ "browserTrackerId": "0",
54
+ "placeId": placeId,
55
+ "isPlayTogetherGame": "false",
56
+ "referredByPlayerId": 0,
57
+ "joinAttemptId": "",
58
+ "joinAttemptOrigin": "PlayButton",
59
+ })
60
+
61
+ encodedPlaceUrl = quote(f"https://www.roblox.com/Game/PlaceLauncher.ashx?{query}", safe="")
62
+ launchTime = int(time.time() * 1000)
63
+
64
+ robloxURI = (
65
+ "roblox-player:1"
66
+ + "+launchmode:play"
67
+ + f"+gameinfo:{fetchAuthTicket(cookie)}"
68
+ + f"+launchtime:{launchTime}"
69
+ + f"+placelauncherurl:{encodedPlaceUrl}"
70
+ + f"+browsertrackerid:0"
71
+ + "+robloxLocale:en_us"
72
+ + "+gameLocale:en_us"
73
+ + "+channel:"
74
+ + "+LaunchExp:InApp"
75
+ )
76
+
77
+ if sys.platform == "win32":
78
+ os.startfile(robloxURI)
79
+ elif sys.platform == "darwin":
80
+ os.system(f"open '{robloxURI}'")
81
+ else:
82
+ os.system(f"xdg-open '{robloxURI}'")