Add self-hosted Git repo

This commit is contained in:
WindowsAddict 2024-09-29 03:50:18 +05:30
parent 2172c5789b
commit 633ff5b7e0

8
get
View File

@ -6,16 +6,22 @@ $ErrorActionPreference = "Stop"
$DownloadURL1 = 'https://raw.githubusercontent.com/massgravel/Microsoft-Activation-Scripts/52d4c52dba8e29a3c1fb295c8946dbe6cf2f0239/MAS/All-In-One-Version-KL/MAS_AIO.cmd' $DownloadURL1 = 'https://raw.githubusercontent.com/massgravel/Microsoft-Activation-Scripts/52d4c52dba8e29a3c1fb295c8946dbe6cf2f0239/MAS/All-In-One-Version-KL/MAS_AIO.cmd'
$DownloadURL2 = 'https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?path=/MAS/All-In-One-Version-KL/MAS_AIO.cmd&versionType=Commit&version=52d4c52dba8e29a3c1fb295c8946dbe6cf2f0239' $DownloadURL2 = 'https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?path=/MAS/All-In-One-Version-KL/MAS_AIO.cmd&versionType=Commit&version=52d4c52dba8e29a3c1fb295c8946dbe6cf2f0239'
$DownloadURL3 = 'https://git.activated.win/massgrave/Microsoft-Activation-Scripts/raw/commit/52d4c52dba8e29a3c1fb295c8946dbe6cf2f0239/MAS/All-In-One-Version-KL/MAS_AIO.cmd'
$URLs = @($DownloadURL1, $DownloadURL2) $URLs = @($DownloadURL1, $DownloadURL2, $DownloadURL3)
$ShuffledURLs = $URLs | Sort-Object { Get-Random } $ShuffledURLs = $URLs | Sort-Object { Get-Random }
try { try {
$response = Invoke-WebRequest -Uri $ShuffledURLs[0] -UseBasicParsing $response = Invoke-WebRequest -Uri $ShuffledURLs[0] -UseBasicParsing
} }
catch { catch {
try {
$response = Invoke-WebRequest -Uri $ShuffledURLs[1] -UseBasicParsing $response = Invoke-WebRequest -Uri $ShuffledURLs[1] -UseBasicParsing
} }
catch {
$response = Invoke-WebRequest -Uri $ShuffledURLs[2] -UseBasicParsing
}
}
# Verify script integrity # Verify script integrity
$releaseHash = '39961D29B07D59D54A709AA7B152269ADC6349752660A0C66D627B09DF18B9B6' $releaseHash = '39961D29B07D59D54A709AA7B152269ADC6349752660A0C66D627B09DF18B9B6'