Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

Simple Internet Connection Checker

Sometimes people have DNS issues where they don't really know if they're connected to the internet or not; and I wrote this purely out of boredom in two minutes.

Code
@echo off
title Check Internet Status
:A
ping google.com -l 100 -n 1 >nul
if "%errorlevel%"=="0" (
goto chkS ) ELSE (
color 0c
echo Internet Connection: Non-Existent.
timeout /nobreak /t 1 >nul
cls
goto A)
:chkS
cls
color 0a
echo Internet Connection: Existent!
pause
I'm also bored. Here's my version:
Code
@echo off
color a
::simple code that tries to determine the connection state by pinging a reliable domain like Google.
set mode=does not exist
title Simple Connection Checker
echo Determining Internet connection state...
ping www.google.com -n 5 >nul
if "%errorlevel%"=="0" set mode=exists
title Simple Connection Checker: Internet connection %mode%
pause
Or just open cmd and type ping google.com
[Image: AO23sFn.png]
(Feb 11, 2016 11:26 AM)SavageAF Wrote:  Or just open cmd and type ping google.com
or ping www.facebook.com 😝
Here is my version I wrote last year some time.
https://hackforums.net/showthread.php?tid=4479308


I actually recently rewrote this in java to make it work better/easier.
This isn't batch so I'm hiding it here (Click to View)
There's no place like ~/


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by E V OJan 8, 2019 11:08 AM 5 127 Jan 8, 2019 11:08 AM
Last Post: FriendZone
[.NET] by zetustigerJun 25, 2014 11:45 AM 18 453 Jun 25, 2014 11:45 AM
Last Post: zetustiger
[.NET] by XaMinGXMar 7, 2014 09:00 AM 1 591 Mar 7, 2014 09:00 AM
Last Post: LethalNET