tcp connection script

This commit is contained in:
Brad Ganley 2024-05-13 15:04:11 -05:00
parent e7a30f68b2
commit 6a9e572fe2

17
tcpcon.bat Normal file
View File

@ -0,0 +1,17 @@
@echo off
:loop
cls
echo Monitoring TCP Connections...
echo.
set /p option="Enter 'a' for all TCP connections or 'e' for established connections: "
if "%option%"=="a" (
netstat -an | findstr /c:"TCP" /c:"Active Connections"
) else if "%option%"=="e" (
netstat -an | findstr /c:"ESTABLISHED"
)else (
echo Invalid option. Please try again.
)
timeout /t 5 > nul
goto loop