window使用telnet.exe工具批量测试端口是否开放脚本
@echo off for /f "delims=\n" %%i in (F:\ip_list.txt) do ( echo %%i start telnet.exe %%i 443 tasklist|findstr /i "telnet.exe" if %ERRORLEVEL% == 0 (echo %%i >> result.txt taskkill /F /T /IM telnet.exe ) ) pause
@echo off for /f "delims=\n" %%i in (F:\ip_list.txt) do ( echo %%i start telnet.exe %%i 443 tasklist|findstr /i "telnet.exe" if %ERRORLEVEL% == 0 (echo %%i >> result.txt taskkill /F /T /IM telnet.exe ) ) pause