Advertisement
Guest User

Teredo Fixit

a guest
Oct 3rd, 2018
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 4.04 KB | None | 0 0
  1. @echo off
  2. REM XBOX App Teredo Fix by JeffersonGER v1.0 03.10.2018
  3.  
  4. REM SETTINGS:
  5. REM 0 = No / 1 = Yes
  6. set DoRestartAfterScript=1
  7. set StateOfDecay2PortCheck=0
  8. set KEY_NAME=HKLM\System\CurrentControlSet\Services\Tcpip6\Parameters
  9. set VALUE_NAME=DisabledComponents
  10. set hostsfile=C:\WINDOWS\system32\drivers\etc\hosts
  11. set hostsurl=win10.ipv6.microsoft.com
  12. set opendns_address_string="Address:"
  13.  
  14.  
  15.  
  16. REM DO NOT EDIT THE COMING LINES!
  17. REM DO NOT EDIT THE COMING LINES!
  18. REM DO NOT EDIT THE COMING LINES!
  19. REM DO NOT EDIT THE COMING LINES!
  20. net.exe session 1>nul 2>nul || (echo This script requires elevated rights. & pause & exit /b 1)
  21. color 4f
  22. REM echo Enable Telnet for Portcheck, please wait... ( Takes a few seconds! )
  23. REM dism /online /Enable-Feature /FeatureName:TelnetClient 1>nul 2>nul
  24. cls
  25. set scripaddregentrystatus="Skipped add Regedit - Because value already exists"
  26. set scripaddhostsurlstatus="Skipped add Hosts URL - Because value already exists"
  27. echo.
  28. echo "Please close all programs because after this Setup the Computer will be restarted!"
  29. echo.
  30. pause
  31. cls
  32. echo Please wait for a few seconds, Teredofix is in progress...
  33. ipconfig /flushdns 1>nul 2>nul
  34. sc stop iphlpsvc 1>nul 2>nul
  35. sc stop IKEEXT 1>nul 2>nul
  36. sc stop XblAuthManager 1>nul 2>nul
  37. sc stop XboxNetApiSvc 1>nul 2>nul
  38. netsh int Teredo set state disable 1>nul 2>nul
  39. for /F "usebackq tokens=3" %%A in (`reg query "%KEY_NAME%" /v "%VALUE_NAME%" 2^>nul ^| find "%VALUE_NAME%"`) do (
  40.   goto scripregadd
  41. )
  42. :regadd
  43. reg add %KEY_NAME% /v %VALUE_NAME% /t REG_DWORD /d 0x0 /f 1>nul 2>nul
  44. set scripaddregentrystatus="Added Regedit Entry"
  45. :scripregadd
  46. netsh int teredo set state servername=win10.ipv6.microsoft.com 1>nul 2>nul
  47. netsh int teredo set state type=enterpriseclient 1>nul 2>nul
  48. netsh int teredo set state clientport=default 1>nul 2>nul
  49. find "%hostsurl%" "%hostsfile%" > nul & if errorlevel 1 (
  50.     echo %hostsurl% >> %hostsfile%
  51. set scripaddhostsurlstatus="Added Hosts URL"
  52. ) else (
  53.     goto scripaddhostsurl)
  54. :scripaddhostsurl
  55. netsh advfirewall set currentprofile firewallpolicy blockinbound,allowoutbound 1>nul 2>nul
  56. sc config iphlpsvc start=delayed-auto 1>nul 2>nul
  57. sc config IKEEXT start=delayed-auto 1>nul 2>nul
  58. sc config XblAuthManager start=delayed-auto 1>nul 2>nul
  59. sc config XboxNetApiSvc start=delayed-auto 1>nul 2>nul
  60. sc start iphlpsvc 1>nul 2>nul
  61. sc start IKEEXT 1>nul 2>nul
  62. sc start XblAuthManager 1>nul 2>nul
  63. sc start XboxNetApiSvc 1>nul 2>nul
  64. cls
  65. echo Please wait for a few seconds, Teredofix is in progress...
  66. ping 127.0.0.1 /n 5 > nul 2>&1
  67. cls
  68. echo.
  69. echo Now check the IP Adresses!
  70. echo.
  71. netsh int Teredo show state
  72. echo.
  73. echo.
  74. echo "Please check if one of these IPv4 Addresses matched to ("Local Mapping"):"
  75. ipconfig /all | findstr IPv4
  76. pause
  77. echo.
  78. echo "Please check if one of these Addresses matched to ("External NAT Mapping"):"
  79. for /f "usebackq tokens=2 delims=:" %%f in (`nslookup myip.opendns.com resolver1.opendns.com ^| findstr /c:%opendns_address_string%`) do (
  80.     set extip=%%f
  81. )
  82. echo %extip%
  83. echo.
  84. echo.
  85. echo -------------------------------------------------------------------------
  86. echo Regedit Status: %scripaddregentrystatus%
  87. echo Hosts Status: %scripaddhostsurlstatus%
  88. if %DoRestartAfterScript%==1 ( echo Computerrestart is enabled! )
  89. echo -------------------------------------------------------------------------
  90. echo.
  91. echo.
  92. pause
  93. if %StateOfDecay2PortCheck%==1 (
  94. cls
  95. echo.
  96. echo Check externals Ports open:
  97. powershell -command "& {&'Test-NetConnection' 127.0.0.1 -Port 3074 -InformationLevel Quiet}"
  98. powershell -command "& {&'Test-NetConnection' 127.0.0.1 -Port 88 -InformationLevel Quiet}"
  99. powershell -command "& {&'Test-NetConnection' 127.0.0.1 -Port 500 -InformationLevel Quiet}"
  100. powershell -command "& {&'Test-NetConnection' 127.0.0.1 -Port 3074 -InformationLevel Quiet}"
  101. powershell -command "& {&'Test-NetConnection' 127.0.0.1 -Port 3544 -InformationLevel Quiet}"
  102. powershell -command "& {&'Test-NetConnection' 127.0.0.1 -Port 4500 -InformationLevel Quiet}"
  103. pause
  104. )
  105. if %DoRestartAfterScript%==1 (
  106. shutdown /g /t 0
  107. ) else (
  108. exit /b 1
  109. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement