Git Product home page Git Product logo

domcheck's Introduction

Domcheck: Domain Ownership Validation

image

image

This Python library implements different strategies to validate the ownership of a domain name.

Available strategies

All strategies takes 3 arguments: the domain to check, a static DNS safe prefix like "yourservice-domain-verification" and a randomly generated code.

  • DNS TXT record: checks for the {prefix}-{code} string present in one of the TXT records on the domain name.
  • DNS CNAME record: checks for the existence of CNAME` record composed on the static{prefix}-{code}`` on the domain pointing to domain (usually yours) which the host is {prefix} (i.e.: {prefix}.yourdomain.com). NOTE: you may want to make sure that {prefix}.yourdomain.com resolves to something as some zone editors may check that.
  • Meta Tag: checks for the presence of a <meta name="{prefix}" content="{code}"> tag in the <head> part of the domain's home page using either HTTP or HTTPs protocols.
  • HTML File: checks for the presence of a file named {code}.html at the root of the domain's website containing the string {prefix}={code} using either HTTP or HTTPs protocols.

Usage Example

Simple usage will check the domain with all available strategies and return True if the validation passed:

import domcheck

domain = "example.com"
prefix = "myservice-domain-verification"
code = "myserviceK2d8a0xdhh"

if domcheck.check(domain, prefix, code):
    print "This domain is verified"

You may filter strategies by passing a coma separated list of strategies:

domcheck.check(domain, prefix, code, strategies="dns_txt,meta_tag")

Installation

To install domcheck, simply:

$ pip install domcheck

Licenses

All source code is licensed under the MIT License.

domcheck's People

Contributors

parsenz avatar rs avatar bloodyowl avatar fedor-lyanguzov avatar david-ordyan avatar soxoj 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.