Last active
October 21, 2021 04:25
-
-
Save happyman/36e2e9105949f91e6ad9ac25794e3612 to your computer and use it in GitHub Desktop.
login OPTIMA by KiTTY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## | |
| ## KiTTY can do auto-login, and initial command. | |
| ## | |
| ## start first Kitty to get OTP | |
| $app = Start-Process -FilePath C:\Users\happyman\Desktop\kitty_portable-0.74.4.13.exe -ArgumentList '-load soptima' -passthru | |
| Write-Output "get OTP and sleep 15 secs" | |
| Start-Sleep -s 15 | |
| taskkill /PID $app.Id /f | |
| Write-Output "re-spawn kitty soptima" | |
| $otp = (python .\otp.py) | |
| Write-Output "get otp $otp ..." | |
| $app = Start-Process -FilePath C:\Users\happyman\Desktop\kitty_portable-0.74.4.13.exe -ArgumentList "-load soptima -cmd $otp" -passthru | |
| ## check if otp changed? | |
| $otp = (python .\otp.py) | |
| Write-Output "re-get otp $otp for manual input, in case 15 secs not enough" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
python version