Saravanan666/pypi-org huggingface dataset:
Package: dnspod-web
DNSPod API Python Web 示例功能说明用 Python 实现了一个 DNSPod API 的 Web 示例，已完成对域名和记录的基本操作，可直接使用。已调整为只支持通过 Token 登录，请到 DNSPod 用户中心创建 API Token 获取 Token ID 及 Token Key。功能包括：用户登录域名列表域名暂停/启用域名添加域名删除记录列表记录暂停/启用记录添加记录修改记录删除环境要求Python2.x/3.xflaskrequests安装说明下载代码库之后，在当前目录运行$ python app.py您还可以通过 pip 来安装并测试$ pip install dnspod-web
$ dnspod-web然后在浏览器中打开http://127.0.0.1:5000/即可查看示例。DEMO请打开demo目录查看相关截图。LICENSECopyright 2011-2020 Li KexianLicensed under the Apache License 2.0AboutLi Kexian
Package: dns-poison-checker
dns-poison-checkerA tool to check spoofing between internal and external DNS servers.How to UseUsage: dns-poison-check [OPTIONS] DOMAIN

  A tool to check spoofing between internal and external DNS servers.

Options:
  --version            Show version information.
  -i, --internal TEXT  Internal DNS server  [required]
  -e, --external TEXT  External DNS server  [required]
  --help               Show this message and exit.LicenseCopyright (C) 2020 HE Yaowenhe.yaowen@hotmail.comMIT License, seeLICENSE.
Package: dnspropagation
dnspropagationSimple CLI utility to check propagation of DNS records using multiple DNS servers.Installationpip install dnspropagationUsageIn the most simple form you can just specify type of record and domain name:dnspropagation a google.com

# or you can use docker version
docker run berkas1/dnspropagation a google.comIt will check entries for a given type and domain name using five default public nameservers. It returns a human-readable colorful table. You can use--jsonor--yamlparameters to make it machine-readable.Custom DNS serversYou can either supply custom DNS server to query using the--serverparameter, which can be used multiple times:dnspropagation--server1.1.1.1--server8.8.8.8agoogle.com# ordockerrunberkas1/dnspropagation--server1.1.1.1--server8.8.8.8agoogle.comOR you can add a yaml-formatted list of servers. This has to follow given format (as can be seen inthisfile) and be supplied to the utility using the--custom_listparameter.Expected resultsYou can expect a value to be returned by DNS servers. If this value is returned, its color will be green. Otherwise the value will be shown red.Filtering DNS serversWhen using the default DNS servers or a custom list, you can limit which servers you want to query using parameters--countryand--owner.
Both can be used multiple times. When used, the AND operation is used.
Package: dnspython
dnspythonINTRODUCTIONdnspython is a DNS toolkit for Python. It supports almost all record types. It
can be used for queries, zone transfers, and dynamic updates. It supports TSIG
authenticated messages and EDNS0.dnspython provides both high and low level access to DNS. The high level classes
perform queries for data of a given name, type, and class, and return an answer
set. The low level classes allow direct manipulation of DNS zones, messages,
names, and records.To see a few of the ways dnspython can be used, look in theexamples/directory.dnspython is a utility to work with DNS,/etc/hostsis thus not used. For
simple forward DNS lookups, it's better to usesocket.getaddrinfo()orsocket.gethostbyname().dnspython originated at Nominum where it was developed
to facilitate the testing of DNS software.ABOUT THIS RELEASEThis is dnspython 2.6.1.
Please readWhat's Newfor
information about the changes in this release.INSTALLATIONMany distributions have dnspython packaged for you, so you should
check there first.To use a wheel downloaded from PyPi, run:pip install dnspythonTo install from the source code, go into the top-level of the source code
and run:pip install --upgrade pip build
    python -m build
    pip install dist/*.whlTo install the latest from the master branch, runpip install git+https://github.com/rthalley/dnspython.gitDnspython's default installation does not depend on any modules other than
those in the Python standard library.  To use some features, additional modules
must be installed.  For convenience, pip options are defined for the
requirements.If you want to use DNS-over-HTTPS, runpip install dnspython[doh].If you want to use DNSSEC functionality, runpip install dnspython[dnssec].If you want to use internationalized domain names (IDNA)
functionality, you must runpip install dnspython[idna]If you want to use the Trio asynchronous I/O package, runpip install dnspython[trio].If you want to use WMI on Windows to determine the active DNS settings
instead of the default registry scanning method, runpip install dnspython[wmi].If you want to try the experimental DNS-over-QUIC code, runpip install dnspython[doq].Note that you can install any combination of the above, e.g.:pip install dnspython[doh,dnssec,idna]NoticesPython 2.x support ended with the release of 1.16.0.  Dnspython 2.0.0 through
2.2.x support Python 3.6 and later.  For dnspython 2.3.x, the minimum
supported Python version is 3.7, and for 2.4.x the minimum supported verison is 3.8.
We plan to align future support with the lifetime of the Python 3 versions.Documentation has moved todnspython.readthedocs.io.
Package: dnssplitter
OverviewParses DNS domain names into three parts: the prefix, the registered
domain and it's registration point.UsageFrom the CLIdnssplit www.google.co.uk www.yahoo.com
www.google.co.uk:
  Prefix:    www
  Domain:    google.co.uk
  Reg Point: co.uk
www.yahoo.com:
  Prefix:    www
  Domain:    yahoo.com
  Reg Point: comUsing the APIimportdnssplittersplitter=dnssplitter.DNSSplitter()splitter.init_tree()# uses internal data# or load your own:# splitter.load_psl_file("/path/to/public_suffix_list.dat")results=splitter.search_tree("www.foo.co.uk")# Returns an array of [prefix, registered_domain, public_point]:# results == ['www', 'foo.co.uk', 'co.uk']Reason for beingThere are a number of PSL breakdown libraries.  But this one is faster
than the others based on some initial tests, and returns more information.
Package: dns-spoofer
dns-spooferSend spoofed DNS queries over UDP.Installationpip install git+https://github.com/kimbo/dns-spoofer.gitThat will install two scriptsdns-spoof- send DNS queries with a different source port and source IP address than your own.dns-listen- listen for and print UDP packets (i.e. DNS queries) on a port and addressQuick exampleThis will be a little bit cooler if you have access to two different computers on the same network,
but it'll work just the same on just one.Step #1:Open up a terminal and run:$ dns-listen 53535
Listening on port 53535 and address ...You can replace 53535 with whatever port number you want (I'd recommend one bigger than 1024).Note that the address is blank (meaning we're listening on all addresses).If you have two computers, take note of the first computer's IP address (look intoip addr, orifconfigif you're on a Mac)Step #2If you have two computers, you'll need the IP address from your first machine here:$ dns-spoof example.com 1.1.1.1 --sport 53535 --src-addr <IP-address-here>Otherwise, if you're doing this on one computer, run:$ dns-spoof example.com 1.1.1.1 --sport 53535Your output after runningdns-spoofshould look something like this:(query) 192.168.0.25#53535 --> 1.1.1.1#53, "example.com" type "A"

### QUERY TIME: 0.00028133392333984375Soon after runningdns-spoof, look at the terminal you were runningdns-listenon.
It should have printed out something like this:Got 45 bytes from ('1.1.1.1', 53)
id 62725
opcode QUERY
rcode NOERROR
flags QR RD RA
;QUESTION
example.com. IN A
;ANSWER
example.com. 3574 IN A 93.184.216.34
;AUTHORITY
;ADDITIONALCongratulations! You just sent a spoofed DNS query :smile:Usage for dns-spoof$ dns-spoof -h
usage: dns-spoof [-h] [--dport DST_PORT] [--src-addr SRC_ADDR]
                 [--sport SRC_PORT] [-t RDTYPE] [-n NUM_QUERIES]
                 qname dst_addr

positional arguments:
  qname
  dst_addr              The address to send the DNS query to

optional arguments:
  -h, --help            show this help message and exit
  --dport DST_PORT, --destintaion-port DST_PORT
  --src-addr SRC_ADDR, --source-address SRC_ADDR
  --sport SRC_PORT, --source-port SRC_PORT
  -t RDTYPE, --rdtype RDTYPE
  -n NUM_QUERIES, --num-queries NUM_QUERIESUsage for dns-listen$ dns-listen -h
usage: dns-listen [-h] [--addr ADDRESS] port

positional arguments:
  port

optional arguments:
  -h, --help            show this help message and exit
  --addr ADDRESS, --address ADDRESSDisclaimersI've only tested this from behind a NATOnly works with UDP and IPv4I'm not responsible for what you do with this.LicenseseeLICENSE
Package: dnstap-dashboard
Dnstap dashboard - real-time metrics for dns serverTable of contentsOverviewInstallationConfigurationOverviewdnstap_dashboardcan display metrics of your dns server in real-time, a top-like command.If you want to use-it, your server must support thednstapfeature and also deploy the followingdnstap receiver[             ] ---- stream 1 ------------|
  [     DNS     ]                           |
  [             ]                           v
  [   servers   ] ---- stream 2 ----> [ dnstap receiver ] <-- [ dnstap dashboard ]
  [             ]InstallationInstall the dnstap_dashboard command with the pip command.pipinstalldnstap_dashboardAfter installation, you can execute the binary./dnstap_dashboardto start-it.
Prefer to install the dnstap_dashboard binary on the same machine of your dnstap receiver.ConfigurationSeedefault config fileexample.You can provide your own configuration, to do that create the following file/etc/dnstap_dashboard/dashboard.conf.If your dnstap_dashboard command is not on the same machine of your dnstap receiver, you need to configure the api address and provide the good api-key, for example:dnstap-receiver:api-ip:127.0.0.1api-port:8080api-key:changeme
Package: dnstap-pb
Dnstap Protocol Buffers implementation in PythonDnstap Protocol Buffers implementation in Python, more informations on dnstaphttp://dnstap.info/.
This library is based on the followingprotocol buffers schemafrom githubhttps://github.com/dnstap/dnstap.pbInstallationThis module can be installed frompypiwebsitepipinstalldnstap_pbDecoderExample to use the Dnstap decoderimportdnstap_pb# dnstap decoderdnstap=dnstap_pb.Dnstap()payload=b'\n\x08dnsdist1\x12\rdnsdist 1.5.0r[\x08\x05\x10\x01\x18\x01"\x04\n\x00'payload+=b'\x00\xd2*\x04\n\x00\x00\xd20\xe6\xae\x0385@\x8e\x8f\xc6\xff\x05M\x1cf,'payload+=b'\x15R6\xda\xba\x01\x00\x01\x00\x00\x00\x00\x00\x01\x03www\x06google\x02'payload+=b'fr\x00\x00\x01\x00\x01\x00\x00)\x10\x00\x00\x00\x00\x00\x00\x0c\x00\n\x00'payload+=b'\x08\xe68\xe3\x8e\x7f\x01\xdexx\x01'dnstap.ParseFromString(payload)dm=dnstap.messageprint(dm)type:CLIENT_QUERYsocket_family:INETsocket_protocol:UDPquery_address:"\n\000\000\322"response_address:"\n\000\000\322"query_port:60218response_port:53query_time_sec:1609664434query_time_nsec:533617553query_message:"\221W\001\000\001\000\000\000\000\000\001\003www\006google\002fr\000\000\001\000\001\000\000)\020\000\000\000\000\000\000\014\000\n\000\010\273\257\370\014_\001\341-"EncoderExample to use the Dnstap encoderimportdnstap_pb# dnstap encoderdnstap=dnstap_pb.Dnstap()# clear all fieldsdnstap.Clear()# constructs the messagednstap.type=1dnstap.version=b"0.1.0"dnstap.identity=b"dnstap_python"dnstap.message.type=dnstap_pb.dnstap_pb2._MESSAGE_TYPE.values_by_name["CLIENT_QUERY"].numberdnstap.message.socket_protocol=dnstap_pb.dnstap_pb2._SOCKETPROTOCOL.values_by_name["UDP"].numberdnstap.message.socket_family=dnstap_pb.dnstap_pb2._SOCKETFAMILY.values_by_name["INET"].number# serialize the dnstap message to binarypayload=dnstap.SerializeToString()Developmentdnstap_pb2 file generation guidelineDownload dnstap.proto fromhttps://github.com/dnstap/dnstap.pbwget https://raw.githubusercontent.com/dnstap/dnstap.pb/master/dnstap.protoDownload protocexport VER=21.5
wget https://github.com/protocolbuffers/protobuf/releases/download/v$VER/protoc-$VER-linux-x86_64.zip
unzip protoc-$VER-linux-x86_64.zipGenerate protopython3 -m pip install protobuf
bin/protoc --python_out=. dnstap.proto
Package: dnstest
dnstestA cli tool for testing DNS records match a provided yaml config file.Versioningdnstest followsSemVer(MAJOR.MINOR.PATCH) to track what is in each release.Major version number will be bumped when there is an incompatible API changeMinor version number will be bumped when there is functionality added in a backwards-compatible manner.Patch version number will be bumped when there is backwards-compatible bug fixes.Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.InstallationInstallation the package from pypi with your tool of choicepip,poetryorpipenv.pipinstalldnstestUsageTODO:dnstest ./example-config.ymlDocumentationTODO:https://github.com/leonsmith/dnstest/SupportIf you’re interested in financially supporting open source, consider donating.
Package: dnstk
dnstk is a toolkit for building DNS clients and servers inPython.dnstk-clidnstk includes its own client which works similar todig:$ dnstk-cli ddg.gg
Response code: 0
Question section
ddg.gg IN  A

Answer section
ddg.gg IN  A   208.94.146.80
ddg.gg IN  A   208.94.146.81
ddg.gg IN  A   208.94.146.70
ddg.gg IN  A   208.94.146.71

$ dnstk-cli irc.darkscience.net -r AAAA
Response code: 0
Question section
irc.darkscience.net    IN  AAAA

Answer section
irc.darkscience.net   IN  CNAME   irc.darkscience.ws
irc.darkscience.ws    IN  AAAA    2a02:2770::21a:4aff:fec1:1628
Package: dnsupdate
dnsupdateis a dynamic DNS client that has first-class support for IPv6 and
aims to be easily configurable to meet the needs of any situation. Unlike most
other dynamic DNS clients,dnsupdatehas been designed from the
start to support IPv6 and many different update services. It is written in
Python and configured using YAML, making it easy to use and extend.FeaturesBuilt-in support forFreeDNS,nsupdate.info, as well as any service that
uses the standardDynDNS protocolIPv6 supportSimple YAML configuration fileObtain addresses from a web service, router or local interfaceOnly submits an update if the address has changedRespects API return values to avoid abuse bansInstallationpip install dnsupdateAlternatively, you can simply download and rundnsupdate.py.It is alsoavailable on the Arch Linux
AUR.DependenciesPython ≥3.5requestsPyYAMLBeautiful Soup(optional, for scraping router pages)netifaces(optional, for getting local addresses)Configurationdnsupdateis configured using a singleYAML file.
The path to the file can be specified on the command line. If not,dnsupdatewill try to use~/.config/dnsupdate.confand/etc/dnsupdate.conf, in that order.Most users will likely be satisfied with a simple configuration like
this:dns_services:
    - type: NSUpdate
      args:
          hostname: example.nsupdate.info
          secret_key: 26Yg7wUhxoMore examples are available in theexamples/directory.Full documentation is available here:https://dnsupdate.readthedocs.io/Usageusage: dnsupdate [-h] [-f] [-V] [config]

Dynamic DNS update client

positional arguments:
  config              the config file to use

optional arguments:
  -h, --help          show this help message and exit
  -f, --force-update  force an update to occur even if the address has not
                      changed or a service has been disabled
  -V, --version       show program's version number and exitDocumentationDocumentation isavailable online, but it can also be built locally by running:python3 setup.py build_docs
Package: dnsupdater
DNSupdaterUpdate an Amazon Route53 or Cloudflare record with your current public IP address.Credentials configurationAWSEasiest way is to install AWS CLI fromhereand then configure the credentials executingaws configureand provide access key and secret key for an IAM user with enough permissions to update the Route53 hosted zone.CloudflareSet a Cloudflare token inCLOUDFLARE_API_TOKENenvironment variable or create a proper configuration file~/.cloudflare/cloudflare.cfFull documentationhereHow to runFrom git$ pwd
/home/user 
$ git clone git@github.com:diegofd/dnsupdater.git
$ cd dnsupdater
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt
$ cd src

# For AWS
$ python3 -m dnsupdater.dnsupdater --name RECORD_NAME route53 --hosted-zone-id HOSTED_ZONE_ID

# For Cloudflare
$ python3 -m dnsupdater.dnsupdater --name RECORD_NAME cloudflare --domain DOMAINFrom packageUsing virtualenv is recommended to not polute your system.$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install dnsupdater

# For AWS
$ dnsupdater --name RECORD_NAME route53 --hosted-zone-id HOSTED_ZONE_ID

# For Cloudflare
$ dnsupdater --name RECORD_NAME cloudflare --domain DOMAINHow to schedule it with cronFollow the steps above to install and configure a cron job to run every hour:0 *     * * *   user   cd /home/user/dnsupdater && .venv/bin/python3 -m dnsupdater.dnsupdater --name sub.example.com route53 --hosted-zone-id ZXXXXXXXXXXXCostAWSEstimated cost is $0.5 per hosted zone per month plus additional cost per DNS requests (none or tiny for a personal setup).Complete Route53 pricing information.CloudflareFree.DevelopmentPackaging documentation:https://packaging.python.org/en/latest/tutorials/packaging-projects/
Package: dnswait
DNSWaitdnswaitis a small script to wait for the "propagation" of a namserver configuration.There's no such thing as DNS propagationWhat make your browser don't hit your server right after you've
configured the zone, this long frustrating delay from hours to days,
is the effect ofcaches, not "propagation".Try it yourself next time you set up a new entry: just don't hit it
before configuring it, so its absence is not stored in any
caches. Only when configured try it and boom, cache miss all the way
up, no delay, it just works.There may be some time though between the moment you ask your
registrar to set an entry (via their web user interface or their API)
and the moment it's really visible on their nameservers, that time I
agree to call "propagation", and that's what's being monitored by this
script.UsageSay you've added a TXT record containingitsmeto proove you're the
owner ofexample.com, via the interface of a low-cost hosting
company, and they display a nice message:Please wait a few minutes for our scripts to propagate the change to
our DNS servers.Then you can run:dnswait example.com TXT itsmethe script will wait for all the authoritative servers of example.com
to serveitsmefor your text entry, so you know exactly what thosefew minuteswere, you don't have to guess.Another exampleSay you're the owner ofmdk.fr(it's me) and your provider only
allows you to change DNS records using issues on theirbug tracker,
then submit the issue asking them to set 51.15.187.166 as the IP for
mdk.fr and run:dnswait mdk.fr A 51.15.187.166so you'll know when they do it.If they reply "it's done" whilednswaitdon't see it, they probably
messed up something...Using in shell scriptsIf you have a shell script updating DNS configuration via an API, you
can usednswaitin them to wait for the configuration to be done.VerboseIf you want to see what's happening, run with-vor-vv:$dnswaitmdk.frA51.15.187.166-v
INFO:dnswait:3authoritativenameserverstocheck.
INFO:dnswait:Allauthoritativeservershavetheexpectedvalue.or:$dnswaitmdk.frA51.15.187.166-vv
INFO:dnswait:3authoritativenameserverstocheck.
DEBUG:dnswait:Checkingns-69-a.gandi.net.
DEBUG:dnswait:ns-69-a.gandi.net.havetheexpectedvalue!
DEBUG:dnswait:Checkingns-173-b.gandi.net.
DEBUG:dnswait:ns-173-b.gandi.net.havetheexpectedvalue!
DEBUG:dnswait:Checkingns-127-c.gandi.net.
DEBUG:dnswait:ns-127-c.gandi.net.havetheexpectedvalue!
INFO:dnswait:Allauthoritativeservershavetheexpectedvalue.
Package: dnszone
dnszoneOverviewThis package is forked fromEasyzone,
created by Chris Miles. I have forked it to include bugfixes for installation
and also to update the package for compatibility with Python 3.DNSZone is a package to manage the common record types of a
zone file, including SOA records.  This module sits on top of
the dnspython package and provides a higher level abstraction
for common zone file manipulation use cases.Main features:A high-level abstraction on top of dnspython.Load a zone file into objects.Modify/add/delete zone/record objects.Save back to zone file.Auto-update serial (if necessary).Websites:http://pypi.python.org/pypi/dnszonehttps://github.com/greg-hellings/dnszone/RequirementsdnspythonBuild/Test/InstallBuild::$pythonsetup.pybuildTest::$pythonsetup.pytestInstall::$pythonsetup.pyinstallOR with setuptools::$easy_installdnszoneExamplesdnszone::>>> from dnszone import dnszone
  >>> z = dnszone.zone_from_file('example.com', '/var/namedb/example.com')
  >>> z.domain
  'example.com.'
  >>> z.root.soa.serial
  2007012902L
  >>> z.root.records('NS').items
  ['ns1.example.com.', 'ns2.example.com.']
  >>> z.root.records('MX').items
  [(10, 'mail.example.com.'), (20, 'mail2.example.com.')]
  >>> z.names['foo.example.com.'].records('A').items
  ['10.0.0.1']

  >>> ns = z.root.records('NS')
  >>> ns.add('ns3.example.com.')
  >>> ns.items
  ['ns1.example.com.', 'ns2.example.com.', 'ns3.example.com.']
  >>> ns.delete('ns2.example.com')
  >>> ns.items
  ['ns1.example.com.', 'ns3.example.com.']

  >>> z.save(autoserial=True)ZoneCheck::>>> from dnszone.zone_check import ZoneCheck
  >>> c = ZoneCheck()
  >>> c.isValid('example.com', '/var/named/zones/example.com')
  True
  >>> c.isValid('foo.com', '/var/named/zones/example.com')
  False
  >>> c.error
  'Bad syntax'
  >>>
  >>> c = ZoneCheck(checkzone='/usr/sbin/named-checkzone')
  >>> c.isValid('example.com', '/var/named/zones/example.com')
  True
  >>>ZoneReload::>>> from dnszone.zone_reload import ZoneReload
  >>> r = ZoneReload()
  >>> r.reload('example.com')
  zone reload up-to-date
  >>> r.reload('foo.com')
  rndc: 'reload' failed: not found
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "dnszone/zone_reload.py", line 51, in reload
      raise ZoneReloadError("rndc failed with return code %d" % r)
  dnszone.zone_reload.ZoneReloadError: rndc failed with return code 1
  >>>
  >>> r = ZoneReload(rndc='/usr/sbin/rndc')
  >>> r.reload('example.com')
  zone reload up-to-date
  >>>
Package: dns-zone-builder
dns_zone_builderThis Python package makes creating DNS zone files from within Python code easier.The basic idea is to create an instance of the DnsZoneBuilder class, add resource records to it (with the add_xx_rr methods) and then print the instance into a file to use with a BIND name server.If you don't specify a serial number, one will be created for you. It will be today's date followed by a counter that is incremented every 15 minutes (so it will go from 00 to 95).As an added bonus, when creating a normal "forward" zone, you can add one or more network specifications (IPv4 or IPv6) to have reverse zones created for you (with the same SOA and NS information).Refer to the main code for an example on how to use it.