From 5512a53934892e22522b3880becd6c6f1c4262b6 Mon Sep 17 00:00:00 2001 From: Koliw Date: Thu, 7 Apr 2022 14:19:46 +0200 Subject: [PATCH 1/2] Microsoft Auth --- quarry/net/MicrosoftAuth.py | 124 ++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 quarry/net/MicrosoftAuth.py diff --git a/quarry/net/MicrosoftAuth.py b/quarry/net/MicrosoftAuth.py new file mode 100644 index 0000000..f7c7e9d --- /dev/null +++ b/quarry/net/MicrosoftAuth.py @@ -0,0 +1,124 @@ +import urllib.parse +import requests +import re +import json + +CLIENT_ID = "00000000402b5328"; +SCOPE = "service::user.auth.xboxlive.com::MBI_SSL" +REDIRECT_URI = "https://login.live.com/oauth20_desktop.srf" + +LOGIN_URL = "https://login.live.com/oauth20_authorize.srf?"+urllib.parse.urlencode({ + 'client_id' : CLIENT_ID, + 'response_type':'code', + 'scope': SCOPE, + 'redirect_uri' : REDIRECT_URI +}) +AUTH_TOKEN_URL = "https://login.live.com/oauth20_token.srf" +XBL_TOKEN_URL = "https://user.auth.xboxlive.com/user/authenticate" +XSTS_TOKEN_URL = "https://xsts.auth.xboxlive.com/xsts/authorize" +MC_TOKEN_URL = "https://api.minecraftservices.com/authentication/login_with_xbox" +PROFILE_URL = "https://api.minecraftservices.com/minecraft/profile" + +# Expected data: +# sFTTag: '' +# +# This is all inside a long