Giter Site home page Giter Site logo

manoonabbasi / hot-plugged-dns Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 67 KB

DNS Sinkhole Implementation in Python: A DNS sink server and JSON publisher that block specified domains and serve as a DNS sinkhole, redirecting queries to a local blacklist or Google DNS. Designed for testing and managing unwanted domain resolutions.

License: MIT License

Python 100.00%

hot-plugged-dns's Introduction

hot-plugged-DNS

DNS Sinkhole Implementation in Python: A DNS sink server and JSON publisher that block specified domains and serve as a DNS sinkhole, redirecting queries to a local blacklist or Google DNS. Designed for testing and managing unwanted domain resolutions.

DNS Sinkhole Implementation

This project offers a DNS sink server and a JSON publisher to manage and block specified domains. It functions as a DNS sinkhole, redirecting queries to a local blacklist or Google DNS, providing a robust solution for testing and managing unwanted domain resolutions.

Features

  • DNS Sink Server: Processes DNS queries, redirecting specified domains to a sinkhole IP address.
  • JSON Publisher: Serves domain blacklists in compressed JSON format via HTTP.
  • Flexible Configuration: Easily modify the list of blocked domains and customize settings.
  • Usage of Third-Party DNS: Can query external DNS servers (e.g., Google's 8.8.8.8) for unresolved domains.

Requirements

  • Python 3.x
  • Required libraries: dnspython, colorama, requests

Usage

  1. Prepare DNS Blacklist: Ensure dns.blacklist contains the list of blocked domains.
  2. Install Required Libraries:
    pip install dnspython colorama requests
  3. Generate Executables: Create standalone executables using pyinstaller (for Windows):
    pyinstaller --onefile dnssinker.py
    pyinstaller --onefile http-dns-publisher.py
  4. Start JSON Publisher: Serve the JSON data from the DNS blacklist:
    python3 http-dns-publisher.py
  5. Start DNS Sink Server: Run the DNS sink server to process queries:
    python3 dnssinker.py
  6. Perform DNS Queries: From a client machine, execute DNS queries:
    dig @<ip-addr-sink-server> -p 59 <domain-name>

Contributing

Feel free to contribute by opening issues or creating pull requests.

License

This project is licensed under the MIT License.

hot-plugged-dns's People

Contributors

manoonabbasi avatar

Watchers

 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.