Skip to main content

PYrevDNS is a simple tool for performing reverse DNS lookups on IP addresses.

Project description

PYrevDNS

PYrevDNS is a simple tool for performing reverse DNS lookups on IP addresses. It can be used to perform a single lookup or to perform lookups on a list of IP addresses.

Installation Through PIP

To install dependencies, use the following command:

pip3 install -r requirements.txt

To import certify as module, install it using the following command:

pip3 install pyrevdns

Installation with Docker

This tool can also be used with Docker. To set up the Docker environment, follow these steps (trying using with sudo, if you get any error):

docker build -t pyrevdns:latest .

OR

Pull directly from Docker Hub:

docker pull shivamsaraswat/pyrevdns:latest

Using the PYrevDNS as command-line tool

To run the PYrevDNS on an IP address, provide the IP address with the -ip flag:

python3 pyrevdns -ip 216.58.196.110

For an overview of all commands use the following command:

python3 pyrevdns -h

The output shown below are the latest supported commands.

usage: pyrevdns [-h] [-v] [-ip IP] [-l LIST] [-d] [-t THREADS] [-r RESOLVER] [-o OUTPUT] [-silent]

PYrevDNS (Reverse DNS lookup tool)

options:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit

INPUT:
  -ip IP                Input IP address
  -l LIST, --list LIST  Input list of IP addresses
  -d, --domain          Output only domains

CONFIGURATION:
  -t THREADS, --threads THREADS
                        Number of threads to use
  -r RESOLVER, --resolver RESOLVER
                        IP of the DNS resolver to use for lookups (default: 8.8.8.8)

OUTPUT:
  -o OUTPUT, --output OUTPUT
                        Output file
  -silent               display silent output

Example: python3 pyrevdns -ip 216.58.196.110

Examples

Example 1:

Reverse DNS on the IP address 216.58.196.110 with the help of 1.1.1.1 DNS Resolver.

> python3 pyrevdns -ip 216.58.196.110 -r 1.1.1.1

██████╗ ██╗   ██╗██████╗ ███████╗██╗   ██╗██████╗ ███╗   ██╗███████╗
██╔══██╗╚██╗ ██╔╝██╔══██╗██╔════╝██║   ██║██╔══██╗████╗  ██║██╔════╝
██████╔╝ ╚████╔╝ ██████╔╝█████╗  ██║   ██║██║  ██║██╔██╗ ██║███████╗
██╔═══╝   ╚██╔╝  ██╔══██╗██╔══╝  ╚██╗ ██╔╝██║  ██║██║╚██╗██║╚════██║
██║        ██║   ██║  ██║███████╗ ╚████╔╝ ██████╔╝██║ ╚████║███████║
╚═╝        ╚═╝   ╚═╝  ╚═╝╚══════╝  ╚═══╝  ╚═════╝ ╚═╝  ╚═══╝╚══════╝

     Coded with Love by Shivam Saraswat (@cybersapien)

# 216.58.196.110  maa03s19-in-f110.1e100.net

Example 2:

Reverse DNS on the list of IP addresses with the help of 1.1.1.1 DNS Resolver.

> python3 pyrevdns --list test.txt -r 1.1.1.1

██████╗ ██╗   ██╗██████╗ ███████╗██╗   ██╗██████╗ ███╗   ██╗███████╗
██╔══██╗╚██╗ ██╔╝██╔══██╗██╔════╝██║   ██║██╔══██╗████╗  ██║██╔════╝
██████╔╝ ╚████╔╝ ██████╔╝█████╗  ██║   ██║██║  ██║██╔██╗ ██║███████╗
██╔═══╝   ╚██╔╝  ██╔══██╗██╔══╝  ╚██╗ ██╔╝██║  ██║██║╚██╗██║╚════██║
██║        ██║   ██║  ██║███████╗ ╚████╔╝ ██████╔╝██║ ╚████║███████║
╚═╝        ╚═╝   ╚═╝  ╚═╝╚══════╝  ╚═══╝  ╚═════╝ ╚═╝  ╚═══╝╚══════╝

     Coded with Love by Shivam Saraswat (@cybersapien)

# 216.58.196.110  maa03s19-in-f110.1e100.net
# 173.0.84.203    m.paypal.com
# 185.199.109.153 cdn-185-199-109-153.github.com

Using the PYrevDNS as module

Examples

Example 1

import pyrevdns

print(pyrevdns.Pyrevdns.lookup('216.58.196.110', only_domain=True))

# maa03s19-in-f110.1e100.net

Example 2

import pyrevdns

print(pyrevdns.Pyrevdns.lookup('216.58.196.110', resolver_ip='1.1.1.1'))

# 216.58.196.110  maa03s19-in-f110.1e100.net

Using the Docker Container

A typical run through Docker would look as follows:

docker run -it --rm pyrevdns -ip 216.58.196.110

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrevdns-1.0.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

pyrevdns-1.0.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file pyrevdns-1.0.1.tar.gz.

File metadata

  • Download URL: pyrevdns-1.0.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for pyrevdns-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e96cf2f9fa70c93322009852b4cbf7cf58ff8cda7add8475efebe3691acfcea5
MD5 82c431015ba44471f908d41ea318103f
BLAKE2b-256 3b1459ef4ee7379ac6429f1af67af0b8ab5ea744db7436eece5afec3d07c68de

See more details on using hashes here.

File details

Details for the file pyrevdns-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyrevdns-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for pyrevdns-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a75d41c491082ef19777e7353066257423ebcc054327d077c0814b046d16475a
MD5 42fab99bb85b5e419cb3b9732ea032d4
BLAKE2b-256 7deed2ce4ba4a95d73e33e5cb97d1a68d1c5e8618948b090ce0526e42641f54e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page