summaryrefslogtreecommitdiff
path: root/MAS
diff options
context:
space:
mode:
authorWindowsAddict2025-02-02 12:43:28 +0000
committerWindowsAddict2025-02-02 12:43:28 +0000
commit9e6f386819c5c64287e25a8229107dcdd6d91c7e (patch)
tree15666b4f63d292e6075baeb48d729be539a9f727 /MAS
parentb5ba36c033f160a7e8814d6f96d33ebfc5105e67 (diff)
downloadMicrosoft-Activation-Scripts-9e6f386819c5c64287e25a8229107dcdd6d91c7e.zip
Fix licensing servers tests
Diffstat (limited to 'MAS')
-rw-r--r--MAS/All-In-One-Version-KL/MAS_AIO.cmd17
-rw-r--r--MAS/Separate-Files-Version/Activators/HWID_Activation.cmd17
2 files changed, 12 insertions, 22 deletions
diff --git a/MAS/All-In-One-Version-KL/MAS_AIO.cmd b/MAS/All-In-One-Version-KL/MAS_AIO.cmd
index d16eb7d..42c837e 100644
--- a/MAS/All-In-One-Version-KL/MAS_AIO.cmd
+++ b/MAS/All-In-One-Version-KL/MAS_AIO.cmd
@@ -865,26 +865,21 @@ ipconfig /flushdns %nul%
set "tls=[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;"
for %%# in (
+licensing.mp.microsoft.com/v7.0/licenses/content
login.live.com/ppsecure/deviceaddcredential.srf
purchase.mp.microsoft.com/v7.0/users/me/orders
) do if not defined resfail (
-set "d1=Add-Type -AssemblyName System.Net.Http;"
-set "d1=!d1! $client = [System.Net.Http.HttpClient]::new();"
-set "d1=!d1! $response = $client.GetAsync('https://%%#').GetAwaiter().GetResult();"
-set "d1=!d1! $response.Content.ReadAsStringAsync().GetAwaiter().GetResult()"
-%psc% "!tls! !d1!" %nul2% | findstr /i "PurchaseFD DeviceAddResponse" %nul1% || set resfail=1
-if defined resfail %psc% "!tls! !d1!"
+%psc% "try { !tls! irm https://%%# -Method POST } catch { if ($_.Exception.Response -eq $null) { exit 3 } }"
+if !errorlevel!==3 (
+echo:
+set resfail=1
+%psc% "try { !tls! irm https://%%# -Method POST } catch { Write-Host """"[%%#] $($_.Exception.Message)"""" -ForegroundColor Red -BackgroundColor Black }"
)
-
-if not defined resfail (
-%psc% "!tls! irm https://licensing.mp.microsoft.com/v7.0/licenses/content -Method POST" | find /i "traceId" %nul1% || set resfail=1
-if defined resfail %psc% "!tls! irm https://licensing.mp.microsoft.com/v7.0/licenses/content -Method POST"
)
)
if defined resfail (
set error=1
-echo:
for %%# in (
login.live.com
purchase.mp.microsoft.com
diff --git a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd
index e92f742..bb33f73 100644
--- a/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd
+++ b/MAS/Separate-Files-Version/Activators/HWID_Activation.cmd
@@ -628,26 +628,21 @@ ipconfig /flushdns %nul%
set "tls=[Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12;"
for %%# in (
+licensing.mp.microsoft.com/v7.0/licenses/content
login.live.com/ppsecure/deviceaddcredential.srf
purchase.mp.microsoft.com/v7.0/users/me/orders
) do if not defined resfail (
-set "d1=Add-Type -AssemblyName System.Net.Http;"
-set "d1=!d1! $client = [System.Net.Http.HttpClient]::new();"
-set "d1=!d1! $response = $client.GetAsync('https://%%#').GetAwaiter().GetResult();"
-set "d1=!d1! $response.Content.ReadAsStringAsync().GetAwaiter().GetResult()"
-%psc% "!tls! !d1!" %nul2% | findstr /i "PurchaseFD DeviceAddResponse" %nul1% || set resfail=1
-if defined resfail %psc% "!tls! !d1!"
+%psc% "try { !tls! irm https://%%# -Method POST } catch { if ($_.Exception.Response -eq $null) { exit 3 } }"
+if !errorlevel!==3 (
+echo:
+set resfail=1
+%psc% "try { !tls! irm https://%%# -Method POST } catch { Write-Host """"[%%#] $($_.Exception.Message)"""" -ForegroundColor Red -BackgroundColor Black }"
)
-
-if not defined resfail (
-%psc% "!tls! irm https://licensing.mp.microsoft.com/v7.0/licenses/content -Method POST" | find /i "traceId" %nul1% || set resfail=1
-if defined resfail %psc% "!tls! irm https://licensing.mp.microsoft.com/v7.0/licenses/content -Method POST"
)
)
if defined resfail (
set error=1
-echo:
for %%# in (
login.live.com
purchase.mp.microsoft.com