Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- rem Inteli-Ping by @DDoS_Filter
- Rem Paste this code into notepad and save it as Inteli-Ping.bat
- Rem Coded by DSTAT. Instagram: @DDoS_Filter
- Rem http://ddosfilter.net/
- mode con lines=12cols=30
- color 0A
- title Inteli-Ping by @DDoS_Filter
- setlocal ENABLEDELAYEDEXPANSION
- set /a replies=0
- set /a timeouts=0
- set /a packets_sent=0
- set responsetime=N/A
- set avgtime=N/A
- set min=N/A
- set max=N/A
- cls
- echo.
- echo Type an IP or URL to ping
- echo.
- set /p ip=Host:
- echo.
- set /p ipv6= IPv6? y/n:
- if '%ipv6%'=='y' (
- set tokens=5
- set searchstring=: time
- ) else (
- set tokens=7
- set searchstring=time
- )
- mode con lines=16 cols=30
- :ping
- set success=false
- for /F "tokens=%tokens% delims=<>= " %%i in ('ping -n 1 %ip% ^| find "%searchstring%"') do (
- set responsetime=%%i
- set responsetime=!responsetime:~0,-2!
- set success=true
- )
- set /a packets_sent=packets_sent + 1
- if %replies% EQU 0 if %success% EQU true if %replies% NEQ N/A set min=99999 & set max=0
- if %success% EQU false (
- set status=Host is offline
- set /a timeouts=timeouts + 1
- color 0C
- ) else (
- set status=Host is online
- set /a replies=replies + 1
- set /a totaltime=%totaltime% + %responsetime%
- set /a avgtime=totaltime / replies
- color 0A
- if %responsetime% LSS %min% (
- set min=%responsetime%
- )
- if %responsetime% GTR %max% (
- set max=%responsetime%
- )
- )
- set /a packet_loss=((packets_sent-timeouts)*100)/packets_sent
- cls
- echo Pinging %ip%
- echo.
- echo %status%^^!
- echo.
- echo Successful Replies: %replies%
- echo.
- echo Requests Timed Out: %timeouts%
- echo.
- echo Success Percentage: %packet_loss%
- echo.
- echo Avrg Response Time: %avgtime%ms
- echo.
- echo Last Response Time: %responsetime%ms
- echo.
- echo Min: %min%ms Max: %max%ms
- ping 127.0.0.1 -n 2 -w 1000 >nul
- goto ping
- Rem Coded by DSTAT. Instagram: @DDoS_Filter
- Rem http://ddosfilter.net/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement