sysconfig/portscan-windows.bat
2022-12-12 15:31:17 +08:00

12 lines
261 B
Batchfile

@ if not "" == "%1" (
set PORT=%1
) else (
echo === Enter [port] to scan:
set /p PORT=">>> "
echo;
)
netstat -aon |findstr %PORT%
@echo "tasklist |findstr [PID]": to find the process,
@echo "taskkill /T /F /PID [PID]": to kill the process.