Skip to content

Commit 5c7c28c

Browse files
authored
Merge pull request #263 from vlvkobal/fix-build
2 parents d2ca0fb + 5f9f195 commit 5c7c28c

34 files changed

+1231
-582
lines changed

.github/workflows/wireshark-release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
- name: checkout
1313
uses: actions/checkout@v4
1414
- name: build
15-
run: cd wireshark/build-scripts && sudo apt update -y && sudo apt install ninja-build -y && sudo ./linux_build.sh 4.4.0
15+
run: cd wireshark/build-scripts && sudo apt update -y && sudo apt install ninja-build -y && sudo ./linux_build.sh v4.6.0
1616
- name: rename artifact
17-
run: cp ./wireshark/build-scripts/wireshark-4.4.0/build/run/plugins/4.4/epan/ja4.so ja4.so.linux
17+
run: cp ./wireshark/build-scripts/v4.6.0/build/run/plugins/4.6/epan/ja4.so ja4.so.linux
1818
- name: upload-linux-ja4
1919
uses: actions/upload-artifact@v4
2020
with:
@@ -27,9 +27,9 @@ jobs:
2727
- name: checkout
2828
uses: actions/checkout@v4
2929
- name: build
30-
run: cd wireshark/build-scripts && ./macos_build.sh 4.4.0
30+
run: cd wireshark/build-scripts && ./macos_build.sh v4.6.0
3131
- name: rename artifact
32-
run: cp ./wireshark/build-scripts/wireshark-4.4.0/build/run/Wireshark.app/Contents/PlugIns/wireshark/4-4/epan/ja4.so ja4.so.macos
32+
run: cp ./wireshark/build-scripts/v4.6.0/build/run/Wireshark.app/Contents/PlugIns/wireshark/4-6/epan/ja4.so ja4.so.macos
3333
- name: upload-macos-ja4
3434
uses: actions/upload-artifact@v4
3535
with:
@@ -52,7 +52,7 @@ jobs:
5252
uses: actions/checkout@v4
5353
with:
5454
repository: wireshark/wireshark
55-
ref: release-4.4
55+
ref: v4.6.0
5656
path: wireshark/build-scripts/wireshark
5757
- name: add ja4 plugin
5858
run: copy -r wireshark/source wireshark/build-scripts/wireshark/plugins/epan/ja4
@@ -88,7 +88,7 @@ jobs:
8888
run: cmake --build . --config RelWithDebInfo
8989
working-directory: wireshark/build-scripts/wireshark/build
9090
- name: rename artifact
91-
run: cp wireshark/build-scripts/wireshark/build/run/RelWithDebInfo/plugins/4.4/epan/ja4.dll ja4.dll
91+
run: cp wireshark/build-scripts/wireshark/build/run/RelWithDebInfo/plugins/4.6/epan/ja4.dll ja4.dll
9292
- name: upload-windows-ja4
9393
uses: actions/upload-artifact@v4
9494
with:

.github/workflows/wireshark-test.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ name: Wireshark - Test
22

33
on:
44
push:
5-
branches: [main]
6-
paths:
7-
- '.github/workflows/wireshark-test.yml'
8-
- 'wireshark/**'
9-
pull_request:
105
paths:
116
- '.github/workflows/wireshark-test.yml'
127
- 'wireshark/**'
@@ -22,6 +17,7 @@ jobs:
2217

2318
- name: Install required packages
2419
run: |
20+
sudo add-apt-repository ppa:wireshark-dev/stable
2521
sudo apt update
2622
sudo apt upgrade -y
2723
sudo apt -y install \
@@ -38,8 +34,8 @@ jobs:
3834
| head -n1 \
3935
| sed -E 's/.* ([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
4036
PLUGIN_VERSION=$(echo "$TSHARK_VERSION" | cut -d. -f1,2)
41-
sudo ./linux_build.sh $TSHARK_VERSION
42-
sudo cp wireshark-$TSHARK_VERSION/build/run/plugins/$PLUGIN_VERSION/epan/ja4.so /usr/lib/x86_64-linux-gnu/wireshark/plugins/$PLUGIN_VERSION/epan
37+
sudo ./linux_build.sh v$TSHARK_VERSION
38+
sudo cp v$TSHARK_VERSION/build/run/plugins/$PLUGIN_VERSION/epan/ja4.so /usr/lib/x86_64-linux-gnu/wireshark/plugins/$PLUGIN_VERSION/epan
4339
working-directory: wireshark/build-scripts
4440

