Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Steam
- $steamPath = "C:\Program Files (x86)\Steam\Steam.exe"
- New-NetFirewallRule -DisplayName "Steam_Outbound" -Direction Outbound -Program "C:\Program Files (x86)\Steam\Steam.exe" -Action Block > $null
- New-NetFirewallRule -DisplayName "Steam_Inbound" -Direction Inbound -Program "C:\Program Files (x86)\Steam\Steam.exe" -Action Block > $null
- # Battle.net
- $bnetPath = "C:\Program Files (x86)\Battle.net\Battle.net.exe", "C:\Program Files (x86)\Battle.net\Battle.net Launcher.exe"
- New-NetFirewallRule -DisplayName "Battle.net_Launcher_Outbound" -Direction Outbound -Program "C:\Program Files (x86)\Battle.net\Battle.net Launcher.exe" -Action Block > $null
- New-NetFirewallRule -DisplayName "Battle.net_Launcher_Inbound" -Direction Inbound -Program "C:\Program Files (x86)\Battle.net\Battle.net Launcher.exe" -Action Block > $null
- New-NetFirewallRule -DisplayName "Battle.net_Outbound" -Direction Outbound -Program "C:\Program Files (x86)\Battle.net\Battle.net.exe" -Action Block > $null
- New-NetFirewallRule -DisplayName "Battle.net_Inbound" -Direction Inbound -Program "C:\Program Files (x86)\Battle.net\Battle.net.exe" -Action Block > $null
- # NCsoft
- $ncsoftPath = "C:\Program Files (x86)\NCWest\NCLauncher\NCLauncher.exe"
- New-NetFirewallRule -DisplayName "NCSoft_Outbound" -Direction Outbound -Program "$ncsoftPath" -Action Block > $null
- New-NetFirewallRule -DisplayName "NCSoft_Inbound" -Direction Inbound -Program "$ncsoftPath" -Action Block > $null
- # UPlay
- $uplayPath = "C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\Uplay.exe", "C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\UplayService.exe", "C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\upc.exe"
- New-NetFirewallRule -DisplayName "UPlay_Outbound" -Direction Outbound -Program "$uplayPath" -Action Block > $null
- New-NetFirewallRule -DisplayName "UPlay_Inbound" -Direction Inbound -Program "$uplayPath" -Action Block > $null
- # League of Legends
- $lolPath = "C:\Riot Games\League of Legends\LeagueClient.exe", "C:\Riot Games\League of Legends\RADS\projects\league_client\releases\installer\deploy\LeagueClient.exe"
- New-NetFirewallRule -DisplayName "LoL_Outbound" -Direction Outbound -Program "$lolPath" -Action Block > $null
- New-NetFirewallRule -DisplayName "LoL_Inbound" -Direction Inbound -Program "$lolPath" -Action Block > $null
- #--- Blocking websites via hosts file
- [string]$hostsPath = "$env:windir/System32/drivers/etc/hosts"
- "# Steam" | Add-Content -PassThru $hostsPath
- "127.0.0.1 steampowered.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 help.steampowered.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 store.steampowered.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 steamcharts.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 steamcommunity.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 steam.tools" | Add-Content -PassThru $hostsPath
- "127.0.0.1 steam.design" | Add-Content -PassThru $hostsPath
- "127.0.0.1 steamdb.info" | Add-Content -PassThru $hostsPath
- "127.0.0.1 steamspy.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 valvesoftware.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 www.valvesoftware.com" | Add-Content -PassThru $hostsPath
- "" | Add-Content -PassThru $hostsPath
- "# Battle.net / Blizzard" | Add-Content -PassThru $hostsPath
- "127.0.0.1 blizzard.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 www.blizzard.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 battle.net" | Add-Content -PassThru $hostsPath
- "127.0.0.1 www.battle.net" | Add-Content -PassThru $hostsPath
- "127.0.0.1 worldofwarcraft.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 playhearthstone.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 starcraft.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 starcraft2.com" | Add-Content -PassThru $hostsPath
- "" | Add-Content -PassThru $hostsPath
- "# League of Legends" | Add-Content -PassThru $hostsPath
- "127.0.0.1 riotgames.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 www.riotgames.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 leagueoflegends.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 www.leagueoflegends.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 lolesports.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 www.lolesports.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 lolalytics.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 lolmath.net" | Add-Content -PassThru $hostsPath
- "127.0.0.1 lolking.net" | Add-Content -PassThru $hostsPath
- "127.0.0.1 www.lolking.net" | Add-Content -PassThru $hostsPath
- "127.0.0.1 wol.gg" | Add-Content -PassThru $hostsPath
- "127.0.0.1 lolcounter.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 www.lolcounter.com" | Add-Content -PassThru $hostsPath
- "" | Add-Content -PassThru $hostsPath
- "# NCSoft related" | Add-Content -PassThru $hostsPath
- "127.0.0.1 ncsoft.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 www.ncsoft.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 bladeandsoul.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 www.bladeandsoul.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 aiononline.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 www.aiononline.com" | Add-Content -PassThru $hostsPath
- "" | Add-Content -PassThru $hostsPath
- "# UPlay related" | Add-Content -PassThru $hostsPath
- "127.0.0.1 ubi.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 uplay.ubi.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 www.uplay.ubi.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 store.ubi.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 account.ubisoft.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 www.ubisoft.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 connect.ubi.com" | Add-Content -PassThru $hostsPath
- "" | Add-Content -PassThru $hostsPath
- "# Misc" | Add-Content -PassThru $hostsPath
- "127.0.0.1 www.humblebundle.com" | Add-Content -PassThru $hostsPath
- "127.0.0.1 humblebundle.com" | Add-Content -PassThru $hostsPath
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement