{ "info": { "author": "Olivier Poitrey", "author_email": "rs@dailymotion.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Environment :: No Input/Output (Daemon)", "Environment :: Web Environment", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Intended Audience :: Telecommunications Industry", "License :: OSI Approved :: MIT License", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Internet :: WWW/HTTP :: Site Management", "Topic :: Security" ], "description": "Domcheck: Domain Ownership Validation\n=====================================\n\n.. image:: https://img.shields.io/pypi/v/domcheck.svg\n :target: https://pypi.python.org/pypi/domcheck\n\n.. image:: https://travis-ci.org/rs/domcheck.svg?branch=master\n :target: https://travis-ci.org/rs/domcheck\n\nThis Python library implements different strategies to validate the ownership of a domain name.\n\nAvailable strategies\n--------------------\n\nAll strategies takes 3 arguments: the domain to check, a static DNS safe ``prefix`` like \"yourservice-domain-verification\" and a randomly generated ``code``.\n\n- **DNS TXT record**: checks for the ``{prefix}-{code}`` string present in one of the ``TXT`` records on the domain name.\n- **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.\n- **Meta Tag**: checks for the presence of a ```` tag in the ``
`` part of the domain's home page using either HTTP or HTTPs protocols.\n- **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.\n\nUsage Example\n-------------\n\nSimple usage will check the domain with all available strategies and return ``True`` if the validation passed:\n\n.. code-block:: python\n\n import domcheck\n\n domain = \"example.com\"\n prefix = \"myservice-domain-verification\"\n code = \"myserviceK2d8a0xdhh\"\n\n if domcheck.check(domain, prefix, code):\n print \"This domain is verified\"\n\nYou may filter strategies by passing a coma separated list of strategies:\n\n.. code-block:: python\n\n domcheck.check(domain, prefix, code, strategies=\"dns_txt,meta_tag\")\n\nInstallation\n------------\n\nTo install domcheck, simply:\n\n $ pip install domcheck\n\nLicenses\n--------\n\nAll source code is licensed under the `MIT License