Skip to content

Commit 83a5b4d

Browse files
authored
Add dhcp tests (#243)
1 parent 7d59c4b commit 83a5b4d

File tree

8 files changed

+168
-2
lines changed

8 files changed

+168
-2
lines changed

pcap/dhcp.pcapng

1.47 KB
Binary file not shown.

pcap/dhcpv6.pcap

1.59 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
source: ja4/src/lib.rs
3+
expression: output
4+
---
5+
[]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
source: ja4/src/lib.rs
3+
expression: output
4+
---
5+
[]

wireshark/test/generate-output-files.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ FIELDS="-Y ja4 -T json \
1818
-e ja4.ja4ls \
1919
-e ja4.ja4ssh \
2020
-e ja4.ja4t \
21-
-e ja4.ja4ts"
21+
-e ja4.ja4ts \
22+
-e ja4.ja4d"
2223

2324
mkdir -p "$OUT_DIR"
2425

wireshark/test/test_tshark_output.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def test_tshark_output_matches_expected(pcap_file):
3838
"-e", "ja4.ja4ls",
3939
"-e", "ja4.ja4ssh",
4040
"-e", "ja4.ja4t",
41-
"-e", "ja4.ja4ts"
41+
"-e", "ja4.ja4ts",
42+
"-e", "ja4.ja4d"
4243
],
4344
stdout=subprocess.PIPE,
4445
stderr=subprocess.PIPE,
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[
2+
{
3+
"_index": "packets-2004-12-05",
4+
"_type": "doc",
5+
"_score": null,
6+
"_source": {
7+
"layers": {
8+
"frame.number": [
9+
"1"
10+
],
11+
"ja4.ja4d": [
12+
"4-1-00_61-50-55_1-3-6-42"
13+
]
14+
}
15+
}
16+
},
17+
{
18+
"_index": "packets-2004-12-05",
19+
"_type": "doc",
20+
"_score": null,
21+
"_source": {
22+
"layers": {
23+
"frame.number": [
24+
"2"
25+
],
26+
"ja4.ja4d": [
27+
"4-2-00_1-58-59-51-54_00"
28+
]
29+
}
30+
}
31+
},
32+
{
33+
"_index": "packets-2004-12-05",
34+
"_type": "doc",
35+
"_score": null,
36+
"_source": {
37+
"layers": {
38+
"frame.number": [
39+
"3"
40+
],
41+
"ja4.ja4d": [
42+
"4-3-00_61-50-54-55_1-3-6-42"
43+
]
44+
}
45+
}
46+
},
47+
{
48+
"_index": "packets-2004-12-05",
49+
"_type": "doc",
50+
"_score": null,
51+
"_source": {
52+
"layers": {
53+
"frame.number": [
54+
"4"
55+
],
56+
"ja4.ja4d": [
57+
"4-5-00_58-59-51-54-1_00"
58+
]
59+
}
60+
}
61+
}
62+
]
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
[
2+
{
3+
"_index": "packets-2015-01-02",
4+
"_type": "doc",
5+
"_score": null,
6+
"_source": {
7+
"layers": {
8+
"frame.number": [
9+
"2"
10+
],
11+
"ja4.ja4d": [
12+
"6-1-14_1-6-8-25_23-24"
13+
]
14+
}
15+
}
16+
},
17+
{
18+
"_index": "packets-2015-01-02",
19+
"_type": "doc",
20+
"_score": null,
21+
"_source": {
22+
"layers": {
23+
"frame.number": [
24+
"5"
25+
],
26+
"ja4.ja4d": [
27+
"6-2-14_25-26-1-2_00"
28+
]
29+
}
30+
}
31+
},
32+
{
33+
"_index": "packets-2015-01-02",
34+
"_type": "doc",
35+
"_score": null,
36+
"_source": {
37+
"layers": {
38+
"frame.number": [
39+
"7"
40+
],
41+
"ja4.ja4d": [
42+
"6-3-14_1-2-6-8-25-26_23-24"
43+
]
44+
}
45+
}
46+
},
47+
{
48+
"_index": "packets-2015-01-02",
49+
"_type": "doc",
50+
"_score": null,
51+
"_source": {
52+
"layers": {
53+
"frame.number": [
54+
"8"
55+
],
56+
"ja4.ja4d": [
57+
"6-7-14_25-26-1-2_00"
58+
]
59+
}
60+
}
61+
},
62+
{
63+
"_index": "packets-2015-01-02",
64+
"_type": "doc",
65+
"_score": null,
66+
"_source": {
67+
"layers": {
68+
"frame.number": [
69+
"11"
70+
],
71+
"ja4.ja4d": [
72+
"6-8-14_1-2-6-8-25-26_23-24"
73+
]
74+
}
75+
}
76+
},
77+
{
78+
"_index": "packets-2015-01-02",
79+
"_type": "doc",
80+
"_score": null,
81+
"_source": {
82+
"layers": {
83+
"frame.number": [
84+
"12"
85+
],
86+
"ja4.ja4d": [
87+
"6-7-14_1-2-13_00"
88+
]
89+
}
90+
}
91+
}
92+
]

0 commit comments

Comments
 (0)