data loaded from external files (ip, hosts, modern app ...)
This commit is contained in:
parent
72b6720352
commit
57aefd5294
7 changed files with 174 additions and 14 deletions
27
cleanW10.ps1
27
cleanW10.ps1
|
@ -1,11 +1,6 @@
|
||||||
#requires -RunAsAdministrator
|
#requires -RunAsAdministrator
|
||||||
Import-Module NetSecurity #Useful to manipulate firewall rules
|
Import-Module NetSecurity #Useful to manipulate firewall rules
|
||||||
$shittyFeatures = ("Internet-Explorer-Optional-amd64", "FaxServicesClientPackage", "WindowsMediaPlayer", "MediaPlayback")
|
|
||||||
$shittyIP = ("2.22.61.43", "2.22.61.66", "65.39.117.230", "65.55.108.23", "23.218.212.69", "134.170.30.202", "137.116.81.24", "157.56.106.189", "204.79.197.200", "65.52.108.33", "64.4.54.254")
|
|
||||||
$shittyModernApp = ("messaging", "onenote", "sway", "edge", "3dbuilder", "windowscommunicationsapps", "windowscamera", "officehub", "skypeapp", "getstarted", "zunemusic", "windowsmaps", "solitairecollection", "bingfinance", "zunevideo", "bingnews", "onenote", "people", "windowsphone", "photos", "bingsports", "soundrecorder", "bingweather", "xboxapp", "twitter")
|
|
||||||
$shittyHosts = ("a-0001.a-msedge.net", "a-0002.a-msedge.net", "a-0003.a-msedge.net", "a-0004.a-msedge.net", "a-0005.a-msedge.net", "a-0006.a-msedge.net", "a-0007.a-msedge.net", "a-0008.a-msedge.net", "a-0009.a-msedge.net", "a-msedge.net", "a.ads1.msn.com", "a.ads2.msads.net","a.ads2.msn.com", "a.rad.msn.com", "ac3.msn.com", "ad.doubleclick.net", "adnexus.net", "adnxs.com", "ads.msn.com", "ads1.msads.net", "ads1.msn.com", "aidps.atdmt.com", "aka-cdn-ns.adtech.de", "az361816.vo.msecnd.net", "az512334.vo.msecnd.net", "b.ads1.msn.com", "b.ads2.msads.net", "b.rad.msn.com", "bs.serving-sys.com", "c.atdmt.com", "c.msn.com", "cdn.atdmt.com", "cds26.ams9.msecn.net", "choice.microsoft.com", "choice.microsoft.com.nsatc.net", "compatexchange.cloudapp.net", "corp.sts.microsoft.com", "corpext.msitadfs.glbdns2.microsoft.com", "cs1.wpc.v0cdn.net", "db3aqu.atdmt.com", "df.telemetry.microsoft.com", "diagnostics.support.microsoft.com", "ec.atdmt.com", "feedback.microsoft-hohm.com", "feedback.search.microsoft.com", "feedback.windows.com", "flex.msn.com", "g.msn.com", "h1.msn.com", "i1.services.social.microsoft.com", "i1.services.social.microsoft.com.nsatc.net", "lb1.www.ms.akadns.net", "live.rads.msn.com", "m.adnxs.com", "msedge.net", "msftncsi.com", "msnbot-65-55-108-23.search.msn.com", "msntest.serving-sys.com", "oca.telemetry.microsoft.com", "oca.telemetry.microsoft.com.nsatc.net", "pre.footprintpredict.com", "preview.msn.com", "rad.live.com", "rad.msn.com", "redir.metaservices.microsoft.com", "schemas.microsoft.akadns.net ", "secure.adnxs.com", "secure.flashtalking.com", "settings-sandbox.data.microsoft.com", "settings-win.data.microsoft.com", "sls.update.microsoft.com.akadns.net", "sqm.df.telemetry.microsoft.com", "sqm.telemetry.microsoft.com", "sqm.telemetry.microsoft.com.nsatc.net", "static.2mdn.net", "statsfe1.ws.microsoft.com", "statsfe2.ws.microsoft.com", "telecommand.telemetry.microsoft.com", "telecommand.telemetry.microsoft.com.nsatc.net", "telemetry.appex.bing.net", "telemetry.microsoft.com", "telemetry.urs.microsoft.com", "vortex-bn2.metron.live.com.nsatc.net", "vortex-cy2.metron.live.com.nsatc.net", "vortex-sandbox.data.microsoft.com", "vortex-win.data.microsoft.com", "vortex.data.microsoft.com", "watson.live.com", "www.msftncsi.com", "ssw.live.com", "reports.wes.df.telemetry.microsoft.com", "services.wes.df.telemetry.microsoft.com", "web.vortex.data.microsoft.com", "vortex-win.data.metron.live.com.nsatc.net", "v10.vortex-win.data.microsoft.com", "vortex-cy2.metron.live.com.nsatc.net", "vortex.data.glbdns2.microsoft.com", "vortex-win.data.microsoft.com", "vortex.data.microsoft.com", "fe2.update.microsoft.com.akadns.net", "s0.2mdn.net", "statsfe2.update.microsoft.com.akadns.net", "survey.watson.microsoft.com", "view.atdmt.com", "watson.microsoft.com", "watson.ppe.telemetry.microsoft.com", "watson.telemetry.microsoft.com", "watson.telemetry.microsoft.com.nsatc.net", "wes.df.telemetry.microsoft.com", "ui.skype.com","pricelist.skype.com", "apps.skype.com", "m.hotmail.com", "s.gateway.messenger.live.com")
|
|
||||||
$shittyServices = ("DiagTrack", "dmwappushsvc", "XblAuthManager", "XblGameSave", "XboxNetApiSvc")
|
|
||||||
$shittyTasks = ("Microsoft Compatibility Appraiser", "ProgramDataUpdater", "Consolidator", "KernelCeipTask", "UsbCeip")
|
|
||||||
$HOST_FILE = "$env:windir\System32\drivers\etc\hosts"
|
$HOST_FILE = "$env:windir\System32\drivers\etc\hosts"
|
||||||
$HOST_IP = "0.0.0.0"
|
$HOST_IP = "0.0.0.0"
|
||||||
$ErrorActionPreference = "SilentlyContinue"
|
$ErrorActionPreference = "SilentlyContinue"
|
||||||
|
@ -141,7 +136,7 @@ function disableModernShitty {
|
||||||
Write-Host -ForegroundColor Green " Done "
|
Write-Host -ForegroundColor Green " Done "
|
||||||
}
|
}
|
||||||
|
|
||||||
function disableShittyService ([string]$name){
|
function disable_ShittyService ([string]$name){
|
||||||
Write-Host -ForegroundColor White -NoNewline "Disable service $name :"
|
Write-Host -ForegroundColor White -NoNewline "Disable service $name :"
|
||||||
$serv = Get-Service -name $name
|
$serv = Get-Service -name $name
|
||||||
if ( !$serv) {
|
if ( !$serv) {
|
||||||
|
@ -162,17 +157,21 @@ Write-Output "I's time to kick ass and chew bubble gum"
|
||||||
Write-Output "________________________________________"
|
Write-Output "________________________________________"
|
||||||
write-Output ""
|
write-Output ""
|
||||||
|
|
||||||
$shittyFeatures | foreach { disableShitty $_ }
|
foreach ($line in Get-Content "lib\hosts.txt"){
|
||||||
$shittyServices | Foreach { disableShittyService $_ }
|
blockShittyHost $HOST_FILE $HOST_IP $line
|
||||||
$shittyModernApp | Foreach { disableModernShitty $_ }
|
}
|
||||||
$shittyHosts | Foreach { blockShittyHost $HOST_FILE $HOST_IP $_ }
|
|
||||||
remove_shittyTasks $shittyTasks
|
|
||||||
|
|
||||||
$shittyIP | Foreach {
|
foreach ($line in Get-Content "lib\ip.txt"){
|
||||||
New-NetFirewallRule -Name Blacklist_$_ -DisplayName "BlackList $_" -Protocol any -Enabled True -Profile Any -RemoteAddress $_ -Action Block | Out-Null
|
New-NetFirewallRule -Name Blacklist_$line -DisplayName "BlackList $line" -Protocol any -Enabled True -Profile Any -RemoteAddress $line -Action Block | Out-Null
|
||||||
Write-Output "Shitty IP $_ banned."
|
Write-Output "Shitty IP $_ banned."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($line in Get-Content "lib\features.txt"){
|
||||||
|
disableShitty $line
|
||||||
|
}
|
||||||
|
foreach ($line in Get-Content "lib\services.txt") { disableShittyService $line }
|
||||||
|
foreach ($line in Get-Content "lib\apps.txt") { disableModernShitty $line }
|
||||||
|
foreach ($line in Get-Content "lib\tasks.txt") {remove_shittyTasks $line }
|
||||||
|
|
||||||
# AllowTelemetry
|
# AllowTelemetry
|
||||||
modifyShittyRegValue "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" "AllowTelemetry" "0"
|
modifyShittyRegValue "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" "AllowTelemetry" "0"
|
||||||
|
|
25
lib/apps.txt
Normal file
25
lib/apps.txt
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
messaging
|
||||||
|
onenote
|
||||||
|
sway
|
||||||
|
edge
|
||||||
|
3dbuilder
|
||||||
|
windowscommunicationsapps
|
||||||
|
windowscamera
|
||||||
|
officehub
|
||||||
|
skypeapp
|
||||||
|
getstarted
|
||||||
|
zunemusic
|
||||||
|
windowsmaps
|
||||||
|
solitairecollection
|
||||||
|
bingfinance
|
||||||
|
zunevideo
|
||||||
|
bingnews
|
||||||
|
onenote
|
||||||
|
people
|
||||||
|
windowsphone
|
||||||
|
photos
|
||||||
|
bingsports
|
||||||
|
soundrecorder
|
||||||
|
bingweather
|
||||||
|
xboxapp
|
||||||
|
twitter
|
4
lib/features.txt
Normal file
4
lib/features.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Internet-Explorer-Optional-amd64"
|
||||||
|
FaxServicesClientPackage
|
||||||
|
WindowsMediaPlayer
|
||||||
|
MediaPlayback
|
111
lib/hosts.txt
Normal file
111
lib/hosts.txt
Normal file
|
@ -0,0 +1,111 @@
|
||||||
|
a-0001.a-msedge.net
|
||||||
|
a-0002.a-msedge.net
|
||||||
|
a-0003.a-msedge.net
|
||||||
|
a-0004.a-msedge.net
|
||||||
|
a-0005.a-msedge.net
|
||||||
|
a-0006.a-msedge.net
|
||||||
|
a-0007.a-msedge.net
|
||||||
|
a-0008.a-msedge.net
|
||||||
|
a-0009.a-msedge.net
|
||||||
|
a-msedge.net
|
||||||
|
a.ads1.msn.com
|
||||||
|
a.ads2.msads.net
|
||||||
|
a.ads2.msn.com
|
||||||
|
a.rad.msn.com
|
||||||
|
ac3.msn.com
|
||||||
|
ad.doubleclick.net
|
||||||
|
adnexus.net
|
||||||
|
adnxs.com
|
||||||
|
ads.msn.com
|
||||||
|
ads1.msads.net
|
||||||
|
ads1.msn.com
|
||||||
|
aidps.atdmt.com
|
||||||
|
aka-cdn-ns.adtech.de
|
||||||
|
apps.skype.com
|
||||||
|
az361816.vo.msecnd.net
|
||||||
|
az512334.vo.msecnd.net
|
||||||
|
b.ads1.msn.com
|
||||||
|
b.ads2.msads.net
|
||||||
|
b.rad.msn.com
|
||||||
|
bs.serving-sys.com
|
||||||
|
c.atdmt.com
|
||||||
|
c.msn.com
|
||||||
|
cdn.atdmt.com
|
||||||
|
cds26.ams9.msecn.net
|
||||||
|
choice.microsoft.com
|
||||||
|
choice.microsoft.com.nsatc.net
|
||||||
|
compatexchange.cloudapp.net
|
||||||
|
corp.sts.microsoft.com
|
||||||
|
corpext.msitadfs.glbdns2.microsoft.com
|
||||||
|
cs1.wpc.v0cdn.net
|
||||||
|
db3aqu.atdmt.com
|
||||||
|
df.telemetry.microsoft.com
|
||||||
|
diagnostics.support.microsoft.com
|
||||||
|
ec.atdmt.com
|
||||||
|
fe2.update.microsoft.com.akadns.net
|
||||||
|
feedback.microsoft-hohm.com
|
||||||
|
feedback.search.microsoft.com
|
||||||
|
feedback.windows.com
|
||||||
|
flex.msn.com
|
||||||
|
g.msn.com
|
||||||
|
h1.msn.com
|
||||||
|
i1.services.social.microsoft.com
|
||||||
|
i1.services.social.microsoft.com.nsatc.net
|
||||||
|
lb1.www.ms.akadns.net
|
||||||
|
live.rads.msn.com
|
||||||
|
m.adnxs.com
|
||||||
|
m.hotmail.com
|
||||||
|
msedge.net
|
||||||
|
msftncsi.com
|
||||||
|
msnbot-65-55-108-23.search.msn.com
|
||||||
|
msntest.serving-sys.com
|
||||||
|
oca.telemetry.microsoft.com
|
||||||
|
oca.telemetry.microsoft.com.nsatc.net
|
||||||
|
pre.footprintpredict.com
|
||||||
|
preview.msn.com
|
||||||
|
pricelist.skype.com
|
||||||
|
rad.live.com
|
||||||
|
rad.msn.com
|
||||||
|
redir.metaservices.microsoft.com
|
||||||
|
reports.wes.df.telemetry.microsoft.com
|
||||||
|
s.gateway.messenger.live.com)
|
||||||
|
s0.2mdn.net
|
||||||
|
schemas.microsoft.akadns.net
|
||||||
|
secure.adnxs.com
|
||||||
|
secure.flashtalking.com
|
||||||
|
services.wes.df.telemetry.microsoft.com
|
||||||
|
settings-sandbox.data.microsoft.com
|
||||||
|
settings-win.data.microsoft.com
|
||||||
|
sls.update.microsoft.com.akadns.net
|
||||||
|
sqm.df.telemetry.microsoft.com
|
||||||
|
sqm.telemetry.microsoft.com
|
||||||
|
sqm.telemetry.microsoft.com.nsatc.net
|
||||||
|
ssw.live.com
|
||||||
|
static.2mdn.net
|
||||||
|
statsfe1.ws.microsoft.com
|
||||||
|
statsfe2.update.microsoft.com.akadns.net
|
||||||
|
statsfe2.ws.microsoft.com
|
||||||
|
survey.watson.microsoft.com
|
||||||
|
telecommand.telemetry.microsoft.com
|
||||||
|
telecommand.telemetry.microsoft.com.nsatc.net
|
||||||
|
telemetry.appex.bing.net
|
||||||
|
telemetry.microsoft.com
|
||||||
|
telemetry.urs.microsoft.com
|
||||||
|
ui.skype.com
|
||||||
|
v10.vortex-win.data.microsoft.com
|
||||||
|
view.atdmt.com
|
||||||
|
vortex-bn2.metron.live.com.nsatc.net
|
||||||
|
vortex-cy2.metron.live.com.nsatc.net
|
||||||
|
vortex-sandbox.data.microsoft.com
|
||||||
|
vortex-win.data.metron.live.com.nsatc.net
|
||||||
|
vortex-win.data.microsoft.com
|
||||||
|
vortex.data.glbdns2.microsoft.com
|
||||||
|
vortex.data.microsoft.com
|
||||||
|
watson.live.com
|
||||||
|
watson.microsoft.com
|
||||||
|
watson.ppe.telemetry.microsoft.com
|
||||||
|
watson.telemetry.microsoft.com
|
||||||
|
watson.telemetry.microsoft.com.nsatc.net
|
||||||
|
web.vortex.data.microsoft.com
|
||||||
|
wes.df.telemetry.microsoft.com
|
||||||
|
www.msftncsi.com
|
11
lib/ip.txt
Normal file
11
lib/ip.txt
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
2.22.61.43
|
||||||
|
2.22.61.66
|
||||||
|
65.39.117.230
|
||||||
|
65.55.108.23
|
||||||
|
23.218.212.69
|
||||||
|
134.170.30.202
|
||||||
|
137.116.81.24
|
||||||
|
157.56.106.189
|
||||||
|
204.79.197.200
|
||||||
|
64.4.54.254
|
||||||
|
65.52.108.33
|
5
lib/services.txt
Normal file
5
lib/services.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
DiagTrack
|
||||||
|
dmwappushsvc
|
||||||
|
XblAuthManager
|
||||||
|
XblGameSave
|
||||||
|
XboxNetApiSvc
|
5
lib/tasks.txt
Normal file
5
lib/tasks.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Microsoft Compatibility Appraiser
|
||||||
|
ProgramDataUpdater
|
||||||
|
Consolidator
|
||||||
|
KernelCeipTask
|
||||||
|
UsbCeip
|
Reference in a new issue