
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
nspack
Advanced tools
Simple DNS resolver and file-over-DNS transfer toolkit.
pip install gcnspack
Or with uv:
uv add gcnspack
from gcnspack import resolve, resolve_all, create_resolver
# Simple A record lookup
ips = resolve("example.com")
# ['93.184.216.34']
# Query specific record types
mx = resolve("example.com", "MX")
txt = resolve("example.com", "TXT")
# Query multiple record types at once
all_records = resolve_all("example.com")
# {'A': [...], 'AAAA': [...], 'MX': [...], 'TXT': [...], 'NS': [...], 'CNAME': [...]}
# Use a custom resolver
r = create_resolver(nameservers=["1.1.1.1"], timeout=10.0)
result = resolve("example.com", "A", resolver=r)
from gcnspack import encode_file, generate_zone_records
# Read a file and generate DNS zone records
with open("payload.bin", "rb") as f:
data = f.read()
# Generate zone-file TXT records
records = generate_zone_records(data, "files.example.com")
for record in records:
print(record)
Output:
0.files.example.com IN TXT "GAYTEMZUGU3DOOB..."
1.files.example.com IN TXT "GAYTEMZUGU3DOOC..."
_meta.files.example.com IN TXT "ON2HE2LOM4QHO..."
from gcnspack import save_txt_file
# Pull TXT records, decode, verify hash, and save
save_txt_file("files.example.com", "output.bin")
Files are transferred over DNS using this encoding scheme:
+-------------------+
| Original File |
+-------------------+
|
Split into chunks
(150 bytes each)
|
+-------+-------+
| | |
v v v
Chunk 0 Chunk 1 Chunk N
| | |
Base64 encode each chunk
| | |
Add header: "idx:total:base64data"
| | |
Base32 encode entire string
| | |
v v v
+-------------------------------------------+
| DNS TXT Records |
| 0.sub.example.com TXT "<base32>" |
| 1.sub.example.com TXT "<base32>" |
| N.sub.example.com TXT "<base32>" |
| _meta.sub.example.com TXT "<meta_b32>" |
+-------------------------------------------+
Metadata record (_meta.<subdomain>): Contains sha256:<hash>:chunks:<count>, base32-encoded.
Chunk records (<n>.<subdomain>): Each contains <index>:<total>:<base64_data>, base32-encoded.
Reconstruction:
_meta.<subdomain> to get chunk count and expected SHA-256 hash0 through N-1 from <n>.<subdomain># A record (default)
gcnspack resolve example.com
# Specific record type
gcnspack resolve example.com -t MX
# Custom nameserver
gcnspack resolve example.com -n 1.1.1.1
# Print zone records to stdout
gcnspack encode payload.bin -s files.example.com
# Write to a zone file
gcnspack encode payload.bin -s files.example.com -o records.zone
gcnspack fetch files.example.com -o output.bin
# Clone and install
git clone https://github.com/geekennedy/gcnspack.git
cd gcnspack
uv sync
# Run unit tests
uv run pytest -q -m "not integration"
# Run integration tests (requires live DNS)
uv run pytest -q -m integration
# Run all tests
uv run pytest -q
# Lint and format
uv run ruff check src/ tests/
uv run ruff format src/ tests/
MIT License - see LICENSE for details.
geekennedy - gkennedy@gcloudns.net
FAQs
Simple DNS resolver and file-over-DNS transfer toolkit
We found that nspack demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.