wirecrab-0.1.1 is not a library.
wirecrab
Agent-first CLI network analysis platform.
Build
Key Commands
Create/list/delete sessions:
Start/stop live capture:
Run SQL queries:
Export filtered packets to PCAP:
Inject packets from spec:
Run probe script:
Inspect schema and environment:
SQL Contract v1
Wirecrab is decision-neutral: it exposes facts for agents via SQL.
Canonical entities:
v1_sessionsv1_packetsv1_flowsv1_dns_queriesv1_http_requestsv1_service_discoveryv1_stun_eventsv1_endpoint_ownershipv1_snapshotsv1_snapshot_protocol_mixv1_snapshot_top_endpointsv1_snapshot_top_flowsv1_snapshot_discoveryv1_snapshot_dns_top_qnamesv1_snapshot_protocol_diffv1_snapshot_endpoint_diffv1_snapshot_flow_diff
SQL functions:
v1_snapshot_create(label)->snapshot_idv1_snapshot_create(label, start_sec, end_sec)->snapshot_idv1_snapshot_delete(snapshot_id)->rows_deletedv1_enrich_ip(ip)->1if updated/inserted,0if cache still fresh
Examples:
Inject Spec (YAML)
iface: en0
payload_hex: "ffffffffffff0011223344550800450000280001000040060000c0a80101c0a8010204d2005000000000000000005002200000000000"
count: 1
interval_ms: 100
You can use payload_base64 instead of payload_hex.
Probe Script (YAML)
iface: en0
steps:
- type: inject
payload_hex: "ffffffffffff0011223344550800450000280001000040060000c0a80101c0a8010204d2005000000000000000005002200000000000"
count: 1
- type: sleep
ms: 500
- type: query
sql: "SELECT count(*) AS n FROM packets"
Notes
- Live capture and packet injection require OS-level capture permissions.
- Session data is stored in
~/.wirecrab/sessions/<session-id>/session.db. - Query output formats:
json,jsonl,csv,human.