From e2984a87775afb64c7e9d3a51e76dc55502483d3 Mon Sep 17 00:00:00 2001 From: Yorick Date: Fri, 6 Jan 2017 12:37:37 +0100 Subject: [PATCH] Done is no mode displayed when an host is aleardy bocked in block_shitty_host --- cleanW10.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cleanW10.ps1 b/cleanW10.ps1 index 821154b..7beb66c 100644 --- a/cleanW10.ps1 +++ b/cleanW10.ps1 @@ -15,7 +15,8 @@ function block_shitty_host { $ip + "`t`t" + $hostname | Out-File -encoding ASCII -append $filename } else { - Write-Host -NoNewline -ForegroundColor Yellow " Already blocked " + Write-Host -ForegroundColor Yellow " Already blocked " + return } } catch { @@ -175,7 +176,7 @@ Write-Output "I's time to kick ass and chew bubble gum" Write-Output "________________________________________" write-Output "" -#foreach ($line in Get-Content "lib\hosts.txt"){ block_shitty_host $HOST_FILE $HOST_IP $line } +foreach ($line in Get-Content "lib\hosts.txt"){ block_shitty_host $HOST_FILE $HOST_IP $line } foreach ($line in Get-Content "lib\ip.txt"){ block_shitty_ip $line } #foreach ($line in Get-Content "lib\features.txt"){ disable_shitty_feature $line } #foreach ($line in Get-Content "lib\services.txt") { disable_shitty_featureService $line }