forked from lcaminha/FNSRWR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreset.bat
60 lines (47 loc) · 1.29 KB
/
reset.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@echo off
NET SESSION >NUL
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE >NUL
goto :start
:ELEVATE
CD /d %~dp0
MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1);close();" >NUL
EXIT
:start
echo ==============================
echo === FNSRWR v1 by DannyVoid ===
echo ==============================
echo.
:choice
echo Do you want to continue?
echo This will temporarily disable internet access!
set /P c=[Y/N]
if /I "%c%" EQU "Y" goto :continue
if /I "%c%" EQU "N" goto :stop
goto :choice
:continue
echo.
echo Releasing and Renewing...
ipconfig /release >NUL
ipconfig /renew >NUL
echo Resetting Arp Cache...
netsh int ip delete arpcache >NUL
echo Resetting Local IP...
netsh int ip reset >NUL
echo Resetting Winsock...
netsh winsock reset >NUL
netsh winsock reset proxy >NUL
echo Resetting Network Adapter...
for /F "skip=3 tokens=1,2,3* delims= " %%G in ('netsh interface show interface') DO (
IF "%%H"=="Connected" netsh interface set interface "%%J" disabled
) >NUL
for /F "skip=3 tokens=1,2,3* delims= " %%G in ('netsh interface show interface') DO (
IF "%%H"=="Disconnected" netsh interface set interface "%%J" enabled
) >NUL
goto :done
:done
echo.
echo Complete! Your connection should continue as normal.
pause
goto :stop
:stop
exit