![]() |
|
DNS Changer by privateloader - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Computers (https://sinister.li/Forum-Computers) +--- Forum: Networking (https://sinister.li/Forum-Networking) +--- Thread: DNS Changer by privateloader (/Thread-DNS-Changer-by-privateloader) |
DNS Changer by privateloader - hacxx - 04-23-2018 Code: @title DNS Changer by privateloader
@echo off
mode con:cols=53 lines=12
:a
echo .....................................................
echo .DNS Changer by privateloader.
echo .....................................................
echo [1] Use Google Public DNS,
echo [2] Use Comodo Secure DNS,
set choice=
set /p choice=Choose option 1 or 2:
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto b
if '%choice%'=='2' goto c
:b
cls
reg add "HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Interfaces\{c927d58b-bb6a-4b95-bf32-d780679598c2}" /v NameServer /t REG_SZ /d "8.8.8.8, 8.8.4.4" /f
pause
cls
goto a
:c
cls
reg add "HKLM\SYSTEM\ControlSet001\Services\Tcpip\Parameters\Interfaces\{c927d58b-bb6a-4b95-bf32-d780679598c2}" /v NameServer /t REG_SZ /d "156.154.70.22, 156.154.71.22" /f
pause
cls
goto aRE: DNS Changer by privateloader - mothered - 04-23-2018 I usually use Simple DNSCrypt to encrypt my DNS traffic. It's good to have an alternative changer. Thanks. RE: DNS Changer by privateloader - falldown418 - 03-31-2019 thanks will try it a bit later RE: DNS Changer by privateloader - Kludge - 04-02-2019 Will try soon. Getting tired of using static DNS addresses, even if they are privately owned and the rest of my traffic is heavily encrypted. RE: DNS Changer by privateloader - zorrophreak - 04-02-2019 Hey this is pretty nice. A simple batch DNS changer. Below I've attached a version with several other DNS servers attached. I'm sure there's a reason you used the registry to apply these DNS changes, but it isn't working with me, so I went ahead and did the following. I rewrote it below with more DNS services, switched the method of application to netsh instead of registry, added an admin check as well as ensured support for Windows 10. I've currently only got it setup to work with the main "Local Area Connection" interface and "Ethernet" interface. For Windows XP through Windows 7: Code: @title DNS Changer by privateloader
@echo off
REM Other DNS thrown in there by Zorrophreak on SL
REM I also changed the way DNS is changed
mode con:cols=53 lines=12
REM I intend to allow the script to automatically search for interfaces but for right now it is defined as variable if.
set if=Local Area Connection
:checkadmin
cls
echo Administrative permissions required. Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
goto a
) else (
echo .....................................................
echo .....................................................
echo .....................................................
echo .....................................................
echo ::: Error :::
echo ::: You must run this script as administrator :::
echo ::: Press any key to exit, :::
echo ::: then re-run this script as administrator :::
echo .....................................................
echo .....................................................
echo .....................................................
echo .....................................................
pause>nul
exit
)
:a
cls
echo .....................................................
echo .DNS Changer by privateloader and zorrophreak.
echo Current Interface: "%if%"
echo .....................................................
echo [1] Use Google Public DNS,
echo [2] Use Comodo Secure DNS,
echo [3] Use OpenDNS,
echo [4] Use Cloudflare 1.1.1.1 DNS,
echo [5] Restore Automatic DNS,
echo [6] Exit DNS Changer
set choice=
set /p choice=Choose option 1-6:
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto b
if '%choice%'=='2' goto c
if '%choice%'=='3' goto d
if '%choice%'=='4' goto e
if '%choice%'=='5' goto f
if '%choice%'=='6' goto g
:b
REM Google DNS
cls
netsh interface ip set dns "%if%" static 8.8.8.8
netsh interface ip add dns "%if%" 8.8.4.4
echo %if% DNS has been Updated!
pause
cls
goto a
:c
REM Comodo DNS
cls
netsh interface ip set dns "%if%" static 8.26.56.26
netsh interface ip add dns "%if%" 8.20.247.20
echo %if% DNS has been Updated!
pause
cls
goto a
:d
REM OpenDNS
cls
netsh interface ip set dns "%if%" static 208.67.222.222
netsh interface ip add dns "%if%" 208.67.220.220
echo %if% DNS has been Updated!
pause
cls
goto a
:e
REM Cloudflare DNS
cls
netsh interface ip set dns "%if%" static 1.1.1.1
netsh interface ip add dns "%if%" 1.0.0.1
echo %if% DNS has been Updated!
pause
cls
goto a
:f
REM Reset
cls
netsh interface ip set dns "%if%" dhcp
cls
echo %if% DNS has been Reset!
pause
cls
goto a
:g
REM Exit
endFor Windows 8 and Newer: Code: @title DNS Changer by privateloader
@echo off
REM Other DNS thrown in there by Zorrophreak on SL
REM I also changed the way DNS is changed
mode con:cols=53 lines=12
REM I intend to allow the script to automatically search for interfaces but for right now it is defined as variable if.
set if=Ethernet
:checkadmin
cls
echo Administrative permissions required. Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
goto a
) else (
echo .....................................................
echo .....................................................
echo .....................................................
echo .....................................................
echo ::: Error :::
echo ::: You must run this script as administrator :::
echo ::: Press any key to exit, :::
echo ::: then re-run this script as administrator :::
echo .....................................................
echo .....................................................
echo .....................................................
echo .....................................................
pause>nul
exit
)
:a
cls
echo .....................................................
echo .DNS Changer by privateloader and zorrophreak.
echo Current Interface: "%if%"
echo .....................................................
echo [1] Use Google Public DNS,
echo [2] Use Comodo Secure DNS,
echo [3] Use OpenDNS,
echo [4] Use Cloudflare 1.1.1.1 DNS,
echo [5] Restore Automatic DNS,
echo [6] Exit DNS Changer
set choice=
set /p choice=Choose option 1-6:
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='1' goto b
if '%choice%'=='2' goto c
if '%choice%'=='3' goto d
if '%choice%'=='4' goto e
if '%choice%'=='5' goto f
if '%choice%'=='6' goto g
:b
REM Google DNS
cls
netsh interface ip set dns "%if%" static 8.8.8.8
netsh interface ip add dns "%if%" 8.8.4.4
echo %if% DNS has been Updated!
pause
cls
goto a
:c
REM Comodo DNS
cls
netsh interface ip set dns "%if%" static 8.26.56.26
netsh interface ip add dns "%if%" 8.20.247.20
echo %if% DNS has been Updated!
pause
cls
goto a
:d
REM OpenDNS
cls
netsh interface ip set dns "%if%" static 208.67.222.222
netsh interface ip add dns "%if%" 208.67.220.220
echo %if% DNS has been Updated!
pause
cls
goto a
:e
REM Cloudflare DNS
cls
netsh interface ip set dns "%if%" static 1.1.1.1
netsh interface ip add dns "%if%" 1.0.0.1
echo %if% DNS has been Updated!
pause
cls
goto a
:f
REM Reset
cls
netsh interface ip set dns "%if%" dhcp
cls
echo %if% DNS has been Reset!
pause
cls
goto a
:g
REM Exit
endFor those who don't feel like copying this over, I have the batch files hosted below along with their respective VTs Windows XP through Windows 7: Download VirusTotal Windows 8 and Above: Download VirusTotal RE: DNS Changer by privateloader - hacxx - 04-02-2019 Seems nice, testing it... |