What the Wuthering Waves import script reads
To import your history you run a short PowerShell script. This page walks through the Wuthering Waves script step by step: what it reads, what it leaves alone and what happens to the link it copies. The full script is at the bottom.
What it does, step by step
Looks up where Wuthering Waves is installed: the installed programs list and the MuiCache in the Windows registry, plus the usual install folders on every drive.
Opens the game logs read-only, newest first (Client.log and the debug.log of the built-in browser), and reads the last 4 MB of each.
Newer game versions encode Client.log byte by byte. The script decodes what it read in memory and looks for the convene history link in both versions of the text.
Puts the link into the clipboard. It stops working after about an hour, so paste it right away.
What it never does
- It sends nothing over the internet: there are no download or upload commands in it.
- It doesn't create, change or delete any files.
- It doesn't ask for administrator rights and installs nothing.
- It doesn't ask for your password, login or cookies.
What is in the link
The link opens your convene history page and stops working after about an hour.
Your browser loads the history straight from Kuro's server; our server isn't involved. The history is saved in your browser and, if you're signed in, in your account.
What we keep
The history itself, pull by pull, stays in your browser. If you're signed in, the same records sync to your account so the tracker works on your other devices. The link is never saved anywhere, not even in your browser. To erase the history, press “Delete history” in the tracker: it goes from this browser and from your account.
Check it yourself
- Read the script before you run it. It's shown in full below: plain text made of standard PowerShell commands.
- Look for network commands such as Invoke-WebRequest or Invoke-RestMethod. There are none.
- If you like, paste the link into Notepad first: it starts with an address on aki-game.net.
- During the import, the Network tab in your browser's developer tools shows where every request goes: straight to Kuro's server.
The full script
The same script as on the import page.
# GachaFans: find the Wuthering Waves convene history link (reads local files and registry only)
$roots = New-Object System.Collections.Generic.List[string]
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*' -ErrorAction SilentlyContinue |
Where-Object { $_.DisplayName -like '*Wuthering*' -and $_.InstallPath } | ForEach-Object { $roots.Add($_.InstallPath) }
$mui = Get-ItemProperty 'HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache' -ErrorAction SilentlyContinue
if ($mui) { $mui.PSObject.Properties | Where-Object { $_.Name -like '*client-win64-shipping.exe*' } | ForEach-Object { $roots.Add(($_.Name -split '\\client\\', 2)[0]) } }
foreach ($d in (Get-PSDrive -PSProvider FileSystem).Root) {
foreach ($p in 'Wuthering Waves Game', 'Wuthering Waves\Wuthering Waves Game', 'Program Files\Wuthering Waves\Wuthering Waves Game',
'SteamLibrary\steamapps\common\Wuthering Waves', 'SteamLibrary\steamapps\common\Wuthering Waves\Wuthering Waves Game',
'Program Files (x86)\Steam\steamapps\common\Wuthering Waves', 'Program Files (x86)\Steam\steamapps\common\Wuthering Waves\Wuthering Waves Game',
'Program Files\Epic Games\WutheringWavesj3oFh\Wuthering Waves Game') { $roots.Add((Join-Path $d $p)) }
}
$logs = $roots | Select-Object -Unique | ForEach-Object {
Join-Path $_ 'Client\Saved\Logs\Client.log'
Join-Path $_ 'Client\Binaries\Win64\ThirdParty\KrPcSdk_Global\KRSDKRes\KRSDKWebView\debug.log'
} | Where-Object { Test-Path -LiteralPath $_ } | Get-Item | Sort-Object LastWriteTime -Descending
if (-not $logs) { Write-Host 'Game log not found. Open the convene history in the game, then run this again.'; return }
$re = 'https://aki-gm-resources-oversea\.aki-game\.net/aki/gacha/index\.html#/record[^"\s]*'
Write-Host 'Reading the game log, this can take a few seconds...'
$map = [byte[]](0..255 | ForEach-Object { if ($_ -band 1) { $_ -bxor 0xA5 } else { $_ -bxor 0xEF } })
$url = $null
foreach ($f in $logs) {
$fs = [IO.File]::Open($f.FullName, 'Open', 'Read', 'ReadWrite, Delete')
$len = [Math]::Min($fs.Length, 4MB); $null = $fs.Seek(-$len, 'End')
$bytes = New-Object byte[] $len; $null = $fs.Read($bytes, 0, $len); $fs.Close()
$plain = [Text.Encoding]::UTF8.GetString($bytes)
for ($i = 0; $i -lt $bytes.Length; $i++) { $bytes[$i] = $map[$bytes[$i]] }
$decoded = [Text.Encoding]::UTF8.GetString($bytes)
foreach ($t in $decoded, $plain) { $hit = [regex]::Matches($t, $re) | Select-Object -Last 1; if ($hit) { $url = $hit.Value; break } }
if ($url) { break }
}
if (-not $url) { Write-Host 'Link not found. Open the convene history in the game, then run this again.'; return }
Set-Clipboard -Value $url
Write-Host 'Done: the link is in your clipboard. Paste it on the GachaFans page right away, it expires in about an hour.'