Skip to content

Commit bd1f494

Browse files
Update app
0 parents  commit bd1f494

13 files changed

+190
-0
lines changed

CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
genshin-gacha-export.danmu9.com

assets/element-icons.9c88a535.woff

24.2 KB
Binary file not shown.

assets/element-icons.de5eb258.ttf

49.2 KB
Binary file not shown.

assets/index-legacy.4f60c8ed.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/index.8db8bcb2.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/index.fdad386e.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/polyfills-legacy.7f715cc1.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/vendor-legacy.983d698a.js

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/vendor.1bca63b3.js

Lines changed: 49 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

getLink.ps1

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
$logLocation = "%userprofile%\AppData\LocalLow\miHoYo\Genshin Impact\output_log.txt";
2+
$logLocationChina = "%userprofile%\AppData\LocalLow\miHoYo\$([char]0x539f)$([char]0x795e)\output_log.txt";
3+
4+
$reg = $args[0]
5+
if ($reg -eq "china") {
6+
Write-Host "Using China cache location"
7+
$logLocation = $logLocationChina
8+
}
9+
10+
$tmps = $env:TEMP + '\pm.ps1';
11+
if ([System.IO.File]::Exists($tmps)) {
12+
ri $tmps
13+
}
14+
15+
$path = [System.Environment]::ExpandEnvironmentVariables($logLocation);
16+
if (-Not [System.IO.File]::Exists($path)) {
17+
Write-Host "Cannot find the log file! Make sure to open the wish history first!" -ForegroundColor Red
18+
19+
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
20+
Write-Host "Do you want to try to run the script as Administrator? Press [ENTER] to continue, or any key to cancel."
21+
$keyInput = [Console]::ReadKey($true).Key
22+
if ($keyInput -ne "13") {
23+
return
24+
}
25+
26+
$myinvocation.mycommand.definition > $tmps
27+
28+
Start-Process powershell -Verb runAs -ArgumentList "-noexit", $tmps, $reg
29+
break
30+
}
31+
32+
return
33+
}
34+
35+
$logs = Get-Content -Path $path
36+
$m = $logs -match "(?m).:/.+(GenshinImpact_Data|YuanShen_Data)"
37+
$m[0] -match "(.:/.+(GenshinImpact_Data|YuanShen_Data))" >$null
38+
39+
if ($matches.Length -eq 0) {
40+
Write-Host "Cannot find the wish history url! Make sure to open the wish history first!" -ForegroundColor Red
41+
return
42+
}
43+
44+
$gamedir = $matches[1]
45+
$cachefile = "$gamedir/webCaches/Cache/Cache_Data/data_2"
46+
$tmpfile = "$env:TEMP/ch_data_2"
47+
48+
Copy-Item $cachefile -Destination $tmpfile
49+
50+
$content = Get-Content -Encoding UTF8 -Raw $tmpfile
51+
$splitted = $content -split "1/0/"
52+
$found = $splitted -match "https.+?game_biz=hk4e.+?&"
53+
54+
$found = $found[$found.Length - 1] -match "(https.+?game_biz=hk4e.+?)&"
55+
56+
Remove-Item $tmpfile
57+
58+
if (-Not $found) {
59+
Write-Host "Cannot find the wish history url! Make sure to open the wish history first!" -ForegroundColor Red
60+
return
61+
}
62+
63+
$wishHistoryUrl = $matches[1]
64+
65+
Write-Host $wishHistoryUrl
66+
Set-Clipboard -Value $wishHistoryUrl
67+
Write-Host "Link copied to clipboard, paste it back to paimon.moe" -ForegroundColor Green
68+
if ($reg -eq "china") {
69+
Write-Host "URL$([char]0x5df2)$([char]0x7ecf)$([char]0x590d)$([char]0x5236)$([char]0x5230)$([char]0x7c98)$([char]0x8d34)$([char]0x677f)"
70+
}

0 commit comments

Comments
 (0)