Advertisement
Guest User

Untitled

a guest
Aug 6th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Steam
  2.     $steamPath = "C:\Program Files (x86)\Steam\Steam.exe"
  3.         New-NetFirewallRule -DisplayName "Steam_Outbound" -Direction Outbound -Program "C:\Program Files (x86)\Steam\Steam.exe" -Action Block > $null
  4.         New-NetFirewallRule -DisplayName "Steam_Inbound" -Direction Inbound -Program "C:\Program Files (x86)\Steam\Steam.exe" -Action Block > $null
  5.        
  6. # Battle.net
  7.     $bnetPath = "C:\Program Files (x86)\Battle.net\Battle.net.exe", "C:\Program Files (x86)\Battle.net\Battle.net Launcher.exe"
  8.         New-NetFirewallRule -DisplayName "Battle.net_Launcher_Outbound" -Direction Outbound -Program "C:\Program Files (x86)\Battle.net\Battle.net Launcher.exe" -Action Block > $null
  9.         New-NetFirewallRule -DisplayName "Battle.net_Launcher_Inbound" -Direction Inbound -Program "C:\Program Files (x86)\Battle.net\Battle.net Launcher.exe" -Action Block > $null
  10.         New-NetFirewallRule -DisplayName "Battle.net_Outbound" -Direction Outbound -Program "C:\Program Files (x86)\Battle.net\Battle.net.exe" -Action Block > $null
  11.         New-NetFirewallRule -DisplayName "Battle.net_Inbound" -Direction Inbound -Program "C:\Program Files (x86)\Battle.net\Battle.net.exe" -Action Block > $null
  12.        
  13. # NCsoft
  14.     $ncsoftPath = "C:\Program Files (x86)\NCWest\NCLauncher\NCLauncher.exe"
  15.         New-NetFirewallRule -DisplayName "NCSoft_Outbound" -Direction Outbound -Program "$ncsoftPath" -Action Block > $null
  16.         New-NetFirewallRule -DisplayName "NCSoft_Inbound" -Direction Inbound -Program "$ncsoftPath" -Action Block > $null
  17.        
  18. # UPlay
  19.     $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"
  20.         New-NetFirewallRule -DisplayName "UPlay_Outbound" -Direction Outbound -Program "$uplayPath" -Action Block > $null
  21.         New-NetFirewallRule -DisplayName "UPlay_Inbound" -Direction Inbound -Program "$uplayPath" -Action Block > $null
  22.        
  23. # League of Legends
  24.     $lolPath = "C:\Riot Games\League of Legends\LeagueClient.exe", "C:\Riot Games\League of Legends\RADS\projects\league_client\releases\installer\deploy\LeagueClient.exe"
  25.         New-NetFirewallRule -DisplayName "LoL_Outbound" -Direction Outbound -Program "$lolPath" -Action Block > $null
  26.         New-NetFirewallRule -DisplayName "LoL_Inbound" -Direction Inbound -Program "$lolPath" -Action Block > $null
  27.  
  28. #--- Blocking websites via hosts file
  29. [string]$hostsPath = "$env:windir/System32/drivers/etc/hosts"
  30.        
  31.     "# Steam" | Add-Content -PassThru $hostsPath
  32.     "127.0.0.1 steampowered.com" | Add-Content -PassThru $hostsPath
  33.     "127.0.0.1 help.steampowered.com" | Add-Content -PassThru $hostsPath
  34.     "127.0.0.1 store.steampowered.com" | Add-Content -PassThru $hostsPath
  35.     "127.0.0.1 steamcharts.com" | Add-Content -PassThru $hostsPath
  36.     "127.0.0.1 steamcommunity.com" | Add-Content -PassThru $hostsPath
  37.     "127.0.0.1 steam.tools" | Add-Content -PassThru $hostsPath
  38.     "127.0.0.1 steam.design" | Add-Content -PassThru $hostsPath
  39.     "127.0.0.1 steamdb.info" | Add-Content -PassThru $hostsPath
  40.     "127.0.0.1 steamspy.com" | Add-Content -PassThru $hostsPath
  41.     "127.0.0.1 valvesoftware.com" | Add-Content -PassThru $hostsPath
  42.     "127.0.0.1 www.valvesoftware.com" | Add-Content -PassThru $hostsPath
  43.     "" | Add-Content -PassThru $hostsPath
  44.     "# Battle.net / Blizzard" | Add-Content -PassThru $hostsPath
  45.     "127.0.0.1 blizzard.com" | Add-Content -PassThru $hostsPath
  46.     "127.0.0.1 www.blizzard.com" | Add-Content -PassThru $hostsPath
  47.     "127.0.0.1 battle.net" | Add-Content -PassThru $hostsPath
  48.     "127.0.0.1 www.battle.net" | Add-Content -PassThru $hostsPath
  49.     "127.0.0.1 worldofwarcraft.com" | Add-Content -PassThru $hostsPath
  50.     "127.0.0.1 playhearthstone.com" | Add-Content -PassThru $hostsPath
  51.     "127.0.0.1 starcraft.com" | Add-Content -PassThru $hostsPath
  52.     "127.0.0.1 starcraft2.com" | Add-Content -PassThru $hostsPath
  53.     "" | Add-Content -PassThru $hostsPath
  54.     "# League of Legends" | Add-Content -PassThru $hostsPath
  55.     "127.0.0.1 riotgames.com" | Add-Content -PassThru $hostsPath
  56.     "127.0.0.1 www.riotgames.com" | Add-Content -PassThru $hostsPath
  57.     "127.0.0.1 leagueoflegends.com" | Add-Content -PassThru $hostsPath
  58.     "127.0.0.1 www.leagueoflegends.com" | Add-Content -PassThru $hostsPath
  59.     "127.0.0.1 lolesports.com" | Add-Content -PassThru $hostsPath
  60.     "127.0.0.1 www.lolesports.com" | Add-Content -PassThru $hostsPath
  61.     "127.0.0.1 lolalytics.com" | Add-Content -PassThru $hostsPath
  62.     "127.0.0.1 lolmath.net" | Add-Content -PassThru $hostsPath
  63.     "127.0.0.1 lolking.net" | Add-Content -PassThru $hostsPath
  64.     "127.0.0.1 www.lolking.net" | Add-Content -PassThru $hostsPath
  65.     "127.0.0.1 wol.gg" | Add-Content -PassThru $hostsPath
  66.     "127.0.0.1 lolcounter.com" | Add-Content -PassThru $hostsPath
  67.     "127.0.0.1 www.lolcounter.com" | Add-Content -PassThru $hostsPath
  68.     "" | Add-Content -PassThru $hostsPath
  69.     "# NCSoft related" | Add-Content -PassThru $hostsPath
  70.     "127.0.0.1 ncsoft.com" | Add-Content -PassThru $hostsPath
  71.     "127.0.0.1 www.ncsoft.com" | Add-Content -PassThru $hostsPath
  72.     "127.0.0.1 bladeandsoul.com" | Add-Content -PassThru $hostsPath
  73.     "127.0.0.1 www.bladeandsoul.com" | Add-Content -PassThru $hostsPath
  74.     "127.0.0.1 aiononline.com" | Add-Content -PassThru $hostsPath
  75.     "127.0.0.1 www.aiononline.com" | Add-Content -PassThru $hostsPath
  76.     "" | Add-Content -PassThru $hostsPath
  77.     "# UPlay related" | Add-Content -PassThru $hostsPath
  78.     "127.0.0.1 ubi.com" | Add-Content -PassThru $hostsPath
  79.     "127.0.0.1 uplay.ubi.com" | Add-Content -PassThru $hostsPath
  80.     "127.0.0.1 www.uplay.ubi.com" | Add-Content -PassThru $hostsPath
  81.     "127.0.0.1 store.ubi.com" | Add-Content -PassThru $hostsPath
  82.     "127.0.0.1 account.ubisoft.com" | Add-Content -PassThru $hostsPath
  83.     "127.0.0.1 www.ubisoft.com" | Add-Content -PassThru $hostsPath
  84.     "127.0.0.1 connect.ubi.com" | Add-Content -PassThru $hostsPath
  85.     "" | Add-Content -PassThru $hostsPath
  86.     "# Misc" | Add-Content -PassThru $hostsPath
  87.     "127.0.0.1 www.humblebundle.com" | Add-Content -PassThru $hostsPath
  88.     "127.0.0.1 humblebundle.com" | Add-Content -PassThru $hostsPath
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement