Browse Source

Extended harmful tweakers list checks

master
Dmitry Nefedov 10 months ago
parent
commit
131bac3f98
  1. 23
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  2. 23
      src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1
  3. 23
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  4. 23
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  5. 23
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  6. 23
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

23
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -296,15 +296,24 @@ public static string GetString(uint strId)
}
}
# Check whether this is a Flibustier custom Windows image
if (Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)
# Check whether Windows was broken by 3rd party harmful tweakers and trojans
$Tweakers = @{
# https://forum.ru-board.com/topic.cgi?forum=62&topic=30617&start=1600#14
AutoSettingsPS = "$(Get-Item -Path `"HKLM:\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths`" | Where-Object -FilterScript {$_.Property -match `"AutoSettingsPS`"})"
# Flibustier custom Windows image
Flibustier = "$(Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)"
}
foreach ($Tweaker in $Tweakers.Keys)
{
Write-Warning -Message ($Localization.TweakerWarning -f "flblauncher")
if ($Tweakers[$Tweaker])
{
Write-Warning -Message ($Localization.TweakerWarning -f $Tweaker)
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
exit
exit
}
}
# Check whether Get-WindowsEdition cmdlet is working
@ -659,6 +668,7 @@ public static string GetString(uint strId)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Remove IP addresses from hosts file that block Microsoft recourses added by WindowsSpyBlocker
# https://github.com/crazy-max/WindowsSpyBlocker
@ -742,6 +752,7 @@ public static string GetString(uint strId)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Check whether hosts contains any of string from $IPArray array
if ((Get-Content -Path "$env:SystemRoot\System32\drivers\etc\hosts" -Encoding Default -Force | ForEach-Object -Process {$_.Trim()} | ForEach-Object -Process {

23
src/Sophia_Script_for_Windows_10_LTSC_2019/Module/Sophia.psm1

@ -207,15 +207,24 @@ public static string GetString(uint strId)
}
}
# Check whether this is a Flibustier custom Windows image
if (Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)
# Check whether Windows was broken by 3rd party harmful tweakers and trojans
$Tweakers = @{
# https://forum.ru-board.com/topic.cgi?forum=62&topic=30617&start=1600#14
AutoSettingsPS = "$(Get-Item -Path `"HKLM:\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths`" | Where-Object -FilterScript {$_.Property -match `"AutoSettingsPS`"})"
# Flibustier custom Windows image
Flibustier = "$(Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)"
}
foreach ($Tweaker in $Tweakers.Keys)
{
Write-Warning -Message ($Localization.TweakerWarning -f "flblauncher")
if ($Tweakers[$Tweaker])
{
Write-Warning -Message ($Localization.TweakerWarning -f $Tweaker)
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
exit
exit
}
}
# Check whether Get-WindowsEdition cmdlet is working
@ -544,6 +553,7 @@ public static string GetString(uint strId)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Remove IP addresses from hosts file that block Microsoft recourses added by WindowsSpyBlocker
# https://github.com/crazy-max/WindowsSpyBlocker
@ -627,6 +637,7 @@ public static string GetString(uint strId)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Check whether hosts contains any of string from $IPArray array
if ((Get-Content -Path "$env:SystemRoot\System32\drivers\etc\hosts" -Encoding Default -Force | ForEach-Object -Process {$_.Trim()} | ForEach-Object -Process {

23
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -207,15 +207,24 @@ public static string GetString(uint strId)
}
}
# Check whether this is a Flibustier custom Windows image
if (Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)
# Check whether Windows was broken by 3rd party harmful tweakers and trojans
$Tweakers = @{
# https://forum.ru-board.com/topic.cgi?forum=62&topic=30617&start=1600#14
AutoSettingsPS = "$(Get-Item -Path `"HKLM:\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths`" | Where-Object -FilterScript {$_.Property -match `"AutoSettingsPS`"})"
# Flibustier custom Windows image
Flibustier = "$(Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)"
}
foreach ($Tweaker in $Tweakers.Keys)
{
Write-Warning -Message ($Localization.TweakerWarning -f "flblauncher")
if ($Tweakers[$Tweaker])
{
Write-Warning -Message ($Localization.TweakerWarning -f $Tweaker)
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
exit
exit
}
}
# Check whether Get-WindowsEdition cmdlet is working
@ -544,6 +553,7 @@ public static string GetString(uint strId)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Remove IP addresses from hosts file that block Microsoft recourses added by WindowsSpyBlocker
# https://github.com/crazy-max/WindowsSpyBlocker
@ -627,6 +637,7 @@ public static string GetString(uint strId)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Check whether hosts contains any of string from $IPArray array
if ((Get-Content -Path "$env:SystemRoot\System32\drivers\etc\hosts" -Encoding Default -Force | ForEach-Object -Process {$_.Trim()} | ForEach-Object -Process {

23
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -292,15 +292,24 @@ public static string GetString(uint strId)
}
}
# Check whether this is a Flibustier custom Windows image
if (Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)
# Check whether Windows was broken by 3rd party harmful tweakers and trojans
$Tweakers = @{
# https://forum.ru-board.com/topic.cgi?forum=62&topic=30617&start=1600#14
AutoSettingsPS = "$(Get-Item -Path `"HKLM:\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths`" | Where-Object -FilterScript {$_.Property -match `"AutoSettingsPS`"})"
# Flibustier custom Windows image
Flibustier = "$(Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)"
}
foreach ($Tweaker in $Tweakers.Keys)
{
Write-Warning -Message ($Localization.TweakerWarning -f "flblauncher")
if ($Tweakers[$Tweaker])
{
Write-Warning -Message ($Localization.TweakerWarning -f $Tweaker)
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
exit
exit
}
}
# Check whether Get-WindowsEdition cmdlet is working
@ -660,6 +669,7 @@ public static string GetString(uint strId)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Remove IP addresses from hosts file that block Microsoft recourses added by WindowsSpyBlocker
# https://github.com/crazy-max/WindowsSpyBlocker
@ -743,6 +753,7 @@ public static string GetString(uint strId)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Check whether hosts contains any of string from $IPArray array
if ((Get-Content -Path "$env:SystemRoot\System32\drivers\etc\hosts" -Encoding Default -Force | ForEach-Object -Process {$_.Trim()} | ForEach-Object -Process {

23
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -284,15 +284,24 @@ public static string GetString(uint strId)
}
}
# Check whether this is a Flibustier custom Windows image
if (Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)
# Check whether Windows was broken by 3rd party harmful tweakers and trojans
$Tweakers = @{
# https://forum.ru-board.com/topic.cgi?forum=62&topic=30617&start=1600#14
AutoSettingsPS = "$(Get-Item -Path `"HKLM:\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths`" | Where-Object -FilterScript {$_.Property -match `"AutoSettingsPS`"})"
# Flibustier custom Windows image
Flibustier = "$(Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)"
}
foreach ($Tweaker in $Tweakers.Keys)
{
Write-Warning -Message ($Localization.TweakerWarning -f "flblauncher")
if ($Tweakers[$Tweaker])
{
Write-Warning -Message ($Localization.TweakerWarning -f $Tweaker)
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
exit
exit
}
}
# Check whether Get-WindowsEdition cmdlet is working
@ -649,6 +658,7 @@ public static string GetString(uint strId)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Remove IP addresses from hosts file that block Microsoft recourses added by WindowsSpyBlocker
# https://github.com/crazy-max/WindowsSpyBlocker
@ -732,6 +742,7 @@ public static string GetString(uint strId)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Check whether hosts contains any of string from $IPArray array
if ((Get-Content -Path "$env:SystemRoot\System32\drivers\etc\hosts" -Encoding Default -Force | ForEach-Object -Process {$_.Trim()} | ForEach-Object -Process {

23
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -280,15 +280,24 @@ public static string GetString(uint strId)
}
}
# Check whether this is a Flibustier custom Windows image
if (Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)
# Check whether Windows was broken by 3rd party harmful tweakers and trojans
$Tweakers = @{
# https://forum.ru-board.com/topic.cgi?forum=62&topic=30617&start=1600#14
AutoSettingsPS = "$(Get-Item -Path `"HKLM:\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths`" | Where-Object -FilterScript {$_.Property -match `"AutoSettingsPS`"})"
# Flibustier custom Windows image
Flibustier = "$(Get-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance -Name *flibustier)"
}
foreach ($Tweaker in $Tweakers.Keys)
{
Write-Warning -Message ($Localization.TweakerWarning -f "flblauncher")
if ($Tweakers[$Tweaker])
{
Write-Warning -Message ($Localization.TweakerWarning -f $Tweaker)
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
Start-Process -FilePath "https://t.me/sophia_chat"
Start-Process -FilePath "https://discord.gg/sSryhaEv79"
exit
exit
}
}
# Check whether Get-WindowsEdition cmdlet is working
@ -650,6 +659,7 @@ public static string GetString(uint strId)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Remove IP addresses from hosts file that block Microsoft recourses added by WindowsSpyBlocker
# https://github.com/crazy-max/WindowsSpyBlocker
@ -733,6 +743,7 @@ public static string GetString(uint strId)
Write-Information -MessageData "" -InformationAction Continue
# Extract the localized "Please wait..." string from shell32.dll
Write-Verbose -Message ([WinAPI.GetStr]::GetString(12612)) -Verbose
Write-Information -MessageData "" -InformationAction Continue
# Check whether hosts contains any of string from $IPArray array
if ((Get-Content -Path "$env:SystemRoot\System32\drivers\etc\hosts" -Encoding Default -Force | ForEach-Object -Process {$_.Trim()} | ForEach-Object -Process {

Loading…
Cancel
Save