4541
- name: Run tests

wireshark/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ You can also find binaries for the previous versions of Wireshark in the [binari
5454

5555
## Building
5656

57-
Navigate to the `build-scripts` directory and run the script corresponding to your system. For example, `linux_build.sh` for Linux. The script will automatically clone Wireshark and build the plugin. The resulting binary can be found in `wireshark-4.4.0/build/run/plugins/4.4/epan/`. It will be named `ja4.so` on Linux or macOS and `ja4.dll` on Windows.
57+
Navigate to the `build-scripts` directory and run the script corresponding to your system. For example, `linux_build.sh` for Linux. The script will automatically clone Wireshark and build the plugin. The resulting binary can be found in `<relese-tag>/build/run/plugins/4.6/epan/`. It will be named `ja4.so` on Linux or macOS and `ja4.dll` on Windows.
5858

5959
## Installing JA4+ Plugin
6060

6161
### Installing Wireshark
6262

63-
The plugin has been tested with Wireshark versions 4.4.0 and 4.2.0 on macOS and Windows, and version 4.0.6 on Linux.
63+
The plugin has been tested with Wireshark versions 4.6.0, 4.4.0 and, 4.2.0 on macOS and Windows, and version 4.0.6 on Linux.
6464

6565
#### Linux
6666

@@ -88,11 +88,11 @@ You can use the `tshark` CLI tool as well. Refer to [Installing tshark](../READM
8888

8989
1. Move and rename `ja4.so` to the global Wireshark plugins directory:
9090
```bash
91-
sudo mv ja4.so.linux /usr/lib/x86_64-linux-gnu/wireshark/plugins/4.4/epan/ja4.so
91+
sudo mv ja4.so.linux /usr/lib/x86_64-linux-gnu/wireshark/plugins/4.6/epan/ja4.so
9292
```
9393
or
9494
```bash
95-
sudo mv ja4.so.linux /usr/lib/wireshark/plugins/4.4/epan/ja4.so
95+
sudo mv ja4.so.linux /usr/lib/wireshark/plugins/4.6/epan/ja4.so
9696
```
9797
*(The exact location depends on your system's distribution and Wireshark installation.)*
9898
2. Start Wireshark.
@@ -113,7 +113,7 @@ You can use the `tshark` CLI tool as well. Refer to [Installing tshark](../READM
113113

114114
1. Copy `ja4.dll` to the global Wireshark plugins directory:
115115
```txt
116-
C:\Program Files\Wireshark\plugins\4.4\epan\
116+
C:\Program Files\Wireshark\plugins\4.6\epan\
117117
```
118118
2. Start Wireshark.
119119

wireshark/build-scripts/linux_build.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77

88
VER=$1
99

10-
if [ -x $VER ]
11-
then echo "Enter a wireshark version (supported versions) => 4.0.3, 4.0.6, 4.0.10, 4.2.0"; exit
10+
if [ -z $VER ]
11+
then echo "Enter a wireshark version (e.g. wireshark-4.4.0, v4.6.0)"; exit
1212
fi
1313

14-
if [ ! -d wireshark-$VER ]
14+
if [ ! -d $VER ]
1515
then
16-
echo "fetching wireshark sources with tag => tags/wireshark-$VER"
17-
git clone -o upstream --branch wireshark-$VER https://gitlab.com/wireshark/wireshark.git --depth=5000
18-
mv wireshark wireshark-$VER
16+
echo "fetching wireshark sources with tag => tags/$VER"
17+
git clone -o upstream --branch $VER https://gitlab.com/wireshark/wireshark.git --depth=5000
18+
mv wireshark $VER
1919
fi
2020

21-
cd wireshark-$VER
22-
git checkout tags/wireshark-$VER
21+
cd $VER
22+
git checkout tags/$VER
2323
rm -rf ./plugins/epan/ja4
2424
cp -r ../../source ./plugins/epan/ja4
2525
mv CMakeListsCustom.txt.example CMakeListsCustom.txt

wireshark/build-scripts/macos_build.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,24 @@
77

88
VER=$1
99

10-
if [ -x $VER ]
11-
then echo "Enter a wireshark version (supported versions) => 4.0.3, 4.0.6, 4.0.10, 4.2.0"; exit
10+
if [ -z $VER ]
11+
then echo "Enter a wireshark version (e.g. wireshark-4.4.0, v4.6.0)"; exit
1212
fi
1313

14-
if [ ! -d wireshark-$VER ]
14+
if [ ! -d $VER ]
1515
then
16-
echo "fetching wireshark sources with tag => tags/wireshark-$VER"
17-
git clone -o upstream --branch wireshark-$VER https://gitlab.com/wireshark/wireshark.git --depth=5000
18-
mv wireshark wireshark-$VER
19-
cd wireshark-$VER
20-
git checkout tags/wireshark-$VER
16+
echo "fetching wireshark sources with tag => tags/$VER"
17+
git clone -o upstream --branch $VER https://gitlab.com/wireshark/wireshark.git --depth=5000
18+
mv wireshark $VER
19+
cd $VER
20+
git checkout tags/$VER
2121

2222
# Prep for macos using wireshark's prep script
2323
./tools/macos-setup-brew.sh
24+
brew install speexdsp
2425
brew install qt5
2526
else
26-
cd wireshark-$VER
27+
cd $VER
2728
fi
2829

2930
rm -rf ./plugins/epan/ja4

wireshark/test/testdata/CVE-2018-6794.pcap.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[
22
{
33
"_index": "packets-2018-01-17",
4-
"_type": "doc",
54
"_score": null,
65
"_source": {
76
"layers": {
@@ -16,7 +15,6 @@
1615
},
1716
{
1817
"_index": "packets-2018-01-17",
19-
"_type": "doc",
2018
"_score": null,
2119
"_source": {
2220
"layers": {
@@ -31,7 +29,6 @@
3129
},
3230
{
3331
"_index": "packets-2018-01-17",
34-
"_type": "doc",
3532
"_score": null,
3633
"_source": {
3734
"layers": {
@@ -52,7 +49,6 @@
5249
},
5350
{
5451
"_index": "packets-2018-01-17",
55-
"_type": "doc",
5652
"_score": null,
5753
"_source": {
5854
"layers": {
@@ -67,7 +63,6 @@
6763
},
6864
{
6965
"_index": "packets-2018-01-17",
70-
"_type": "doc",
7166
"_score": null,
7267
"_source": {
7368
"layers": {
@@ -82,7 +77,6 @@
8277
},
8378
{
8479
"_index": "packets-2018-01-17",
85-
"_type": "doc",
8680
"_score": null,
8781
"_source": {
8882
"layers": {
@@ -103,7 +97,6 @@
10397
},
10498
{
10599
"_index": "packets-2018-01-17",
106-
"_type": "doc",
107100
"_score": null,
108101
"_source": {
109102
"layers": {
@@ -118,7 +111,6 @@
118111
},
119112
{
120113
"_index": "packets-2018-01-17",
121-
"_type": "doc",
122114
"_score": null,
123115
"_source": {
124116
"layers": {

wireshark/test/testdata/badcurveball.pcap.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[
22
{
33
"_index": "packets-2020-01-17",
4-
"_type": "doc",
54
"_score": null,
65
"_source": {
76
"layers": {
@@ -16,7 +15,6 @@
1615
},
1716
{
1817
"_index": "packets-2020-01-17",
19-
"_type": "doc",
2018
"_score": null,
2119
"_source": {
2220
"layers": {
@@ -31,7 +29,6 @@
3129
},
3230
{
3331
"_index": "packets-2020-01-17",
34-
"_type": "doc",
3532
"_score": null,
3633
"_source": {
3734
"layers": {
@@ -49,7 +46,6 @@
4946
},
5047
{
5148
"_index": "packets-2020-01-17",
52-
"_type": "doc",
5349
"_score": null,
5450
"_source": {
5551
"layers": {
@@ -69,7 +65,6 @@
6965
},
7066
{
7167
"_index": "packets-2020-01-17",
72-
"_type": "doc",
7368
"_score": null,
7469
"_source": {
7570
"layers": {

wireshark/test/testdata/browsers-x509.pcapng.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[
22
{
33
"_index": "packets-2023-08-09",
4-
"_type": "doc",
54
"_score": null,
65
"_source": {
76
"layers": {
@@ -16,7 +15,6 @@
1615
},
1716
{
1817
"_index": "packets-2023-08-09",
19-
"_type": "doc",
2018
"_score": null,
2119
"_source": {
2220
"layers": {
@@ -31,7 +29,6 @@
3129
},
3230
{
3331
"_index": "packets-2023-08-09",
34-
"_type": "doc",
3532
"_score": null,
3633
"_source": {
3734
"layers": {
@@ -57,7 +54,6 @@
5754
},
5855
{
5956
"_index": "packets-2023-08-09",
60-
"_type": "doc",
6157
"_score": null,
6258
"_source": {
6359
"layers": {
@@ -81,7 +77,6 @@
8177
},
8278
{
8379
"_index": "packets-2023-08-09",
84-
"_type": "doc",
8580
"_score": null,
8681
"_source": {
8782
"layers": {
@@ -96,7 +91,6 @@
9691
},
9792
{
9893
"_index": "packets-2023-08-09",
99-
"_type": "doc",
10094
"_score": null,
10195
"_source": {
10296
"layers": {
@@ -111,7 +105,6 @@
111105
},
112106
{
113107
"_index": "packets-2023-08-09",
114-
"_type": "doc",
115108
"_score": null,
116109
"_source": {
117110
"layers": {
@@ -129,7 +122,6 @@
129122
},
130123
{
131124
"_index": "packets-2023-08-09",
132-
"_type": "doc",
133125
"_score": null,
134126
"_source": {
135127
"layers": {
@@ -149,7 +141,6 @@
149141
},
150142
{
151143
"_index": "packets-2023-08-09",
152-
"_type": "doc",
153144
"_score": null,
154145
"_source": {
155146
"layers": {
@@ -173,7 +164,6 @@
173164
},
174165
{
175166
"_index": "packets-2023-08-09",
176-
"_type": "doc",
177167
"_score": null,
178168
"_source": {
179169
"layers": {
@@ -188,7 +178,6 @@
188178
},
189179
{
190180
"_index": "packets-2023-08-09",
191-
"_type": "doc",
192181
"_score": null,
193182
"_source": {
194183
"layers": {
@@ -203,7 +192,6 @@
203192
},
204193
{
205194
"_index": "packets-2023-08-09",
206-
"_type": "doc",
207195
"_score": null,
208196
"_source": {
209197
"layers": {
@@ -221,7 +209,6 @@
221209
},
222210
{
223211
"_index": "packets-2023-08-09",
224-
"_type": "doc",
225212
"_score": null,
226213
"_source": {
227214
"layers": {
@@ -243,7 +230,6 @@
243230
},
244231
{
245232
"_index": "packets-2023-08-09",
246-
"_type": "doc",
247233
"_score": null,
248234
"_source": {
249235
"layers": {
@@ -267,7 +253,6 @@
267253
},
268254
{
269255
"_index": "packets-2023-08-09",
270-
"_type": "doc",
271256
"_score": null,
272257
"_source": {
273258
"layers": {

0 commit comments

Comments
 (0)