本帖最后由 ivor 于 2012-2-9 19:25 编辑
回复 17# wh1234567 - @echo off
- set /p duankouhao=请输入端口号
- echo %duankouhao% | find "-" && goto :Proc
-
- for %%a in (%duankouhao%) do (
- set prefix%%a=.
- )
-
- for /f "tokens=1,2,3*" %%i in (Result.txt) do (
-
- if not defined %%i%%j if defined prefix%%j if "%%j" NEQ "" if "%%~xj" EQU "" (
- set %%i%%j=.
- set /a ivor%%j+=1
- echo %%i)>>%%j.txt
- )
-
- for /f "tokens=1,2delims==" %%a in ('set ivor') do (
- set var=%%a & set /a count+=1
- call echo %%var:~4%% 端口记录了总共 %%b 个
-
- )
- echo 总计有 %count%个端口号
- pause & exit
-
- :Proc
- for /f "tokens=1,2 delims=-" %%a in ("%duankouhao%") do (
- set min=%%a & set max=%%b
-
- )
-
-
- for /f "tokens=1,2,3*" %%i in (Result.txt) do (
-
- if not defined %%i%%j if %%j LEQ %max% if %%j GEQ %min% if "%%j" NEQ "" if "%%~xj" EQU "" (
- set %%i%%j=.
- set /a ivor%%j+=1
- echo %%i)>>%%j.txt
- )
-
- for /f "tokens=1,2delims==" %%a in ('set ivor') do (
- set var=%%a & set /a count+=1
- call echo %%var:~4%% 端口记录了总共 %%b 个
-
- )
- echo 总计有 %count%个端口号
- pause & exit
复制代码 支持范围选择,支持用(为空格、逗号、跳格或等号)分开端口号,支持过滤相同端口号重复IP
新功能不再提供,程序如果有BUG,可以反馈 |