Plugin compiling problems
Hello
I'm trying to compile the s7comm_plus dissector in ubuntu 18, and i'm having problems to get it work. i gonna try to describe the process that i followed:
1- download wireshark 3.0 source code.
2- put s7comm_plus folder into wireshark3.0/plugins/epan/
3- chage some lines in CMakeLists.txt:
- Add this 2 lines: "include(WiresharkPlugin)" and "cmake_minimum_required(VERSION 3.10)"
- Change line: "register_dissector_file" by "register_plugin_files"
4- mkdir build && cd build
5- cmake ../wireshark 3.0
6- make (and here comes the problem). It compiles well all the wireshark files except the dissector.
Traceback (most recent call last): File "/home/josu/Descargas/wireshark-3.0.0/tools/make-plugin-reg.py", line 78, in <module> contents = file.read()
File "/usr/lib/python3.6/codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 1239: invalid start byte
plugins/epan/s7comm_plus/CMakeFiles/s7comm_plus.dir/build.make:62: recipe for target 'plugins/epan/s7comm_plus/plugin.c' failed
make[2]: *** [plugins/epan/s7comm_plus/plugin.c] Error 1 CMakeFiles/Makefile2:13896: recipe for target 'plugins/epan/s7comm_plus/CMakeFiles/s7comm_plus.dir/all' failed
make[1]: *** [plugins/epan/s7comm_plus/CMakeFiles/s7comm_plus.dir/all] Error 2 Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Any suggestions? Thanks!
First you are better of to use the CMakeList.txt from the gryphon plugin as your template. Thenit looks like you may have a non UTF8 character in one of your source files(?)
Also note that the S7 dissector is now built in to Wireshark, so why do you need to add the plugin?
I think that s7comm_plus is a new protocol?
Yes, the s7comm implemented in wireshark is an old one. Siemens has updated the protocol and now is called s7comm_plus.
We should try to add comm_plus to Wireshark then.