Skip to content

Instantly share code, notes, and snippets.

@H3XDaemon
Last active November 5, 2023 05:10
Show Gist options
  • Save H3XDaemon/17724dc9e095b918ba6e2d313c025751 to your computer and use it in GitHub Desktop.
Save H3XDaemon/17724dc9e095b918ba6e2d313c025751 to your computer and use it in GitHub Desktop.
Simple scripts for Windows bypass mobile network carrier hotspot restrictions
@echo off
cls
REM Define the options
setlocal enabledelayedexpansion
set i=0
for %%a in ("Display IPv4 Protocol Configuration" "Display IPv6 Protocol Configuration" "Set IPv4 and IPv6 Packet TTL to 65" "Custom IPv4 and IPv6 Packet TTL" "Reset IPv4 and IPv6 Packet TTL" "Exit") do (
set /a i+=1
set "option[!i!]=%%~a"
)
:menu
cls
echo.
echo =====================================
echo Tethering Limit Bypass
echo =====================================
echo.
REM Display the options
for /l %%i in (1,1,%i%) do echo [%%i] !option[%%i]!
echo.
set /p choice=Enter your choice:
call :option_%choice% 2>nul || echo Invalid option & goto menu
goto menu
:option_1
call :display_protocol "IPv4"
goto :eof
:option_2
call :display_protocol "IPv6"
goto :eof
:option_3
call :set_ttl 65
goto :eof
:option_4
set /p ttl=Enter your custom TTL value:
call :set_ttl %ttl%
goto :eof
:option_5
call :set_ttl 128
goto :eof
:option_6
exit
:display_protocol
cls
powershell.exe -Command "Get-Net%1Protocol | Out-String | Write-Host"
pause
goto :eof
:set_ttl
cls
echo Running commands with administrative privileges...
powershell.exe -Command "Start-Process cmd.exe -Verb runAs -ArgumentList '/c netsh int ipv4 set glob defaultcurhoplimit=%1 & netsh int ipv6 set glob defaultcurhoplimit=%1'"
echo Packet TTL has been set to %1.
pause
goto :eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment