Skip to content

Instantly share code, notes, and snippets.

@feelingnothing
Created March 9, 2021 07:19
Show Gist options
  • Select an option

  • Save feelingnothing/d4cc7a7658fedec28495ead22ca43dfe to your computer and use it in GitHub Desktop.

Select an option

Save feelingnothing/d4cc7a7658fedec28495ead22ca43dfe to your computer and use it in GitHub Desktop.
Minecraft nick hunter, enter your email, password, and datetime that name will be available and host it on you vps, this script does not support security questions for the lack of speed (Only auth takes 1sec)
from datetime import datetime
import requests
import pause
PUT, POST = 'put', 'post'
USERNAME, PASSWORD = "", ""
NICKNAME = ""
DATETIME = datetime(year=0, month=0, day=0, hour=0, minute=0, second=0)
AUTH, NAME = (
"https://authserver.mojang.com/authenticate",
"https://api.minecraftservices.com/minecraft/profile/name/")
PAYLOAD = {"agent": {"name": "Minecraft", "version": 1},
"username": USERNAME, "password": PASSWORD}
pause.until(DATETIME)
session = requests.Session()
ACCESS_TOKEN = session.request(POST, AUTH, json=PAYLOAD).json()["accessToken"]
session.headers.update({"Authorization": "Bearer " + ACCESS_TOKEN})
resp = session.request(PUT, NAME + NICKNAME)
print(f"{resp.status_code=}\n{resp.json()=}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment