Skip to content

Instantly share code, notes, and snippets.

@Josakko
Created January 20, 2026 00:10
Show Gist options
  • Select an option

  • Save Josakko/593150cb5b58cdf5b21e6a9e492ffe6a to your computer and use it in GitHub Desktop.

Select an option

Save Josakko/593150cb5b58cdf5b21e6a9e492ffe6a to your computer and use it in GitHub Desktop.
batch scripts for firewall (un)blocking executables recursively, useful with cracked software

Cracking helper scripts

Usage of firewall blocker/unblocker

  1. place in the desired directory

    • For example some autoCAD/license server directory
  2. Run as admin

Usage of the cleaner

  1. Read the guide in the script
  2. Run as admin
@echo off
@setlocal enableextensions
@cd /d "%~dp0"
echo "Blocking *all* executables in all subdirectories"
for /R %%f in (*.exe) do (
netsh advfirewall firewall add rule name="Blocked: %%f" dir=out program="%%f" action=block
netsh advfirewall firewall add rule name="Blocked: %%f" dir=in program="%%f" action=block
)
pause
@echo off
:: first the user shall uninstall everything through the control pannel and other uninstall helpers
:: 1. remove temp files from user's %temp%
:: 2. C:\ProgramData\FLEXnet (only folders starting with "adsk" must be deleted)
:: 3. delte the following directories
:: - C:\"Program Files"\Autodesk
:: - C:\"Program Files"\"Common Files"\"Autodesk Shared"
:: - C:\"Program Files (x86)"\Autodesk
:: - C:\"Program Files (x86)"\"Common Files"\"Autodesk Shared"
:: - C:\ProgramData\Autodesk
:: - %localappdata%\Autodesk
:: - %appdata%\Autodesk
::
:: 4. delete registry keys:
:: - Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk
:: - Computer\HKEY_CURRENT_USER\SOFTWARE\Autodesk
:: *Consider deleting any flexnet registry keys:
:: -
:: -
:: the user shall once again check if everything was uninstalled, especially Autodesk Genuine Service
@echo off
setlocal enabledelayedexpansion
echo.
echo =================================================================
echo == ROBUST UNBLOCKER - DELETING ALL "Blocked: " FIREWALL RULES ==
echo =================================================================
echo.
echo This script requires Administrator privileges to run.
echo It will find and delete ANY firewall rule whose name begins
echo with "Blocked: ".
echo.
pause
echo.
echo Searching for rules to delete...
echo.
for /f "tokens=1,*" %%a in ('netsh advfirewall firewall rule name^="Blocked: " show name^,program ^| findstr /I /C:"Rule Name"') do (
set "rulename=%%b"
echo Deleting rule: !rulename!
netsh advfirewall firewall delete rule name="!rulename!"
)
echo.
echo ==========================================================
echo == PROCESS COMPLETE ==
echo ==========================================================
echo.
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment