mirror of
https://github.com/massgravel/Microsoft-Activation-Scripts.git
synced 2025-06-29 21:16:16 +00:00
Evade AV detection
This commit is contained in:
parent
d7a6994363
commit
409c4f71ad
11 changed files with 96 additions and 95 deletions
|
@ -303,7 +303,7 @@ goto dk_done
|
|||
|
||||
::pstst $ExecutionContext.SessionState.LanguageMode :pstst
|
||||
|
||||
for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.file]::ReadAllText('!_batp!') -split ':pstst';iex ($f[1])}" %nul6%') do (set tstresult=%%a)
|
||||
for /f "delims=" %%a in ('%psc% "if ($PSVersionTable.PSEdition -ne 'Core') {$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':pstst';ie%blank%x ($f[1])}" %nul6%') do (set tstresult=%%a)
|
||||
|
||||
if /i not "%tstresult%"=="FullLanguage" (
|
||||
%eline%
|
||||
|
@ -671,7 +671,7 @@ echo Checking Internet Connection [Connected!ping_f!]
|
|||
if /i %_actmethod%==Auto if not %_actman%==1 set tsmethod=KMS4k
|
||||
if /i !tsmethod!==KMS4k (
|
||||
call :dk_color %Gray% "Checking Internet Connection [Not Connected]"
|
||||
call :dk_color %Blue% "Switching To KMS4k Activation Method because Internet is needed for StaticCID method."
|
||||
call :dk_color %Blue% "Switching To KMS4k method because Internet is needed for StaticCID method."
|
||||
) else (
|
||||
set error=1
|
||||
call :dk_color %Red% "Checking Internet Connection [Not Connected]"
|
||||
|
@ -743,7 +743,7 @@ if defined _vis goto :ts_winvista
|
|||
|
||||
set tempid=
|
||||
if /i %tsmethod%==KMS4k (set keytype=ks) else (set keytype=zero)
|
||||
for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do (
|
||||
for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wintsid\:.*';ie%blank%x ($f[1])" %nul6%') do (
|
||||
echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a)
|
||||
)
|
||||
|
||||
|
@ -1033,7 +1033,7 @@ goto :ts_esu
|
|||
)
|
||||
|
||||
set resetstuff=1
|
||||
%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';iex ($f[1])"
|
||||
%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';ie%blank%x ($f[1])"
|
||||
set resetstuff=
|
||||
if !errorlevel!==3 (
|
||||
set error=1
|
||||
|
@ -1508,10 +1508,10 @@ if %winbuild% GEQ 10586 (
|
|||
for %%# in ("%SysPath%\spp\tokens\skus\%tsedition%\*CSVLK*.xrm-ms") do (
|
||||
if defined _arr (set "_arr=!_arr!;"%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"") else (set "_arr="%SysPath%\spp\tokens\skus\%tsedition%\%%~nx#"")
|
||||
)
|
||||
if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'" %nul%
|
||||
if defined _arr %psc% "$sls = Get-WmiObject %sps%; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); InstallLicenseArr '!_arr!'" %nul%
|
||||
)
|
||||
|
||||
for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wintsid\:.*';iex ($f[1])" %nul6%') do (
|
||||
for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wintsid\:.*';ie%blank%x ($f[1])" %nul6%') do (
|
||||
echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set tempid=%%a)
|
||||
)
|
||||
|
||||
|
@ -1705,7 +1705,7 @@ echo Processing Reset of Rearm / Timers / Tamper / Lock...
|
|||
echo:
|
||||
|
||||
set resetstuff=1
|
||||
%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';iex ($f[1])"
|
||||
%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';ie%blank%x ($f[1])"
|
||||
|
||||
if %errorlevel%==3 (
|
||||
call :dk_color %Red% "Reset Failed."
|
||||
|
@ -1753,7 +1753,7 @@ if %errorlevel%==1 exit /b
|
|||
echo:
|
||||
echo Fetching Supported Activation IDs list. Please wait...
|
||||
|
||||
%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':listactids\:.*';iex ($f[1])"
|
||||
%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':listactids\:.*';ie%blank%x ($f[1])"
|
||||
if %errorlevel%==3 (
|
||||
call :dk_color %Gray% "No supported activation ID found, aborting..."
|
||||
goto :dk_done
|
||||
|
@ -1902,7 +1902,7 @@ echo Writing TrustedStore data...
|
|||
if /i %tsmethod%==StaticCID (echo Depositing Static Confirmation ID...) else (echo Depositing Zero Confirmation ID...)
|
||||
)
|
||||
echo:
|
||||
%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%"
|
||||
%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':tsforge\:.*';& ([ScriptBlock]::Create($f[1])) %tsids%"
|
||||
if !errorlevel!==3 (
|
||||
if %_actman%==0 (if not defined error call :dk_color %Blue% "%_fixmsg%")
|
||||
set fixes=%fixes% %mas%troubleshoot
|
||||
|
@ -2171,7 +2171,7 @@ echo !_License! | find /i "Retail" %nul% && (set keytype=zero) || (set keytype=k
|
|||
set keytype=zero
|
||||
)
|
||||
|
||||
for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':offtsid\:.*';iex ($f[1])" %nul6%') do (
|
||||
for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':offtsid\:.*';ie%blank%x ($f[1])" %nul6%') do (
|
||||
echo "%%a" | findstr /r ".*-.*-.*-.*-.*" %nul1% && (set tsids=!tsids! %%a& set _actid=%%a)
|
||||
)
|
||||
set "_allactid=!tsids!"
|
||||
|
@ -2292,7 +2292,7 @@ for %%# in ("!_oLPath!\%_License%*.xrm-ms") do (
|
|||
if defined _arr (set "_arr=!_arr!;"!_oLPath!\%%~nx#"") else (set "_arr="!_oLPath!\%%~nx#"")
|
||||
)
|
||||
|
||||
%psc% "$sls = Get-WmiObject %sps%; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul%
|
||||
%psc% "$sls = Get-WmiObject %sps%; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); InstallLicenseArr '!_arr!'; InstallLicenseFile '"!_oLPath!\pkeyconfig-office.xrm-ms"'" %nul%
|
||||
|
||||
call :dk_actids 0ff1ce15-a989-479d-af46-f275c6370663
|
||||
echo "!allapps!" | find /i "!_actid!" %nul1% || (
|
||||
|
@ -2497,8 +2497,8 @@ exit /b
|
|||
:oh_licrefresh
|
||||
|
||||
if exist "%SysPath%\spp\store_test\2.0\tokens.dat" (
|
||||
%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||
if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||
%psc% "Stop-Service sppsvc -force; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul%
|
||||
if !errorlevel! NEQ 0 %psc% "$sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul%
|
||||
)
|
||||
exit /b
|
||||
|
||||
|
@ -2653,7 +2653,7 @@ for /f "tokens=3 delims=." %%a in ('reg query "HKLM\SYSTEM\CurrentControlSet\Con
|
|||
if %_wmic% EQU 1 for /f "tokens=2 delims==" %%a in ('"wmic Path Win32_OperatingSystem Get OperatingSystemSKU /format:LIST" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a"
|
||||
if %_wmic% EQU 0 for /f "tokens=1" %%a in ('%psc% "([WMI]'Win32_OperatingSystem=@').OperatingSystemSKU" %nul6%') do if not errorlevel 1 set "wmiSKU=%%a"
|
||||
|
||||
if %winbuild% GEQ 15063 %psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':winsubstatus\:.*';iex ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && (
|
||||
if %winbuild% GEQ 15063 %psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':winsubstatus\:.*';ie%blank%x ($f[1])" %nul2% | find /i "Subscription_is_activated" %nul% && (
|
||||
if defined regSKU if defined slcSKU if not "%regSKU%"=="%slcSKU%" (
|
||||
set winsub=1
|
||||
set osSKU=%regSKU%
|
||||
|
@ -3081,7 +3081,7 @@ call :dk_color2 %Red% "Checking WinPE " %Blue% "[WinPE
|
|||
|
||||
set wpainfo=
|
||||
set wpaerror=
|
||||
for /f "delims=" %%a in ('%psc% "$f=[io.file]::ReadAllText('!_batp!') -split ':wpatest\:.*';iex ($f[1])" %nul6%') do (set wpainfo=%%a)
|
||||
for /f "delims=" %%a in ('%psc% "$f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':wpatest\:.*';ie%blank%x ($f[1])" %nul6%') do (set wpainfo=%%a)
|
||||
echo "%wpainfo%" | find /i "Error Found" %nul% && (
|
||||
set error=1
|
||||
set wpaerror=1
|
||||
|
@ -3271,7 +3271,7 @@ set showfix=1
|
|||
if not defined notwinact (
|
||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||
if not defined apps (
|
||||
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.file]::ReadAllText('!_batp!') -split ':xrm\:.*';iex ($f[1]); ReinstallLicenses" %nul%
|
||||
%psc% "if (-not $env:_vis) {Start-Job { Stop-Service %_slser% -force } | Wait-Job -Timeout 20 | Out-Null}; $sls = Get-WmiObject SoftwareLicensingService; $f=[io.f%blank%ile]::ReadA%blank%llText('!_batp!') -sp%blank%lit ':xrm\:.*';ie%blank%x ($f[1]); ReinstallLicenses" %nul%
|
||||
call :dk_actid 55c92734-d682-4d71-983e-d6ec3f16059f
|
||||
if not defined apps (
|
||||
set "_notfoundids=Key Not Installed / Act ID Not Found"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue