Skip to content

Commit f0ce049

Browse files
committed
added additional connection info
1 parent b50c14a commit f0ce049

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

scripts/dovehawk_expire.bro

+32
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,41 @@ hook extend_match(info: Info, s: Seen, items: set[Item])
143143
if (orig?$size) {
144144
hit += fmt("|orig:%s",orig$size);
145145
}
146+
if (orig?$num_pkts) {
147+
hit += fmt("|o_pkts:%s",orig$num_pkts);
148+
}
149+
if (orig?$num_bytes_ip) {
150+
hit += fmt("|o_bytes:%s",orig$num_bytes_ip);
151+
}
152+
if (orig?$state) {
153+
hit += fmt("|o_state:%s",orig$state);
154+
}
155+
146156
}
147157

148158
if (conn?$resp) {
149159
local resp = conn$resp;
150160
if (resp?$size) {
151161
hit += fmt("|resp:%s",resp$size);
152162
}
163+
if (resp?$num_pkts) {
164+
hit += fmt("|r_pkts:%s",resp$num_pkts);
165+
}
166+
if (resp?$num_bytes_ip) {
167+
hit += fmt("|r_bytes:%s",resp$num_bytes_ip);
168+
}
169+
if (resp?$state) {
170+
hit += fmt("|r_state:%s",resp$state);
171+
}
172+
173+
}
174+
175+
if (conn?$start_time) {
176+
hit += fmt("|start_time:%s",conn$start_time);
177+
}
178+
179+
if (conn?$duration) {
180+
hit += fmt("|duration:%s",conn$duration);
153181
}
154182

155183

@@ -198,6 +226,10 @@ hook extend_match(info: Info, s: Seen, items: set[Item])
198226
if (dns?$qtype_name) {
199227
hit += fmt("|q:%s",dns$qtype_name);
200228
}
229+
if (dns?$answers) {
230+
hit += fmt("|answers:%s",dns$answers);
231+
}
232+
201233
}
202234

203235

0 commit comments

Comments
 (0)