Skip to content

Commit 496e56c

Browse files
updated/fixed powershell script
1 parent 0a0320d commit 496e56c

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

docs/rewerse-engineering.ps1

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ if (-not $ApkFile) {
3030
Write-Host "No APK files found in the directory '$WorkingDirectory'"
3131
Write-Host "Downloading from UpToDown.com"
3232

33-
# Static download link to 3.18.5 because the script may break with new versions anyways
33+
# Static download link to 3.18.6 because the script may break with new versions anyways
3434
# Also, it will take months from now until they can feasibly change anything about the certificates or api
3535
# Send a request to the URL
36-
$BaseUrl = "https://rewe.en.uptodown.com/android/post-download/1014869773"
37-
$Response = Invoke-WebRequest -Uri $BaseUrl -UseBasicParsing
38-
if ($response.StatusCode -ne 200) {
39-
Write-Error "Failed to fetch the URL. Status code: $($response.StatusCode). Download the apk manually from https://rewe.en.uptodown.com/android/post-download/1014869773"
36+
$BaseUrl = "https://rewe.de.uptodown.com/android/download/1017194376"
37+
try {
38+
$Response = Invoke-WebRequest -Uri $BaseUrl -UseBasicParsing
39+
if ($response.StatusCode -ne 200) {
40+
throw "Issue getting data-url"
41+
}
42+
} catch {
43+
Write-Error "Failed to fetch the APK. Download the apk manually from https://rewe.en.uptodown.com/android/"
4044
return
4145
}
4246

@@ -116,8 +120,8 @@ $KeyPem = @"
116120
$KeyBase64
117121
-----END PRIVATE KEY-----
118122
"@
119-
Set-Content -Path $KeyPath -Value $KeyPem
120-
Write-Host "Keys exported successfully."
121-
122-
Write-Host "------------------"
123-
Write-Host "Done :)"
123+
Set-Content -Path $KeyPath -Value $KeyPem
124+
Write-Host "Keys exported successfully."
125+
126+
Write-Host "------------------"
127+
Write-Host "Done :)"

0 commit comments

Comments
 (0)