SNIFFIT(5)
π SNIFFIT π β the config file page (section 5, file formats, bestie)
okay so this is sniffit(5), the config file page, and the config file name is arbitrary β call it whatever you want, she doesn't care. β¨
π DESCRIPTION π
So basically: this page explains the format for the config file for sniffit (peep sniffit(8) if you wanna meet the actual program). This file is where you get to be super specific about which packets should be processed by sniffit β like, down to the details, no cap. It also controls (or, quote unquote, will control) some functions for the continuous logging (-L option). π
A sniffit config file might look like this β and bestie, be sure to end it with a BLANK line:
# Sniffit Sample Config file -- Brecht Claerhout
logfile /var/log/sniffit.today.log
# First select all packets!
select both mhosts 1
select both mhosts 2
# Now deselect all packets from/to those damn 'surfers'
deselect both port 80
deselect both port 8001
So what this file is telling sniffit: process all packets on the subnet, except the ones FROM/TO ports 80 and 8001. Because we do not want logs of those mass WWW connections that turn our logs completely unreadable. it's giving β¨unhinged log energyβ¨ and we're not here for it π«Ά
π GLOBAL FORMAT π
The file is made of lines. Lines are made of fields. Fields are separated with SPACES β and I need you to hear me on this one β NO TABS. π¨
Unix comment lines (the ones starting with #) are allowed, slay.
So it gives us:
<field1> <field2> <field3> <field4> <field5>
π¦ FIELD FORMAT π¦
<field1>
selectβ Sniffit will look for packets that match the description coming up in the other fields πdeselectβ Sniffit will ignore packets that match the descriptionlogfileβ change the logfile name to<field2>instead of the defaultsniffit.log
<field2>
fromβ packets FROM the host matching the description after it are consideredtoβ same vibe, but packets TO the...bothβ same vibe again, packets FROM or TO the...- a filename β this one shows up as an argument of
logfilein<field1>
<field3>
hostβ the (de)selection criteria involves a hostnameportβ similar, but it's a portnumbermhostsβ the (de)selection criteria involves multiple-hosts, like with the wildcards in0.3.0, but without thex
<field4>
Either a hostname, a portnumber, a service name, or a number-dot partial notation indicating multiple hosts β which one depends on <field3>. And heads up: service names like ftp are resolved as the services available on the host that runs Sniffit, and translated into a port nr. π§
<field5>
A portnumber, if <field3> was host or mhosts. It's optional β if you don't fill it in, all ports are going to be (de)selected.
π₯ FILE INTERPRETING π₯
The config file is interpreted SEQUENTIAL β meaning in order, top to bottom, bestie. So watch it, don't mix lines up in a file. Example:
select both mhosts 100.100.12.
deselect both port 80
select both host 100.100.12.2
This file will get you the packets:
- Sent by hosts
100.100.12.* - EXCEPT the WWW packets
- BUT showing the WWW packets concerning
100.100.12.2
Now watch what happens if you flip the order:
select both mhosts 100.100.12.
select both host 100.100.12.2
deselect both port 80
Will give you the packets (and probably an unwanted result π):
- Sent by hosts
100.100.12.* - Sent from/to
100.100.12.2(useless line, ngl) - deselecting all WWW packets on the subnet
bestie the order is the whole plot. sequencing is not a suggestion, it's a lifestyle. π
π AUTHOR π
Brecht Claerhout <coder@reptile.rug.ac.be>
π SEE ALSO π
okay that's the whole page!! go off and write the most iconic config file of all time πΈπ¦β¨
and a lil sign-off from me to you: this was SNIFFIT(5), living in the File Formats Manual β mwah, periodt π
π
π¦ where this page comes from
- arch rolling: sniffit 0.7-1 Β· BSD
- debian bookworm: sniffit 0.5-3 Β· BSD-3-Clause
- ubuntu jammy: sniffit 0.5-2 Β· BSD-3-Clause
- ubuntu noble: sniffit 0.5-3ubuntu1 Β· BSD-3-Clause
- ubuntu questing: sniffit 0.7-1
- ubuntu resolute: sniffit 0.7-1build1 Β· BSD-3-Clause
- ubuntu stonking: sniffit 0.7-1build1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms