Skip to content

Instantly share code, notes, and snippets.

@IAmStoxe
Created December 30, 2018 04:46
Show Gist options
  • Save IAmStoxe/bf8dcad9cbb29595b4563213d72e5143 to your computer and use it in GitHub Desktop.
Save IAmStoxe/bf8dcad9cbb29595b4563213d72e5143 to your computer and use it in GitHub Desktop.
You can use a Simple Batch File. Open Notepad and copy/paste the script below into a blank document. Save the file as BLOCKALL.BAT. Now copy that file to the same directory as the EXEs you want to block and double click it. It will add outbound rules to advanced Windows Firewall settings blocking all EXEs in that folder and sub-folders as well. …
@ setlocal enableextensions
@ cd /d "%~dp0"
for /R %%a in (*.exe) do (
netsh advfirewall firewall add rule name="Blocked with Batchfile %%a" dir=out program="%%a" action=block
)
@MasterJubei
Copy link

Thanks man, this is very useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment