Tracert In The Bat (ALLyeSNO)

用法:

程序默认检查5个跃点,以及使用当前目录的ip.txt文件为ip数据库
你也可以指定跃点数以及ip数据库文件名
tip
tip 跃点数 ip数据库(tip 30 iplog.txt)

rem Build and Test by ALLyeSNO in WIN2K&WINXP
@echo off
cls
echo Build and Test by ALLyeSNO in WIN2K^&WINXP
echo.
echo 程序默认检查5个跃点,以及使用当前目录的ip.txt文件为ip数据库
echo 你也可以指定跃点数以及ip数据库文件名
echo use1:tip
echo use2:tip 跃点数 ip数据库(tip 30 iplog.txt)
echo.
set notimedout=0
set skip=0
set numberip=1
set notimedout=0
set numberline=0
if "%2"=="" set ipfile=ip.txt&&goto yd
set ipfile=%2
if not exist %ipfile% echo 没有找到%ipfile%文件,测试中止&&goto endx
:yd
if not exist ip.txt echo 没有找到ip.txt文件,测试中止&&goto endx
if "%1"=="" set yd=5&&goto gogogo
set yd=%1
:gogogo
for /f %%a in (%ipfile%) do set/a numberline=numberline+1
if "%numberline%"=="0" echo ip数据库内没有可用ip&&goto endx
:freexploit
if "%notimedout%"=="1" goto nexttest
set numbertracert=1
echo 目前正在检测1个ip
for /f %%a in (%ipfile%) do set tempip=%%a&&goto allyesno
:nexttest
if "%numberip%"=="%numberline%" echo.&echo 本次测试没有发现任何ip有timed out的情况出现&goto endx
set/a numberip=numberip+1
echo.
echo 目前正在检测第%numberip%个ip
set numbertracert=1
set/a skip=skip+1
for /f "skip=%skip%" %%a in (%ipfile%) do set tempip=%%a&&goto allyesno
:allyesno
echo 正在测试%tempip%的第%numbertracert%个跃点,请稍候
tracert -d -h %numbertracert% %tempip%|find "timed out"&&echo.>>rp.txt&&echo %date% %time%在检测%tempip%的第%numbertracert%个跃点时出现了timed out的情况>>rp.txt&&tracert -d -h %numbertracert% %tempip%|find "timed out">>rp.txt&&goto end
if "%yd%"=="1" goto end
if "%numbertracert%"=="%yd%" set notimedout=1&goto freexploit
set/a numbertracert=numbertracert+1
goto allyesno
:end
echo.
if not exist rp.txt echo 本次测试没有发现任何ip有timed out的情况出现&goto endx
type rp.txt
:endx

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值