Git Product home page Git Product logo

domain-status-checker's Introduction

Domain Status Info

The domain_status_info.py script verifies the status of domain names based on a provided file or command line input. Additionally it gets the Domain Name Registrar and referral URL. The results are stored in an automatically generated html file or printed to stdout depending on the options used.

Requirements

The script depends on the whois library for getting domain name registrar and referral url. It is however optional, and if not installed the -r or --registrar flag will be ignored. Use pip install python-whois in case you want this information.

Supports python 2 and 3

Usage

  • Feeding from file and saving to html
> python domain_status_info.py -f domains.txt
> python domain_status_info.py -f domains.txt --registrar # also adds the registrar column
> python domain_status_info.py -f domains.txt --length 2 10 # parses file from lines 2 to 10
  • Print to stdout
> python domain_status_info.py -d nob.ro skamsie.ro example.org -r

> ** nob.ro ** 104.28.21.102 ** 200 -- OK ** ['Netim', 'http://www.netim.com']
> ** skamsie.ro ** 104.27.160.159 ** 200 -- OK ** ['EuroDomenii', 'http://www.domenii.eu']
> ** example.org ** 93.184.216.34 ** 200 -- OK ** ['ICANN', 'N/A']

Status codes

The status codes returned are similar with the ones returned by the curl -I command on *nix systems. Because it is a script it will sometimes get 406 -- Not Acceptable from some domains. Note that it does not follow redirects.

Html file

The html file generated to populate the results will use the the same core name as the one used as argument + 'STATUS' + interval of lines parsed. It will be saved in a folder called 'generated_results' created where the script is located. It contains a table like the one below.

screenshot

domain-status-checker's People

Contributors

nobro avatar skamsie avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

domain-status-checker's Issues

Getting This Error

Hi @skamsie ,

This is indeed good tool. I tried to use it but getting this Error while running:

File "domain_status_info.py", line 356, in <module>
    main()
  File "domain_status_info.py", line 349, in main
    save_test.add_status_to_html(parse_length=ARGS.length, name_registrar=ARGS.registrar)
  File "domain_status_info.py", line 231, in add_status_to_html
    status_code = self.get_status_code(url)
  File "domain_status_info.py", line 156, in get_status_code
    response = conn.getresponse()
  File "/usr/lib/python2.7/httplib.py", line 1148, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 448, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 412, in _read_status
    raise BadStatusLine("No status line received - the server has closed the connection")
httplib.BadStatusLine: No status line received - the server has closed the connection

It works fine for like 100 targets but after that it throws above Error & Stopped.

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.