Skip to content

Instantly share code, notes, and snippets.

@MobCat
Created July 24, 2023 10:18
Show Gist options
  • Save MobCat/53aadf4ddb6e072a511aef8ebdc8fc25 to your computer and use it in GitHub Desktop.
Save MobCat/53aadf4ddb6e072a511aef8ebdc8fc25 to your computer and use it in GitHub Desktop.
WoW login screen news redirector
@echo off
echo WoW login screen news redirector
REM Check if the script is running with administrator privileges
>nul 2>&1 net session || (
echo This script requires administrator privileges.
echo Please run the script as an administrator.
pause
exit /b
)
set /p "redirectIP=Enter the IP address you wish to redirect to [e.g., 127.0.0.1]: "
REM List of wow news sites
set "newsToRedirect= status.wow-europe.com launcher.worldofwarcraft.com"
REM Loop through the list and append them to the hosts file
for %%i in (%newsToRedirect%) do (
echo %redirectIP% %%i >> %SystemRoot%\System32\drivers\etc\hosts
)
echo Text appended to hosts file successfully.
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment