Skip to content

Instantly share code, notes, and snippets.

@Cha14ka
Created February 1, 2024 09:30
Show Gist options
  • Save Cha14ka/f7fdd14515b909c7541ebf55ae44b51d to your computer and use it in GitHub Desktop.
Save Cha14ka/f7fdd14515b909c7541ebf55ae44b51d to your computer and use it in GitHub Desktop.
Genshin Wish history for Linux
#!/bin/bash
GIPATH=$(ps aux | grep -a -Po 'Z:.+GenshinImpact.exe' | head -1 | sed -e 's/Z://' | sed -e 's/GenshinImpact.exe//' | tr '\\' '/' | sed s/'\W*$'//)
CACHEDIR=$GIPATH/GenshinImpact_Data/webCaches
CACHEDIR=$CACHEDIR/$(ls -t "$CACHEDIR" | grep -a -Po "\d+.\d+.\d+.\d" | head -1)
CACHEFILE=$CACHEDIR/Cache/Cache_Data/data_2
cat "$CACHEFILE" | grep -a -Po '(https:\/\/gs\.hoyoverse\.com\/genshin\/event\/e20190909gacha-v2.+?hk4e_global)\W' | tail -n 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment