Puncia 是两个 A.R.P. Syndicate 情报 API 的官方命令行客户端——只需指向一个域名、一个品牌或一个漏洞 ID,即可在几秒内获得结构化 JSON 数据,无需浏览器:
$ puncia subdomain arpsyndicate.io
╭──────────────────────────────────────────────────────────────────────╮
│ Panthera(P.)uncia v0.38 │
│ subdomain recon · brand impersonation · exploit intel · sbom analysis│
│ A.R.P. Syndicate — https://www.arpsyndicate.io │
╰──────────────────────────────────────────────────────────────────────╯
[
"advisories.arpsyndicate.io",
"asm.arpsyndicate.io",
"blog.arpsyndicate.io",
...
]
$ puncia sbom bom.json ./out
puncia ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% (128/128) 0:00:41
请注意,尽管这些结果有时可能相当不准确且不可靠,但由于其自我改进能力,它们在不同时间可能会有很大差异。
使用 API 密钥可以避免激进的速率限制:https://www.arpsyndicate.io/pricing.html
pip3 install punciapip3 install .pip3 install puncia
# subdomain footprint of a target (shadow IT / attack surface / takeover recon)
puncia subdomain example.com
# lookalike / typosquat / brand-impersonation domains
puncia replica example.com
# what's known about a CVE
puncia exploit CVE-2021-44228
puncia <mode> <query> [output] [--match M] [--domain D] [--limit N] [--offset N]
[--crawl] [--api-key K] [--concurrency N]
[--timeout S] [--retries N] [--quiet]
运行 puncia --help 查看完整参考。结果输出到 stdout;横幅、进度条、警告和错误都输出到 stderr,因此 puncia subdomain example.com > out.json 始终会生成干净、有效的 JSON。
退出码: 0 成功 · 1 请求或输入错误 · 2 用法错误。
(付费)存储 API 密钥(storekey)- puncia storekey <api-key>
~/.puncia,权限为 0600。$PUNCIA_API_KEY 会覆盖它,
这在 CI 中通常正是您想要的。(免费增值)查询域名,按域名聚类(subdomain / cuttlefish 引擎)- puncia subdomain <domain> <output-file>
subdomain/replica/keyword 会遍历每一页并为您合并
它们。传入 --offset(可带或不带 --limit)可自行获取恰好
一个原始页面,例如用于可恢复或流式遍历:
puncia subdomain bigco.com --limit 50000 --offset 0
# stderr prints: note: more results available — continue with --offset 50000
puncia subdomain bigco.com --limit 50000 --offset 50000
import asyncio
import puncia
async def main():
# Without an API key (ratelimited)
print(await puncia.query_api("exploit", "CVE-2021-3450"))
print(await puncia.query_api("subdomain", "arpsyndicate.io"))
# With an API key
await puncia.store_key("ARPS-xxxxxxxxxx")
api_key = await puncia.read_key()
print(await puncia.query_api("subdomain", "arpsyndicate.io", apikey=api_key))
print(await puncia.query_api("replica", "arpsyndicate.io", match="exact", apikey=api_key))
print(await puncia.query_api("enrich", "CVE-2021-3450", apikey=api_key))
print(await puncia.query_api("noncve", "exploitable", apikey=api_key))
# Static endpoints (unauthenticated, unlimited)
print(await puncia.query_api("subdomain", "^HEALTH"))
print(await puncia.query_api("exploit", "^STATS"))
# Live crawl, with the outcome surfaced via a callback
await puncia.query_api(
"subdomain", "bigco.com", apikey=api_key, crawl=True,
on_crawl=lambda h: print("crawl status:", h.get("X-Crawl-Status")),
)
# Write straight to disk
await puncia.query_api("subdomain", "arpsyndicate.io", "out.json", apikey=api_key)
asyncio.run(main())
失败会抛出 puncia.PunciaError;空结果({} / [])会
原样返回,而不会被当作错误处理。通过传入 session= 和共享的 limiter=,可以在多个
查询之间复用同一个会话,正如
process_bulk() 所做的那样。
from puncia import PunciaError, query_api
try:
data = await query_api("exploit", "CVE-2021-3450", apikey=api_key)
except PunciaError as exc:
print(f"lookup failed: {exc}")
git clone https://github.com/ARPSyndicate/puncia && cd puncia
pip install --upgrade pip # editable installs need pip >= 21.3
pip install -e ".[dev]"
pytest # 42 offline tests, no API calls or network access
测试套件完全离线——它覆盖 URL 构造、输出路径 包含、SBOM 解析、批量规划和速率限制器计时,而不触及 网络,因此可以在任何环境中安全运行。
--limit--offset--crawl 通过一次实时发现过程补充已存储的
结果。给定域名实际上每约 6 小时才会被重新爬取一次——该时间窗口内的请求会立即
获得缓存的爬取结果。Puncia 会在 stderr 上报告结果:
crawl: fresh, 12 newly discovered name(s)(还有 partial / cooldown /
disabled)。
puncia subdomain bigco.com --crawl
(免费增值)查询仿冒域名,按品牌聚类(replica / octopus 引擎)- puncia replica <domain> --match <prefix|exact|substring> <output-file>
(免费增值)按关键字查询,按关键字聚类(keyword / ammonites 引擎)- puncia keyword <keyword> --match <exact|prefix> <output-file>
--domain 将关键字限定到单个域名:
puncia keyword blog --domain bandcamp.com查询漏洞利用与漏洞标识符(exploit)
puncia exploit ^WATCHLIST_IDES <output-file>puncia exploit ^WATCHLIST_INFO <output-file>puncia exploit ^WATCHLIST_TECH <output-file>puncia exploit ^STATS <output-file>puncia exploit ^HEALTH <output-file>puncia exploit <eoidentifier> --match <substring|prefix|exact> <output-file>(免费增值)富化 CVE/GHSA 标识符(enrich)- puncia enrich <cve-id/ghsa-id> <output-file>
enrich=true 仅对 CVE-/GHSA- 标识符生效;它会将
完整的上游公告记录与 EPSS + VEDAS 评分合并。(付费)按 VEDAS 分组的非 CVE 标识符(noncve)- puncia noncve <browser/china/russia/europe/exploitable> <output-file>
(免费)Subdomain Center 服务健康状态(^HEALTH)- puncia subdomain ^HEALTH <output-file>
多查询(bulk/sbom)
puncia bulk <json-file> <output-directory>
{
"subdomain": [
"domainA.com",
"domainB.com"
],
"replica": [
"domainA.com",
"domainB.com"
],
"keyword": [
"keywordA",
"keywordB"
],
"exploit": [
"eoidentifierA",
"eoidentifierB"
],
"enrich": [
"eoidentifierA",
"eoidentifierB"
]
}
puncia sbom <json-file> <output-directory>批量与 SBOM 运行会对查询去重,将并行度限制在 --concurrency
(默认 10),并且——当没有 API 密钥时——自动调整请求节奏以保持在
免费层预算之内。
(免费增值)外部导入