Advertisement
DSTAT

Inteli-Ping

Jul 18th, 2021 (edited)
2,451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.83 KB | None | 0 0
  1. @echo off
  2. rem Inteli-Ping by @DDoS_Filter
  3. Rem Paste this code into notepad and save it as Inteli-Ping.bat
  4. Rem Coded by DSTAT. Instagram: @DDoS_Filter
  5. Rem http://ddosfilter.net/
  6. mode con lines=12cols=30
  7. color 0A
  8. title Inteli-Ping by @DDoS_Filter
  9. setlocal ENABLEDELAYEDEXPANSION
  10. set /a replies=0
  11. set /a timeouts=0
  12. set /a packets_sent=0
  13. set responsetime=N/A
  14. set avgtime=N/A
  15. set min=N/A
  16. set max=N/A
  17. cls
  18. echo.
  19. echo   Type an IP or URL to ping
  20. echo.
  21. set /p ip=Host:
  22. echo.
  23. set /p ipv6= IPv6? y/n:
  24. if '%ipv6%'=='y' (
  25.     set tokens=5
  26.     set searchstring=: time
  27. ) else (
  28.     set tokens=7
  29.     set searchstring=time
  30. )
  31. mode con lines=16 cols=30
  32. :ping
  33. set success=false
  34. for /F "tokens=%tokens% delims=<>= " %%i in ('ping -n 1 %ip% ^| find "%searchstring%"') do (
  35.     set responsetime=%%i
  36.     set responsetime=!responsetime:~0,-2!
  37.     set success=true
  38. )
  39. set /a packets_sent=packets_sent + 1
  40. if %replies% EQU 0 if %success% EQU true if %replies% NEQ N/A set min=99999 & set max=0
  41. if %success% EQU false (
  42.     set status=Host is offline
  43.     set /a timeouts=timeouts + 1
  44.     color 0C
  45. ) else (
  46.     set status=Host is online
  47.     set /a replies=replies + 1
  48.     set /a totaltime=%totaltime% + %responsetime%
  49.     set /a avgtime=totaltime / replies
  50.     color 0A
  51.     if %responsetime% LSS %min% (
  52.         set min=%responsetime%
  53.     )
  54.     if %responsetime% GTR %max% (
  55.         set max=%responsetime%
  56.     )
  57. )
  58. set /a packet_loss=((packets_sent-timeouts)*100)/packets_sent
  59. cls
  60. echo Pinging %ip%
  61. echo.
  62. echo  %status%^^!
  63. echo.
  64. echo  Successful Replies: %replies%
  65. echo.
  66. echo  Requests Timed Out: %timeouts%
  67. echo.
  68. echo  Success Percentage: %packet_loss%
  69. echo.
  70. echo  Avrg Response Time: %avgtime%ms
  71. echo.
  72. echo  Last Response Time: %responsetime%ms
  73. echo.
  74. echo  Min: %min%ms  Max: %max%ms
  75. ping 127.0.0.1 -n 2 -w 1000 >nul
  76. goto ping
  77. Rem Coded by DSTAT. Instagram: @DDoS_Filter
  78. Rem http://ddosfilter.net/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement