echo off
color 01F
title IP Detector v1.1
cls
echo ==========================
echo =IP Detector v1.1        =
echo =Enhanced Networks, 2024 =
echo ==========================
echo.
echo.
echo Step1. Checking IP Address
echo.
echo.
curl -s https://northlakecity.com/IP.php > myip
set /p myip=<.\myip
if %errorlevel% NEQ 0 goto Error
echo Step2. Verifying Result
echo.
echo.
echo %myip% | findstr /G:.\comcast > nul && goto Comcast
echo %myip% | findstr /G:.\backup > nul && goto Backup
color 4f
echo ERROR: Your IP is not within the known value list.
echo Please report this error to your supervisor.
echo Your current IP is below, include this in your report.
echo %myip%
pause
del myip
exit

:comcast
echo You are on the Comcast Main Connection.
echo.
echo.
pause
del .\myip
exit

:backup
echo You are on the AT^&T Backup Connection.
echo.
echo.
pause
del .\myip
exit

:error
color 4f
echo ERROR: Your IP cannot be determined due to a command failure.
echo Please report this to your supervisor and include a picture
echo of this window. 
pause
exit