From 63703b94f84ed1b56af8bdc655fcf10077032996 Mon Sep 17 00:00:00 2001 From: Kyler Eastridge Date: Sat, 21 Jun 2025 05:06:16 -0400 Subject: [PATCH] Add support for 2 factor authentication --- pymetaverse/login.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pymetaverse/login.py b/pymetaverse/login.py index b1c8c43..5193296 100755 --- a/pymetaverse/login.py +++ b/pymetaverse/login.py @@ -2,6 +2,7 @@ import sys import hashlib import uuid #For Mac addresses +import socket #For Host ID from . import httpclient from . import llsd @@ -88,7 +89,8 @@ async def Login(username, password, start = "last", options = None, grid = "https://login.agni.lindenlab.com/cgi-bin/login.cgi", - isBot = True + isBot = True, + token = "" ): # Try our hardest to parse whatever we've been previded @@ -142,6 +144,7 @@ async def Login(username, password, #"build": 0, #Machine information + "host_id": socket.gethostname(), "mac": mac, #WARNING: Falsifying this is a violation of the Terms of Service "id0": id0, #WARNING: Falsifying this is a violation of the Terms of Service #"viewer_digest": "", @@ -166,7 +169,7 @@ async def Login(username, password, #For proxied connections apparently: #"service_proxy_ip": "", - "token": "", + "token": token, "mfa_hash": "" })