Skip to main content

a simple client to observe dns pollution network situation under Great Firewall.

Project description

publish PyPI version

dns-observe

a simple client to observe dns pollution network situation under The Great Firewall of China.

So far, only type A DNS queries have been implemented.

Installing

Install and update using pip: pip install dns-observe

usage

cli

> dns-observe -h
usage: dns-observe [-h] [-s DNS_SERVER] [-t LISTEN_TIME] [-v] domain

Observing DNS pollution

positional arguments:
  domain                query domain

options:
  -h, --help            show this help message and exit
  -s DNS_SERVER, --dns_server DNS_SERVER
                        DNS server (default: 1.1.1.1)
  -t LISTEN_TIME, --listen_time LISTEN_TIME
                        listen time (default: 5)
  -v, --version         show program's version number and exit

python:

> python -m dns_observe api.openai.com

from dns_observe import DNSQuery, RecordType
dns = DNSQuery('1.1.1.1')
dns.query('api.openai.com')
dns.query('claude.ai', RecordType.AAAA)

output:

- Time: 2024-11-22 11:18:16.977688, Name: api.openai.com, TTL: 153, A: 103.56.16.112
- Time: 2024-11-22 11:18:16.978715, Name: api.openai.com, TTL: 206, A: 192.133.77.145
┌ Time: 2024-11-22 11:18:17.140652, Name: api.openai.com, TTL: 46, A: 162.159.140.245
└ Time: 2024-11-22 11:18:17.140652, Name: api.openai.com, TTL: 46, A: 172.66.0.243

How to Packaging Python Projects

https://packaging.python.org/en/latest/tutorials/packaging-projects/

python -m build

# testpypi
py -m twine upload --repository testpypi dist/*

# pypi
py -m twine upload dist/*

dev

> pip install -e .

test

> python tests/test_run.py

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

dns_observe-0.7.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dns_observe-0.7.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file dns_observe-0.7.0.tar.gz.

File metadata

  • Download URL: dns_observe-0.7.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dns_observe-0.7.0.tar.gz
Algorithm Hash digest
SHA256 dff3461306f5dcd661a139533aee48231f0f29680665f925ed7dba43dbecf469
MD5 8b3ff62881b83487954bb0f828f5e000
BLAKE2b-256 eaf89a887b8cdc3de2f2cddf9667bed9293626cfbdc5517a3803e76e84bede64

See more details on using hashes here.

Provenance

The following attestation bundles were made for dns_observe-0.7.0.tar.gz:

Publisher: publish-to-test-pypi.yml on xavierskip/dns-observe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dns_observe-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: dns_observe-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dns_observe-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 581eb84bd725b4232f191908421fac9b4d3550ff3044b00bcc55cbc9d79c7696
MD5 bd672f40dbdb0fb72bcf3f312e219b06
BLAKE2b-256 8395b7967acbc8050349444cbd8ac2276cf8627234393768acc78213bb540847

See more details on using hashes here.

Provenance

The following attestation bundles were made for dns_observe-0.7.0-py3-none-any.whl:

Publisher: publish-to-test-pypi.yml on xavierskip/dns-observe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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