summaryrefslogtreecommitdiff
path: root/get
diff options
context:
space:
mode:
authorWindowsAddict2024-09-03 19:43:15 +0000
committerWindowsAddict2024-09-03 19:43:15 +0000
commit47bec55293904f04fddcd0561e6dd04d86c801d8 (patch)
tree128d6d351226a938cb5994581f8ab8bdfc1af3ef /get
parent81182013c0989f361662363f73b4b21a9a60cec8 (diff)
downloadmassgravel.github.io-47bec55293904f04fddcd0561e6dd04d86c801d8.zip
Add codeberg mirror
Diffstat (limited to 'get')
-rw-r--r--get15
1 files changed, 10 insertions, 5 deletions
diff --git a/get b/get
index 7abcbf7..f5b8a55 100644
--- a/get
+++ b/get
@@ -6,16 +6,21 @@ $ErrorActionPreference = "Stop"
$DownloadURL1 = 'https://raw.githubusercontent.com/massgravel/Microsoft-Activation-Scripts/35e044ddc85eed60b27b37c48371bd19cdc678b7/MAS/All-In-One-Version/MAS_AIO-CRC32_8C3AA7E0.cmd'
$DownloadURL2 = 'https://bitbucket.org/WindowsAddict/microsoft-activation-scripts/raw/35e044ddc85eed60b27b37c48371bd19cdc678b7/MAS/All-In-One-Version/MAS_AIO-CRC32_8C3AA7E0.cmd'
+$DownloadURL3 = 'https://codeberg.org/massgravel/Microsoft-Activation-Scripts/raw/commit/35e044ddc85eed60b27b37c48371bd19cdc678b7/MAS/All-In-One-Version/MAS_AIO-CRC32_8C3AA7E0.cmd'
-$URLs = @($DownloadURL1, $DownloadURL2)
-$RandomURL1 = Get-Random -InputObject $URLs
-$RandomURL2 = ($URLs -ne $RandomURL1)[0]
+$URLs = @($DownloadURL1, $DownloadURL2, $DownloadURL3)
+$ShuffledURLs = $URLs | Sort-Object { Get-Random }
try {
- $response = Invoke-WebRequest -Uri $RandomURL1 -UseBasicParsing
+ $response = Invoke-WebRequest -Uri $ShuffledURLs[0] -UseBasicParsing
}
catch {
- $response = Invoke-WebRequest -Uri $RandomURL2 -UseBasicParsing
+ try {
+ $response = Invoke-WebRequest -Uri $ShuffledURLs[1] -UseBasicParsing
+ }
+ catch {
+ $response = Invoke-WebRequest -Uri $ShuffledURLs[2] -UseBasicParsing
+ }
}
# Verify script integrity