写一个扫描端口开放情况的bat
脚本
@echo off setlocal enabledelayedexpansion
set /p host=请输入要扫描的主机IP地址:
for /L %%i in (1,1,65535) do ( set "port=%%i" powershell -Command "Test-NetConnection -ComputerName %host% -Port !port! -InformationLevel Quiet" >nul 2>&1 && ( echo 端口 !port! 开放 ) || ( echo 端口 !port! 关闭 ) )
原文地址: http://www.cveoy.top/t/topic/CEp 著作权归作者所有。请勿转载和采集!