diff --git a/quarry/net/MicrosoftAuth.py b/quarry/net/MicrosoftAuth.py new file mode 100644 index 0000000..a095700 --- /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