id = "sngrep"
name = "sngrep"
homepage = "https://github.com/irontec/sngrep"
description = "sngrep is a tool for displaying SIP calls message flows from terminal."
executables = ["sngrep"]
[dotfiles]
paths = ["~/.sngreprc"]
exclude = []
secret = []
[commands]
format = 1
label = "Capture SIP traffic"
description = "Capture live SIP traffic or read a pcap file in the sngrep viewer. HEP/Homer, TLS key and config-file options are left out."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = true }
[[commands.source]]
id = "sngrep-man"
kind = "manual"
url = "https://manpages.debian.org/unstable/sngrep/sngrep.8.en.html"
revision = "Debian sngrep(8) 1.9.0"
evidence = '''sngrep [-hVcivNqrD] [-IO pcap_dump ] [-d dev ] [-l limit ] [-B buffer ] [-k keyfile ] [-f config_file ] [-F] [-T text_file ] [-t] [-P] [-R] [-LHE capture_url ] [ <match expression> ] [ <bpf filter> ]
-c
Only display dialogs starting with an INVITE request.
-r
Capture RTP packets payload.
-i
Make match expression case insensitive.
-v
Invert match expression.
-I pcap_dump
Read packets from pcap file instead of network devices.
-O pcap_dump
Save all captured packets to a pcap file.
-d dev
Use this capture device instead of default (any).
-l limit
Set capture limit to N dialogs.
-R
Rotate calls when capture limit has been reached.
-N
Don't display sngrep interface, just capture.
-q
Don't print captured dialogs in no interface mode.
-F
Do not read configuration from default config file.'''
[[commands.field]]
id = "device"
label = "Capture device"
description = "any, a device like eth0, or a comma-separated list."
type = "string"
option = ["-d"]
sources = ["sngrep-man"]
[[commands.field]]
id = "read_pcap"
label = "Read from pcap file"
type = "path"
option = ["-I"]
path = { kind = "file", role = "input" }
sources = ["sngrep-man"]
[[commands.field]]
id = "write_pcap"
label = "Save capture to pcap file"
type = "path"
option = ["-O"]
path = { kind = "file", role = "output" }
effect = "overwrite"
sources = ["sngrep-man"]
[[commands.field]]
id = "limit"
label = "Dialog limit"
type = "integer"
option = ["-l"]
sources = ["sngrep-man"]
[[commands.field]]
id = "invites_only"
label = "Only dialogs starting with INVITE"
type = "boolean"
option = ["-c"]
sources = ["sngrep-man"]
[[commands.field]]
id = "rtp"
label = "Capture RTP payload"
type = "boolean"
option = ["-r"]
sources = ["sngrep-man"]
[[commands.field]]
id = "no_interface"
label = "Capture only, no interface"
type = "boolean"
option = ["-N"]
sources = ["sngrep-man"]
[[commands.field]]
id = "quiet"
label = "Quiet (with no interface)"
type = "boolean"
option = ["-q"]
sources = ["sngrep-man"]
[[commands.field]]
id = "case_insensitive"
label = "Case-insensitive match"
type = "boolean"
option = ["-i"]
sources = ["sngrep-man"]
[[commands.field]]
id = "invert"
label = "Invert match"
type = "boolean"
option = ["-v"]
sources = ["sngrep-man"]
[[commands.field]]
id = "no_config"
label = "Ignore default config file"
type = "boolean"
option = ["-F"]
sources = ["sngrep-man"]
[[commands.field]]
id = "match"
label = "Match expression"
description = "Matched against message payloads."
type = "string"
position = 0
sources = ["sngrep-man"]
[[commands.field]]
id = "bpf"
label = "BPF filter"
description = "For example: port 5060. Needs a match expression first (use \"\" for none)."
type = "string"
position = 1
sources = ["sngrep-man"]
[[commands.task]]
id = "live"
label = "Watch a device"
fields = ["device", "invites_only", "match", "case_insensitive"]
required = []
[[commands.task]]
id = "pcap"
label = "Open a pcap file"
fields = ["read_pcap", "match", "case_insensitive", "invert"]
required = ["read_pcap"]
[[commands.task]]
id = "record"
label = "Record to pcap"
set = { no_interface = [true] }
fields = ["device", "write_pcap", "no_interface", "quiet"]
required = ["write_pcap"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["device", "read_pcap", "write_pcap", "invites_only", "match"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["limit", "rtp", "no_interface", "quiet", "case_insensitive", "invert", "no_config", "bpf"]