Compare commits
8 Commits
b60816e393
...
main
Author | SHA1 | Date | |
---|---|---|---|
92828931c0 | |||
dd429f89fa | |||
bda8e25dc6 | |||
66b1789202 | |||
836a6d277b | |||
1d4c5a232a | |||
8de888f52f | |||
8dafebad65 |
37
index.html
37
index.html
@@ -1,5 +1,13 @@
|
||||
# This script is hosted on <b>https://get.activated.win</b> for <b>https://massgrave.dev</b><hr><pre>
|
||||
|
||||
if (-not $args) {
|
||||
Write-Host ''
|
||||
Write-Host 'Need help? Check our homepage: ' -NoNewline
|
||||
Write-Host 'https://massgrave.dev' -ForegroundColor Green
|
||||
Write-Host ''
|
||||
}
|
||||
|
||||
& {
|
||||
$psv = (Get-Host).Version.Major
|
||||
$troubleshoot = 'https://massgrave.dev/troubleshoot'
|
||||
|
||||
@@ -43,16 +51,16 @@ function CheckFile {
|
||||
try { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 } catch {}
|
||||
|
||||
$URLs = @(
|
||||
'https://raw.githubusercontent.com/massgravel/Microsoft-Activation-Scripts/67abcd0c8925832fcf4365b9cf3706ab6fbf8571/MAS/All-In-One-Version-KL/MAS_AIO.cmd',
|
||||
'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=67abcd0c8925832fcf4365b9cf3706ab6fbf8571',
|
||||
'https://git.activated.win/massgrave/Microsoft-Activation-Scripts/raw/commit/67abcd0c8925832fcf4365b9cf3706ab6fbf8571/MAS/All-In-One-Version-KL/MAS_AIO.cmd'
|
||||
'https://raw.githubusercontent.com/massgravel/Microsoft-Activation-Scripts/3917497c826685ffc6f3d025397e5c8c4f7fa744/MAS/All-In-One-Version-KL/MAS_AIO.cmd',
|
||||
'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=3917497c826685ffc6f3d025397e5c8c4f7fa744',
|
||||
'https://git.activated.win/massgrave/Microsoft-Activation-Scripts/raw/commit/3917497c826685ffc6f3d025397e5c8c4f7fa744/MAS/All-In-One-Version-KL/MAS_AIO.cmd'
|
||||
)
|
||||
|
||||
Write-Progress -Activity "Downloading..." -Status "Please wait"
|
||||
$errors = @()
|
||||
foreach ($URL in $URLs | Sort-Object { Get-Random }) {
|
||||
try {
|
||||
if ($psv -ge 3) {
|
||||
$response = Invoke-WebRequest -Uri $URL -UseBasicParsing
|
||||
$response = Invoke-RestMethod $URL
|
||||
}
|
||||
else {
|
||||
$w = New-Object Net.WebClient
|
||||
@@ -64,6 +72,7 @@ foreach ($URL in $URLs | Sort-Object { Get-Random }) {
|
||||
$errors += $_
|
||||
}
|
||||
}
|
||||
Write-Progress -Activity "Downloading..." -Status "Done" -Completed
|
||||
|
||||
if (-not $response) {
|
||||
Check3rdAV
|
||||
@@ -77,7 +86,7 @@ if (-not $response) {
|
||||
}
|
||||
|
||||
# Verify script integrity
|
||||
$releaseHash = 'EF2F705B9E8BE2816598E2E8B70BADB200733F2287B917D6C9666D95C63AFBF9'
|
||||
$releaseHash = '4A0123C97E7859679DD49F22D5948FD77A775CC526B9E07797FC293C6C7731BC'
|
||||
$stream = New-Object IO.MemoryStream
|
||||
$writer = New-Object IO.StreamWriter $stream
|
||||
$writer.Write($response)
|
||||
@@ -109,14 +118,20 @@ $chkcmd = & $env:ComSpec /c "echo CMD is working"
|
||||
if ($chkcmd -notcontains "CMD is working") {
|
||||
Write-Warning "cmd.exe is not working.`nReport this issue at $troubleshoot"
|
||||
}
|
||||
saps -FilePath $env:ComSpec -ArgumentList "/c """"$FilePath"" $args""" -Wait
|
||||
CheckFile $FilePath
|
||||
|
||||
if ($psv -lt 3) {
|
||||
write-host ""
|
||||
write-host "Press any key to exit when process is done..."
|
||||
[void][System.Console]::ReadKey($true)
|
||||
if (Test-Path "$env:SystemRoot\Sysnative") {
|
||||
Write-Warning "Command is running with x86 Powershell, run it with x64 Powershell instead..."
|
||||
return
|
||||
}
|
||||
$p = saps -FilePath $env:ComSpec -ArgumentList "/c """"$FilePath"" -el -qedit $args""" -Verb RunAs -PassThru
|
||||
$p.WaitForExit()
|
||||
}
|
||||
else {
|
||||
saps -FilePath $env:ComSpec -ArgumentList "/c """"$FilePath"" -el $args""" -Wait -Verb RunAs
|
||||
}
|
||||
CheckFile $FilePath
|
||||
|
||||
$FilePaths = @("$env:SystemRoot\Temp\MAS*.cmd", "$env:USERPROFILE\AppData\Local\Temp\MAS*.cmd")
|
||||
foreach ($FilePath in $FilePaths) { Get-Item $FilePath -ErrorAction SilentlyContinue | Remove-Item }
|
||||
} @args
|
||||
|
Reference in New Issue
Block a user