本帖最后由 vbgooder 于 2015-11-13 23:25 编辑
具体要求:自定义端口,可同时扫描多个端口,扫描出来的结果只保留IP然后以各个端口号命名。这是我现有的代码,但是只能是单端口,请大神们出手相助- @shift
- mode con cols=48 lines=20
- del ips.txt
- del source.txt
- del bad.txt
- del error.txt
- cls
- @echo off
- color 0a
- title ----------------------------------------
- echo.
- echo 请在IP.TXT里输入活跃的IP段。
- echo.
- echo.
- echo 请输入你想要扫描的标准ip段,(支持多段ip同時扫描)保存后按任意鍵开始扫描. >Ip.TXT
- start Ip.TXT
- pause>nul
- set /p Port=输入端口(例子1433 3389):
- for /f "eol= tokens=1,2 delims= " %%i in (Ip.TXT) do s.dll syn %%i %%j %Port% /save
- for /f "eol=- tokens=1 delims= " %%i in (result.txt) do echo %%i>>s1.txt
- for /f "eol=P tokens=1 delims= " %%i in (s1.txt) do echo %%i>>s2.txt
- for /f "eol=S tokens=1 delims= " %%i in (s2.txt) do echo %%i>>IPs.TXT
- del s1.txt
- del s2.txt
- del Result.txt
复制代码
|