launch.bat 1012 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. @ECHO OFF
  2. REM HSR patch by mkrsym1
  3. REM https://notabug.org/mkrsym1/astra
  4. REM mirror: https://codeberg.org/an-anime-team/astra
  5. REM PLEASE AVOID EDITING THIS FILE
  6. REM THERE IS A GOOD REASON TO BLOCK LOGGING SERVERS
  7. SET perr1=1
  8. SET perr2=1
  9. SET perr=0
  10. setlocal EnableDelayedExpansion
  11. FOR /f "delims=" %%i IN ('ping -n 1 -w 1 log-upload-os.hoyoverse.com') DO (
  12. echo %%i | find "[0.0.0.0]" >nul
  13. IF !ERRORLEVEL! EQU 0 SET "perr1=0"
  14. echo %%i | find "could not find host" >nul
  15. IF !ERRORLEVEL! EQU 0 SET "perr1=0"
  16. )
  17. FOR /f "delims=" %%i IN ('ping -n 1 -w 1 sg-public-data-api.hoyoverse.com') DO (
  18. echo %%i | find "[0.0.0.0]" >nul
  19. IF !ERRORLEVEL! EQU 0 SET "perr2=0"
  20. echo %%i | find "could not find host" >nul
  21. IF !ERRORLEVEL! EQU 0 SET "perr2=0"
  22. )
  23. IF %perr1% EQU 1 SET perr=1
  24. IF %perr2% EQU 1 SET perr=1
  25. IF %perr% NEQ 0 (
  26. echo Logging servers are reachable. Please edit your /etc/hosts to block them. See install.sh for the list >_error.txt
  27. notepad _error.txt
  28. del _error.txt
  29. exit
  30. )
  31. start StarRail.exe %*