Skip to content

Instantly share code, notes, and snippets.

@DarsoX
Last active November 24, 2021 23:41
Show Gist options
  • Save DarsoX/a2d0e3a5d990caeb473380bad3e33f19 to your computer and use it in GitHub Desktop.
Save DarsoX/a2d0e3a5d990caeb473380bad3e33f19 to your computer and use it in GitHub Desktop.
garant_wish
$logLocation = "%userprofile%\AppData\LocalLow\miHoYo\Genshin Impact\output_log.txt";
$path = [System.Environment]::ExpandEnvironmentVariables($logLocation);
if (-Not [System.IO.File]::Exists($path)) {
Write-Host "Cannot find the log file! Make sure to open the wish history first!" -ForegroundColor Red
exit
}
$logs = Get-Content -Path $path
$match = $logs -match "^OnGetWebViewPageFinish.*log$"
if (-Not $match) {
Write-Host "Cannot find the wish history url! Make sure to open the wish history first!" -ForegroundColor Red
exit
}
[string] $wishHistoryUrl = $match -replace 'OnGetWebViewPageFinish:', ''
Write-Host $wishHistoryUrl
Set-Clipboard -Value $wishHistoryUrl
Write-Host 'CKOPIROBAHO! Return to Genshin Impact Bot and activate the link.' -ForegroundColor Magenta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment