Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ::There's no Batch in pastebin, so here you go.
- @echo off
- mode con: lines=15 cols=65
- color a
- title Internet Basic Connection Component Checker
- start getexternal.bat
- set dns=???
- set dnsstat=???
- set dnsaddress=???
- set router=???
- set routerstat=???
- set routeraddress=???
- set ipname=???
- set ip=???
- set iptype=AUTO_DYNAMIC
- set mainstat=ACTIVE
- :displaystats
- cls
- ::GUI
- echo INTERNET COMPONENT CHECKER
- echo Please do not delete this program. It is VITAL if
- echo you want to diagnose Faulty Internet Connection
- echo ===================================
- echo DNS : %dns%
- echo DNS STATUS : %dnsstat%
- echo DNS ADDRESS : %dnsaddress%
- echo ROUTER : %router%
- echo ROUTER STATUS : %routerstat%
- echo ROUTER ADDRESS : %routeraddress%
- echo IP : %ip%
- echo IP TYPE : %iptype%
- echo PWR : %mainstat%
- echo TIME UPDATED : %time%
- echo DATE UPDATED : %date%
- echo ====================================
- echo MADE BY BEN JUDE ROCAT
- :dnsmain
- ping 8.8.8.8 >nul
- if errorlevel == 0 goto dnsset
- :dnsmain2
- ping google.com >nul
- if errorlevel == 1 goto dnsstatset
- set dnsstat=OK
- :dnsstatfinish
- :routerfind
- for /f "delims=[] tokens=2" %%a in ('ping -4 %computername% -n 1 ^| findstr "["') do (set routeraddress=%%a)
- )
- :routermain
- ping %routeraddress% >nul
- if errorlevel == 1 goto routerstatset
- set routerstat=OK
- :routerstatfinish
- :ipfind
- for /f "delims=[] tokens=2" %%a in ('ping -4 %computername% -n 1 ^| findstr "["') do (set ip=%%a)
- )
- :FINISH_OPERATION
- set routeraddress=192.168.0.1
- set dnsaddress=8.8.8.8
- goto displaystats
- :dnsset
- set dns=GOOGLE PUBLIC 1
- goto dnsmain2
- :dnsstatset
- set dnsstat=FAILURE
- goto dnsstatfinish
- :routerstatset
- set routerstat=FAILURE
- goto routerstatfinish
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement