Giter Club home page Giter Club logo

dnsleaktest's Introduction

Dns Leak Test

The test shows DNS leaks and your external IP. If you use the same ASN for DNS and connection - you have no leak, otherwise here might be a problem.

Linux & macOS

How to install & use Bash Version

Please, before use make sure you have curl and ping installed.

  1. Download dnsleaktest.sh
curl https://raw.githubusercontent.com/macvk/dnsleaktest/master/dnsleaktest.sh -o dnsleaktest.sh
chmod +x dnsleaktest.sh
  1. Run dnsleaktest.sh
./dnsleaktest.sh

How to install & use Python Version

  1. Download dnsleaktest.py
curl https://raw.githubusercontent.com/macvk/dnsleaktest/master/dnsleaktest.py -o dnsleaktest.py
chmod +x dnsleaktest.py
  1. Run dnsleaktest.py
./dnsleaktest.py

Windows

How to install & use batch file

  1. Download dnsleaktest.bat
powershell -command "& { (New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/macvk/dnsleaktest/master/dnsleaktest.bat', 'dnsleaktest.bat') }"
  1. Run dnsleaktest.bat
dnsleaktest.bat

How to build & use Golang Version

You can use prebuilt executable binary for Linux, MacOs or Windows created by travis-ci.org:

Linux & macOS

  1. Download dnsleaktest v1.3
chmod +x dnsleaktest
  1. Run dnsleaktest
./dnsleaktest

Windows

  1. Download dnsleaktest.exe v1.3

  2. Run dnsleaktest.exe, open cmd then navigate to the exe file

dnsleaktest.exe

Or build binaries in your machine

  1. Linux & macOS
GOOS=linux GOARCH=386 go build -o dnsleaktest dnsleaktest.go

  1. Windows
GOOS=windows GOARCH=386 go build -o dnsleaktest.exe dnsleaktest.go

How to run from Docker

It is possible to run the Python version using Docker with the following one-liner:

docker run python:alpine sh -c 'wget -q -O- https://raw.githubusercontent.com/macvk/dnsleaktest/master/dnsleaktest.py | python'

dnsleaktest's People

Contributors

cloudyproton avatar gitexel avatar leonyu avatar macvk avatar noormohammedb avatar qudiqudi avatar varac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dnsleaktest's Issues

how does this work?

i have inspected your python script. you print already generated DNS leak results from bash.ws , it does not do a new test when running script. it may seem like it does because you providing random numbers to this line https://bash.ws/dnsleak/test/[random test number here]?json

so how is this a DNS leak test?

golang windows application

I've uploaded the golang windows application of dnsleaktest to virustitotal.com and tried to reach the green rating without luck. This is really a big issue. Next I built the empty application, placed only main-function inside it. And the result turned out even worser. Here is it

https://www.virustotal.com/#/file/af6bc9900800a41c10338edfae19066b49f919df0e49892f1d25010324e4d729/detection

If I can't sort it out, I'll going to remove binary from github to prevent ban of my github account.

dnsleaktest.sh and BustBox

Hi,
BusyBox doesnt work the same like bash. Therefore some are changes necessary:

Line 50 changed: for i in {1..10};do -> for i in $(seq 1 10); do
Line 57 added: echo ${result} | \
Line 59 changed: ".[] | select(.type == \"${1}\") | \"\(.ip)\(if .country_name != \"\" and .country_name != false then \" [\(.country_name)\(if .asn != \"\" and .asn != false then \" \(.asn)\" else \"\" end)]\" else \"\" end)\"" \ -> ".[] | select(.type == \"${1}\") | \"\(.ip)\(if .country_name != \"\" and .country_name != false then \" [\(.country_name)\(if .asn != \"\" and .asn != false then \" \(.asn)\" else \"\" end)]\" else \"\" end)\""
Line 60 removed: <<< ${result}
Line 67 changed: dns_count=$(jq 'map(select(.type == "dns")) | length' <<< ${result}) -> echo ${result}) | dns_count=$(jq 'map(select(.type == "dns")) | length'
Line 81 changed: jq --monochrome-output --raw-output '.[] | select(.type == "conclusion") | .ip' <<< ${result} -> echo ${result} | jq --monochrome-output --raw-output '.[] | select(.type == "conclusion") | .ip'

Cosmetical changes but they allow to run the script on small routers.

Regards,
Piotr

Results : No internet connection.

Hello,
First of all thank you for your work.
However, I want to use your command line script, but it gives me wrong answer.

./dnsleaktest.sh
=> Results

No internet connection.

Yet when I run a similar command (on the same machine) from my Internet browser, it works.

https://dnsleaktest.com/

  • "Extended test"
    => Results
Test complete
Query round	Progress...	Servers found
1		......		1
2		......		1
3		......		1
4		......		1
5		......		1
6		......		1
IP 	            Hostname 	                    ISP 	      Country
185.147.xxx.xxx 185-147-xxx-xxx.xxx.xxxxxx.net. Netprotect-sp Stockholm, Sweden

Can you help me ?
Ricardo

No Internet Connection

Hello,

I'm using your bash dns checker since few times but right now I've the error "No Internet Connection" returned when I'm launching the script ..

So I'm just looking your code and test 2 commands to know if it's by my side or yours :
curl --head --request GET "https://bash.ws" returned

curl: (60) SSL certificate problem: self-signed certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

With or without my own VPN which could block your site.

And this command
openssl s_client -servername bash.ws -connect bash.ws:443
returned your certificate and details so I don't understand if it's by my resort or not ..

Could you have so ideas that could help me ? :)

Thanks by advance

Supporting additional Interfaces.

I required the ability to check for DNS leaks on multiple network interfaces, so I edited your script.

Added the following variable a the beginning:

interface='enp1s0u1u3'

Changed the following lines:

curl --silent --head --request GET "https://${api_domain}" | grep "200 OK" > /dev/null

result_json=$(curl --silent "https://${api_domain}/dnsleak/test/${id}?json")

result_txt=$(curl --silent "https://${api_domain}/dnsleak/test/${id}?txt")

to:

curl --silent --head --interface ${interface} --request GET "https://${api_domain}" | grep "200 OK" > /dev/null

result_json=$(curl --silent --interface ${interface} "https://${api_domain}/dnsleak/test/${id}?json")

result_txt=$(curl --silent --interface ${interface} "https://${api_domain}/dnsleak/test/${id}?txt")

Perhaps this could be something you could more elegantly solve in a future release? :)

Good work bud!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.