Compare commits
2 commits
9fddccdc62
...
d986ccb16d
Author | SHA1 | Date | |
---|---|---|---|
d986ccb16d | |||
4a715091b7 |
5 changed files with 233 additions and 3 deletions
31
cleanW10.ps1
31
cleanW10.ps1
|
@ -26,7 +26,6 @@ function BlockHost {
|
|||
[object]$params
|
||||
)
|
||||
if ( $params.ContainsKey('file') ) {
|
||||
|
||||
Foreach ($line in Get-Content $params.file ){ BlockHost -params @{host=$line} }
|
||||
}
|
||||
if ( $params.ContainsKey('host') -and $params.host -ne "" ) {
|
||||
|
@ -39,12 +38,38 @@ function BlockHost {
|
|||
Write-Host -ForegroundColor Yellow "already blocked "
|
||||
return
|
||||
}
|
||||
Write-Host -ForegroundColor Green "done"
|
||||
}
|
||||
catch {
|
||||
Write-Host -ForegroundColor Red "error"
|
||||
Write-Host -NoNewline -ForegroundColor Red "error`n`t"
|
||||
Write-Host -ForegroundColor DarkRed $Error[0].Exeption.Message
|
||||
return
|
||||
}
|
||||
Write-Host -ForegroundColor Green "done"
|
||||
if ( $params.ContainsKey('firewall') -and $params.firewall ) {
|
||||
BlockHostByIP $params.host
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host -ForegroundColor Red "`tError : No name or file for action $($MyInvocation.MyCommand.Name)"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function BlockHostByIP {
|
||||
param(
|
||||
[string]$hostname
|
||||
)
|
||||
$ip = [system.net.Dns]::GetHostAddresses($hostname)
|
||||
$rule = Get-NetFirewallAddressFilter | Where-Object { $_.RemoteAddress -eq $ip } -ErrorAction SilentlyContinue | Get-NetFirewallRule
|
||||
if ( $rule ) {
|
||||
write-host -ForegroundColor yellow "`t`tFW Rule exist : ($($rule.name))"
|
||||
}
|
||||
else {
|
||||
write-host -NoNewline -Foregroundcolor Green "`t`tFW block host.`n`t`t"
|
||||
FwBlockOutputIP @{
|
||||
ip=$ip,
|
||||
name=$hostname
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
16
modules.d/BlockHosts.conf
Normal file
16
modules.d/BlockHosts.conf
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"name" : "Block unwanted Host",
|
||||
"description" : "This module block some hosts from Microsoft",
|
||||
"actions" : [
|
||||
{
|
||||
"action" : "BlockHost",
|
||||
"file" : "base.txt",
|
||||
"host" : "",
|
||||
"firewall" : true
|
||||
},
|
||||
{
|
||||
"action" : "BlockHost",
|
||||
"file" : "ms-skype-messeger.txt"
|
||||
}
|
||||
]
|
||||
}
|
161
modules.d/BlockHosts/base.txt
Normal file
161
modules.d/BlockHosts/base.txt
Normal file
|
@ -0,0 +1,161 @@
|
|||
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.ads1.msn.com
|
||||
a.ads2.msn.com
|
||||
a1095.g2.akamai.net
|
||||
a23-193-236-70.deploy.static.akamaitechnologies.com
|
||||
a23-193-238-90.deploy.static.akamaitechnologies.com
|
||||
a23-210-48-42.deploy.static.akamaitechnologies.com
|
||||
a23-210-5-16.deploy.static.akamaitechnologies.com
|
||||
a23-210-63-75.deploy.static.akamaitechnologies.com
|
||||
a23-217-138-11.deploy.static.akamaitechnologies.com
|
||||
a23-217-138-122.deploy.static.akamaitechnologies.com
|
||||
a23-217-138-18.deploy.static.akamaitechnologies.com
|
||||
a23-217-138-25.deploy.static.akamaitechnologies.com
|
||||
a23-217-138-43.deploy.static.akamaitechnologies.com
|
||||
a23-217-138-90.deploy.static.akamaitechnologies.com
|
||||
a23-217-138-97.deploy.static.akamaitechnologies.com
|
||||
a23-218-212-69.deploy.static.akamaitechnologies.com
|
||||
a23-67-60-65.deploy.static.akamaitechnologies.com
|
||||
a23-67-60-73.deploy.static.akamaitechnologies.com
|
||||
a23-67-60-97.deploy.static.akamaitechnologies.com
|
||||
a23-9-123-27.deploy.static.akamaitechnologies.com
|
||||
a569.g.akamai.net
|
||||
activity.windows.com
|
||||
ad.doubleclick.net
|
||||
ads.msn.com
|
||||
ads.msn.com.nsatc.net
|
||||
ads1.msads.net
|
||||
ads1.msn.com
|
||||
appex.bing.com
|
||||
apprep.smartscreen.microsoft.com
|
||||
array201-prod.do.dsp.mp.microsoft.com
|
||||
array202-prod.do.dsp.mp.microsoft.com
|
||||
array203-prod.do.dsp.mp.microsoft.com
|
||||
array204-prod.do.dsp.mp.microsoft.com
|
||||
bingads.microsoft.com
|
||||
bn1303.settings.live.net
|
||||
c.microsoft.com
|
||||
c.s-microsoft.com
|
||||
c.urs.microsoft.com
|
||||
c1.microsoft.com
|
||||
cache.datamart.windows.com
|
||||
cdn.content.prod.cms.msn.com
|
||||
choice.microsoft.com
|
||||
choice.microsoft.com.nsatc.net
|
||||
co4.telecommand.telemetry.microsoft.com.akadns.net
|
||||
corp.sts.microsoft.com
|
||||
corpext.msitadfs.glbdns2.microsoft.com
|
||||
cp201-prod.do.dsp.mp.microsoft.com
|
||||
cs1.wpc.v0cdn.net
|
||||
db3aqu.atdmt.com
|
||||
df.telemetry.microsoft.com
|
||||
diagnostics.support.microsoft.akadns.net
|
||||
diagnostics.support.microsoft.com
|
||||
dl.delivery.mp.microsoft.com
|
||||
dns.msftncsi.com
|
||||
download-ssl.msgamestudios.com
|
||||
e2236.g.akamaiedge.net
|
||||
e7173.g.akamaiedge.net
|
||||
e8011.g.akamaiedge.net
|
||||
fe1.update.microsoft.com.akadns.net
|
||||
fe2.update.microsoft.com.akadns.net
|
||||
fe3.delivery.dsp.mp.microsoft.com.nsatc.net
|
||||
feedback.microsoft-hohm.com
|
||||
feedback.search.microsoft.com
|
||||
feedback.windows.com
|
||||
finances.services.appx.bing.com
|
||||
fr-fr.appx-rf.msn.com
|
||||
g.bing.com
|
||||
geo-prod.do.dsp.mp.microsoft.com
|
||||
geover-prod.do.dsp.mp.microsoft.com
|
||||
ieonline.microsoft.com
|
||||
ieonlinews.microsoft.com
|
||||
i1.services.social.microsoft.com
|
||||
i1.services.social.microsoft.com.nsatc.net
|
||||
Inprod.support.services.microsoft.com
|
||||
lb1.www.ms.akadns.net
|
||||
licensing.md.mp.microsoft.com
|
||||
mpd.mxptint.net
|
||||
msedge.net
|
||||
msnbot-207-46-194-33.search.msn.com
|
||||
msnbot-65-52-108-27.search.msn.com
|
||||
msnbot-65-52-108-29.search.msn.com
|
||||
msnbot-65-52-108-92.search.msn.com
|
||||
msnbot-65-52-108-94.search.msn.com
|
||||
msnbot-65-55-252-43.search.msn.com
|
||||
next-services.apps.microsoft.com
|
||||
nexus.officeapps.live.com
|
||||
nexusrules.officeapps.live.com
|
||||
oca.telemetry.microsoft.com
|
||||
ocos-office365-s2s.msedge.net
|
||||
ocsa.office.microsoft.com
|
||||
ocsp.usertrust.com
|
||||
odc.officeapps.live.com
|
||||
pre.footprintpredict.com
|
||||
preview.msn.com
|
||||
public-family.api.account.microsoft.com
|
||||
redir.metaservices.microsoft.com
|
||||
redir.metaservices.microsoft.com.edgesuite.net
|
||||
redirection.prod.cms.msn.com.akadns.net
|
||||
reports.wes.df.telemetry.microsoft.com
|
||||
roaming.officeapps.live.com
|
||||
rr.office.microsoft.com
|
||||
sc.iasds01.com
|
||||
schemas.microsoft.akadns.net
|
||||
services.wes.df.telemetry.microsoft.com
|
||||
settings-sandbox.data.glbdns2.microsoft.com
|
||||
settings-sandbox.data.microsoft.com
|
||||
settings.data.microsoft.com
|
||||
siWeb.microsoft.akadns.net
|
||||
sls.update.microsoft.com.akadns.net
|
||||
solitaireprod.maelstrom.xboxlive.com
|
||||
spynet2.microsoft.akadns.net
|
||||
spynetalt.microsoft.akadns.net
|
||||
spynetalt.microsoft.com
|
||||
spyneteurope.microsoft.akadns.net
|
||||
sqm.df.telemetry.microsoft.com
|
||||
sqm.telemetry.microsoft.com
|
||||
sqm.telemetry.microsoft.com.nsatc.net
|
||||
ssw.live.com
|
||||
ssw.live.com.nsatc.net
|
||||
statsfe1.update.microsoft.com.akadns.net
|
||||
statsfe1.ws.microsoft.com
|
||||
statsfe1.ws.microsoft.com.nsatc.net
|
||||
statsfe2.update.microsoft.com.akadns.net
|
||||
statsfe2.ws.microsoft.com
|
||||
statsfe2.ws.microsoft.com.nsatc.net
|
||||
storeedgefd.dsx.mp.microsoft.com
|
||||
support.msn.microsoft.akadns.net
|
||||
survey.watson.microsoft.com
|
||||
t.urs.microsoft.com.nsatc.net
|
||||
telecommand.telemetry.microsoft.com
|
||||
telemetry.appex.bing.net
|
||||
telemetry.appex.bing.net:443
|
||||
telemetry.appex.search.prod.ms.akadns.net
|
||||
telemetry.microsoft.com
|
||||
telemetry.urs.microsoft.com
|
||||
tunnel.cfw.trustedsource.org
|
||||
uci.officeapps.live.com
|
||||
updatekeepalive.mcafee.com
|
||||
urs.smartscreen.microsoft.com
|
||||
v10.vortex-win.data.microsoft.com
|
||||
vortex-sandbox.data.glbdns2.microsoft.com
|
||||
vortex-sandbox.data.microsoft.com
|
||||
vortex-win.data.microsoft.com
|
||||
vortex.data.microsoft.com
|
||||
watson.live.com
|
||||
watson.microsoft.com
|
||||
watson.ppe.telemetry.microsoft.com
|
||||
watson.telemetry.microsoft.com
|
||||
wes.df.telemetry.microsoft.com
|
||||
win10.ipv6.microsoft.com
|
||||
www.msftconnecttest.com
|
||||
www.msftncsi.com
|
2
modules.d/BlockHosts/mcafee.txt
Normal file
2
modules.d/BlockHosts/mcafee.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
su3.mcafee.com
|
||||
sm.mcafee.com
|
26
modules.d/BlockHosts/ms-skype-messenger.txt
Normal file
26
modules.d/BlockHosts/ms-skype-messenger.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
a.rad.msn.com
|
||||
ac3.msn.com
|
||||
apps.skype.com
|
||||
arc.msn.com
|
||||
az361816.vo.msecnd.net
|
||||
az512334.vo.msecnd.net
|
||||
b.rad.msn.com
|
||||
c.msn.com
|
||||
client-s.gateway.messenger.live.com
|
||||
client.wns.windows.com
|
||||
dub407-m.hotmail.com
|
||||
flex.msn.com
|
||||
g.msn.com
|
||||
h1.msn.com
|
||||
h2.msn.com
|
||||
live.rads.msn.com
|
||||
m.hotmail.com
|
||||
mscrl.microsoft.com
|
||||
msnbot-65-55-108-23.search.msn.com
|
||||
preview.msn.com
|
||||
rad.live.com
|
||||
rad.msn.com
|
||||
rpt.msn.com
|
||||
s.gateway.messenger.live.com
|
||||
otf.msn.com
|
||||
ui.skype.com
|
Reference in a new issue