.
tired of being forced on writing OTP everytime you crash/login? This script automates the process of logging ingame using OTP . just for lazy people like me.
Tried this with Ente Auth it works perfectly and provides secret key to use.
i know you can just enable trust launcher from UCP, you could still edit this script and use it for other purposes
Make sure you keep the two files within the same directory.
.
tired of being forced on writing OTP everytime you crash/login? This script automates the process of logging ingame using OTP . just for lazy people like me.
Tried this with Ente Auth it works perfectly and provides secret key to use.
i know you can just enable trust launcher from UCP, you could still edit this script and use it for other purposes
Code: Select all
# otp.py
# Secret key can be found Ente Auth if you're using it, Look for example
#If module pyotp not found install it with pip install pyotp
import pyotp
print(pyotp.TOTP("YOUR_SECRET_KEY_GOES_HERE").now())
Code: Select all
;auto Prints OTP in dialog on game start save it as autologin.ahk run it once and you're good to go
Loop {
WinWaitActive, GTA:SA:MP
;edit this if you connect too fast
Sleep, 18 000
SLeep, 500
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
TempFile := A_ScriptDir "\otp_output.txt"
RunWait, %ComSpec% /c python otp.py > "%TempFile%" 2>&1, , Hide
FileRead, OutputVar, %TempFile%
FileDelete, %TempFile%
OutputVar := Trim(OutputVar)
; Send the OTP to the game dialog
SendInput %OutputVar%
FileAppend, %TempFile%`n, *
}
WinWaitClose GTA:SA:MP
}
return
.