Coder Social home page Coder Social logo

incous / dns-online-filter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from navytitanium/dns-online-filter

0.0 2.0 0.0 3.52 MB

Decides if provided domains are safe based on DNS threat blocking providers intelligence. Does not required to have any blocklist.

Home Page: https://navytitanium.github.io/DNSMasterChef/

Python 100.00%

dns-online-filter's Introduction

DNS Online Filter

Decides if provided domains are safe based on DNS threat blocking providers intelligence.

Blocklists are not required. Instead, it makes use of the following public DNS resolvers:

  • Quad9 (9.9.9.9, 149.112.112.112)
  • Strongarm (54.174.40.213, 52.3.100.184)
  • SafeDNS (195.46.39.39, 195.46.39.40)
  • ComodoSecure (8.26.56.26, 8.20.247.20)
  • NortonConnectSafe (199.85.126.30, 199.85.127.30)

in parallel to verify if the domain is safe.

If a provider returns either NXDOMAIN, NODATA or a sinkholed IP address for a specified domain, it will end other queries and return False (domain unsafe).

If all providers correctly resolve the domain, it will be considered safe.

You can add as many threat blocking DNS providers as you want to the script. The 5 providers were chosen to demonstrate the proof of concept.

Setup

Requires Python 3.6.

Python packages

IP to ASN database

You also need to provide an IP to ASN database for pyasn.

I strongly suggest that you update the database with the following scripts

Usage

async-filter.py domains.txt

Output

[root@localhost]# python3.6 async-filter.py domains.txt 
google.com --> safe
cnn.com --> safe
stat-dns.com --> unsafe, filtered by NortonConnectSafe
www.zonemach.com --> unsafe, filtered by Strongarm
www.yasli-sad.ru --> unsafe, filtered by Strongarm
www.vinhosportimao.com --> unsafe, filtered by Strongarm
www.unblocking-acccount.000webhostapp.com --> unsafe, filtered by Strongarm
www.thephonecompany.com --> unsafe, filtered by Quad9
www.softica.fr --> unsafe, filtered by Quad9
www.siginlocalecountry.com --> unsafe, filtered by Strongarm
www.shoko-bussan.sakura.ne.jp --> unsafe, filtered by Quad9
www.secure17.000webhostapp.com --> unsafe, filtered by Strongarm
www.rixrax.com --> unsafe, filtered by Strongarm
www.residentstudents.org --> unsafe, filtered by Strongarm
www.registery-fanpages45.gq --> unsafe, filtered by Quad9
www.regiojardines.com --> unsafe, filtered by Strongarm
www.psicl.000webhostapp.com --> unsafe, filtered by Strongarm
www.prorammexico.com --> unsafe, filtered by Strongarm
-------------RESULT-------------
2/18 Safe
16/18 Blocked
Total time: 9.669567823410034

domains.txt

The list of domains to lookup. Must be one per line.

dns-online-filter's People

Contributors

navytitanium avatar

Watchers

 avatar  avatar

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.