Advertisement
Guest User

InternetComponentChecker

a guest
Nov 25th, 2013
457
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. ::There's no Batch in pastebin, so here you go.
  2.  
  3. @echo off
  4. mode con: lines=15 cols=65
  5. color a
  6. title Internet Basic Connection Component Checker
  7. start getexternal.bat
  8. set dns=???
  9. set dnsstat=???
  10. set dnsaddress=???
  11. set router=???
  12. set routerstat=???
  13. set routeraddress=???
  14. set ipname=???
  15. set ip=???
  16. set iptype=AUTO_DYNAMIC
  17. set mainstat=ACTIVE
  18. :displaystats
  19. cls
  20. ::GUI
  21. echo INTERNET COMPONENT CHECKER
  22. echo Please do not delete this program. It is VITAL if
  23. echo you want to diagnose Faulty Internet Connection
  24. echo ===================================
  25. echo DNS : %dns%
  26. echo DNS STATUS : %dnsstat%
  27. echo DNS ADDRESS : %dnsaddress%
  28. echo ROUTER : %router%
  29. echo ROUTER STATUS : %routerstat%
  30. echo ROUTER ADDRESS : %routeraddress%
  31. echo IP : %ip%
  32. echo IP TYPE : %iptype%
  33. echo PWR : %mainstat%
  34. echo TIME UPDATED : %time%
  35. echo DATE UPDATED : %date%
  36. echo ====================================
  37. echo MADE BY BEN JUDE ROCAT
  38.  
  39. :dnsmain
  40. ping 8.8.8.8 >nul
  41. if errorlevel == 0 goto dnsset
  42. :dnsmain2
  43. ping google.com >nul
  44. if errorlevel == 1 goto dnsstatset
  45. set dnsstat=OK
  46. :dnsstatfinish
  47.  
  48. :routerfind
  49. for /f "delims=[] tokens=2" %%a in ('ping -4 %computername% -n 1 ^| findstr "["') do (set routeraddress=%%a)
  50. )
  51.  
  52. :routermain
  53. ping %routeraddress% >nul
  54. if errorlevel == 1 goto routerstatset
  55. set routerstat=OK
  56. :routerstatfinish
  57. :ipfind
  58. for /f "delims=[] tokens=2" %%a in ('ping -4 %computername% -n 1 ^| findstr "["') do (set ip=%%a)
  59. )
  60.  
  61. :FINISH_OPERATION
  62. set routeraddress=192.168.0.1
  63. set dnsaddress=8.8.8.8
  64. goto displaystats
  65.  
  66.  
  67. :dnsset
  68. set dns=GOOGLE PUBLIC 1
  69. goto dnsmain2
  70.  
  71. :dnsstatset
  72. set dnsstat=FAILURE
  73. goto dnsstatfinish
  74.  
  75. :routerstatset
  76. set routerstat=FAILURE
  77. goto routerstatfinish
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement