mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-04-05 12:37:15 +08:00
Compare commits
No commits in common. "63045afc708028e867f02a3cd135c6e7ebe5fa53" and "b5ba36c033f160a7e8814d6f96d33ebfc5105e67" have entirely different histories.
63045afc70
...
b5ba36c033
@ -600,6 +600,7 @@ cls
|
||||
echo ___________________________________________________________________________________________
|
||||
echo:
|
||||
call :dk_color2 %_White% " " %Green% "%winos% is already permanently activated."
|
||||
call :dk_color2 %_White% " " %Gray% "Activation is not required."
|
||||
echo ___________________________________________________________________________________________
|
||||
if %_unattended%==1 goto dk_done
|
||||
echo:
|
||||
@ -864,17 +865,26 @@ 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 (
|
||||
%psc% "try { !tls! irm https://%%# -Method POST } catch { if ($_.Exception.Response -eq $null) { Write-Host """"[%%#] $($_.Exception.Message)"""" -ForegroundColor Red -BackgroundColor Black; exit 3 } }"
|
||||
if !errorlevel!==3 set resfail=1
|
||||
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!"
|
||||
)
|
||||
|
||||
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
|
||||
|
@ -363,6 +363,7 @@ cls
|
||||
echo ___________________________________________________________________________________________
|
||||
echo:
|
||||
call :dk_color2 %_White% " " %Green% "%winos% is already permanently activated."
|
||||
call :dk_color2 %_White% " " %Gray% "Activation is not required."
|
||||
echo ___________________________________________________________________________________________
|
||||
if %_unattended%==1 goto dk_done
|
||||
echo:
|
||||
@ -627,17 +628,26 @@ 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 (
|
||||
%psc% "try { !tls! irm https://%%# -Method POST } catch { if ($_.Exception.Response -eq $null) { Write-Host """"[%%#] $($_.Exception.Message)"""" -ForegroundColor Red -BackgroundColor Black; exit 3 } }"
|
||||
if !errorlevel!==3 set resfail=1
|
||||
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!"
|
||||
)
|
||||
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user