最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

《Minecraft》游戲默認(rèn)字體代碼展示

2023-07-21 14:35 作者:智慧的德國(guó)  | 我要投稿

注:此文轉(zhuǎn)載,僅供娛樂(lè),禁止運(yùn)用至商業(yè)用途!

Mojang曾發(fā)文過(guò),此字體的編寫(xiě)語(yǔ)言是python。

代碼:

import json

import socket

import webbrowser

import requests

def socketserver():

? ? sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

? ? sock.bind(('localhost', 8080))

? ? sock.listen(1)

? ? while True:

? ? ? ? conn, addr = sock.accept()

? ? ? ? data = conn.recv(1024)

? ? ? ? # if the data is not empty

? ? ? ? if data:

? ? ? ? ? ? # decode the data

? ? ? ? ? ? data = data.decode('utf-8')

? ? ? ? ? ? # we get first line of the data

? ? ? ? ? ? code = data.split('\r')[0]

? ? ? ? ? ? # we get the code from the first line (after the first =)

? ? ? ? ? ? code = code.split('=')[1]

? ? ? ? ? ? # before the space

? ? ? ? ? ? code = code.split('&')[0]

? ? ? ? ? ? # send success message

? ? ? ? ? ? conn.send(b'HTTP/1.1 200 OK\r<br>Content-Type: text/html\r<br>\r<br>Success')

? ? ? ? ? ? # close the connection

? ? ? ? ? ? conn.close()

? ? ? ? ? ? # return the code

? ? ? ? ? ? return code

? ? ? ? conn.close()

# get access token

def msa(clientid="aaaf3f8c-8b99-4e7b-8265-b637bd89317e"):

? ? # make a server on localhost to get the code

? ? webbrowser.open(

? ? ? ? 'https://login.live.com/oauth20_authorize.srf?client_id='+clientid+'&response_type'

? ? ? ? '=code&redirect_uri=http://localhost:8080&scope=XboxLive.signin%20offline_access&state=NOT_NEEDED')

? ? code = socketserver()

? ? url = 'https://login.live.com/oauth20_token.srf'

? ? data = {

? ? ? ? 'client_id': clientid,

? ? ? ? 'code': code,

? ? ? ? 'grant_type': 'authorization_code',

? ? ? ? 'redirect_uri': 'http://localhost:8080'

? ? }

? ? output = json.dumps(requests.post(url, data=data).json())

? ? token = json.loads(output)['access_token']

? ? # now get xbox token

? ? url = 'https://user.auth.xboxlive.com/user/authenticate'

? ? headers = {

? ? ? ? 'Content-Type': 'application/json',

? ? ? ? 'Accept': 'application/json',

? ? }

? ? data = {

? ? ? ? "Properties": {

? ? ? ? ? ? "AuthMethod": "RPS",

? ? ? ? ? ? "SiteName": "user.auth.xboxlive.com",

? ? ? ? ? ? "RpsTicket": f"d={token}"

? ? ? ? },

? ? ? ? "RelyingParty": "http://auth.xboxlive.com",

? ? ? ? "TokenType": "JWT"

? ? }

? ? xbox = requests.post(url, headers=headers, json=data).json

? ? token = xbox()['Token']

? ? # uhs is in xui which is in displayclaims

? ? uhs = xbox()['DisplayClaims']['xui'][0]['uhs']

? ? # final microsoft(xsts) token

? ? url = 'https://xsts.auth.xboxlive.com/xsts/authorize'

? ? headers = {

? ? ? ? 'Content-Type': 'application/json',

? ? ? ? 'Accept': 'application/json',

? ? }

? ? data = {

? ? ? ? "Properties": {

? ? ? ? ? ? "SandboxId": "RETAIL",

? ? ? ? ? ? "UserTokens": [

? ? ? ? ? ? ? ? token

? ? ? ? ? ? ]

? ? ? ? },

? ? ? ? "RelyingParty": "rp://api.minecraftservices.com/",

? ? ? ? "TokenType": "JWT"

? ? }

? ? xsts = requests.post(url, headers=headers, json=data).json

? ? token = xsts()['Token']

? ? # its mojang time

? ? url = 'https://api.minecraftservices.com/authentication/login_with_xbox'

? ? headers = {

? ? ? ? 'Content-Type': 'application/json',

? ? ? ? 'Accept': 'application/json',

? ? }

? ? data = {

? ? ? ? "identityToken": "XBL3.0 x=" + uhs + ';' + token,

? ? ? ? "ensureLegacyEnabled": "true"

? ? }

? ? mojang = requests.post(url, headers=headers, json=data).json

? ? token = mojang()['access_token']

? ? return token

def profile_info(token):

? ? url = 'https://api.minecraftservices.com/minecraft/profile'

? ? headers = {

? ? ? ? 'Authorization': f'Bearer {token}'

? ? }

? ? return requests.get(url, headers=headers).json()

def player_attributes(token):

? ? url = 'https://api.minecraftservices.com/player/attributes'

? ? headers = {

? ? ? ? 'Authorization': f'Bearer {token}'

? ? }

? ? return requests.get(url, headers=headers).json()

def player_blocklist(token):

? ? url = 'https://api.minecraftservices.com/privacy/blocklist'

? ? headers = {

? ? ? ? 'Authorization': f'Bearer {token}'

? ? }

? ? return requests.get(url, headers=headers).json()

def player_certificates(token):

? ? url = 'https://api.minecraftservices.com/player/certificates'

? ? headers = {

? ? ? ? 'Authorization': f'Bearer {token}'

? ? }

? ? return requests.post(url, headers=headers).json()

def profile_name_change_info(token):

? ? url = 'https://api.minecraftservices.com/minecraft/profile/namechange'

? ? headers = {

? ? ? ? 'Authorization': f'Bearer {token}'

? ? }

? ? return requests.get(url, headers=headers).json()

def check_product_voucher(token, giftcode):

? ? url = f'https://api.minecraftservices.com/productvoucher/{giftcode}'

? ? headers = {

? ? ? ? 'Authorization': f'Bearer {token}'

? ? }

? ? return requests.get(url, headers=headers).json()

def name_availability(token, name):

? ? url = f'https://api.minecraftservices.com/minecraft/profile/name/{name}/available'

? ? headers = {

? ? ? ? 'Authorization': f'Bearer {token}'

? ? }

? ? return requests.get(url, headers=headers).json()

def change_name(token, name):

? ? url = f'https://api.minecraftservices.com/minecraft/profile/name/{name}'

? ? headers = {

? ? ? ? 'Authorization': f'Bearer {token}'

? ? }

? ? return requests.put(url, headers=headers).json()

def change_skin(token, skinurl, variant):

? ? url = 'https://api.minecraftservices.com/minecraft/profile/skins'

? ? headers = {

? ? ? ? 'Authorization': f'Bearer {token}'

? ? }

? ? data = {

? ? ? ? "variant": variant,

? ? ? ? "url": skinurl

? ? }

? ? return requests.post(url, headers=headers, json=data).json()

def upload_skin(token, file, variant):

? ? url = 'https://api.minecraftservices.com/minecraft/profile/skins'

? ? headers = {

? ? ? ? 'Authorization': f'Bearer {token}'

? ? }

? ? data = {

? ? ? ? "variant": variant,

? ? ? ? "file": file

? ? }

? ? return requests.post(url, headers=headers, json=data).json()

def reset_skin(token):

? ? url = 'https://api.minecraftservices.com/minecraft/profile/skins'

? ? headers = {

? ? ? ? 'Authorization': f'Bearer {token}'

? ? }

? ? return requests.delete(url, headers=headers).json()

def hide_cape(token):

? ? url = 'https://api.minecraftservices.com/minecraft/profile/capes/active'

? ? headers = {

? ? ? ? 'Authorization': f'Bearer {token}'

? ? }

? ? return requests.delete(url, headers=headers).json()

def show_cape(token, capeid):

? ? url = 'https://api.minecraftservices.com/minecraft/profile/capes/active'

? ? headers = {

? ? ? ? 'Authorization': f'Bearer {token}',

? ? ? ? 'Content-Type': 'application/json'

? ? }

? ? data = {

? ? ? ? "capeId": capeid

? ? }

? ? return requests.put(url, headers=headers, json=data).json()

def blocked_severs():

? ? url = 'https://sessionserver.mojang.com/blockedservers'

? ? return requests.get(url).text

def profile_info(token):

? ? url = 'https://api.minecraftservices.com/minecraft/profile'

? ? headers = {

? ? ? ? 'Authorization': f'Bearer {token}'

? ? }

? ? return requests.get(url, headers=headers).json()


《Minecraft》游戲默認(rèn)字體代碼展示的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
沁阳市| 阜新市| 兴国县| 九龙坡区| 胶州市| 宁国市| 旅游| 壤塘县| 克什克腾旗| 濉溪县| 双峰县| 鄂托克旗| 富平县| 顺平县| 大竹县| 玛纳斯县| 曲周县| 三河市| 廊坊市| 庆安县| 东乌| 江安县| 北宁市| 盘山县| 大港区| 黔西县| 宁河县| 天水市| 武鸣县| 文山县| 阳朔县| 冀州市| 吉林市| 枣强县| 阿拉善左旗| 浦江县| 织金县| 剑川县| 大庆市| 丰都县| 桦甸市|