Ask Your Question
0

Plugin compiling problems

asked 2019-03-12 11:36:44 +0000

jeskudero gravatar image

updated 2019-03-12 21:17:27 +0000

Guy Harris gravatar image

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!

edit retag flag offensive close merge delete

Comments

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(?)

Anders gravatar imageAnders ( 2019-03-12 12:31:31 +0000 )edit

Also note that the S7 dissector is now built in to Wireshark, so why do you need to add the plugin?

grahamb gravatar imagegrahamb ( 2019-03-12 14:15:43 +0000 )edit

I think that s7comm_plus is a new protocol?

Anders gravatar imageAnders ( 2019-03-12 14:57:37 +0000 )edit

Yes, the s7comm implemented in wireshark is an old one. Siemens has updated the protocol and now is called s7comm_plus.

jeskudero gravatar imagejeskudero ( 2019-03-12 14:59:36 +0000 )edit

We should try to add comm_plus to Wireshark then.

grahamb gravatar imagegrahamb ( 2019-03-12 16:12:58 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-12 13:59:16 +0000

Anders gravatar image

I downloaded the files from https://sourceforge.net/p/s7commwires... and built them out of the box on Windows after putting them in plugins/epan/7comm_plus and adding the directory to CmakeLists.txt

edit flag offensive delete link more

Comments

Ok, so the problems is in my Linux distro. I read a lot about the "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position xxx" but i cant figure it to work

jeskudero gravatar imagejeskudero ( 2019-03-12 15:01:07 +0000 )edit

Definitely it was my fault, I've downloaded again the files and I've compiled them without problem. Thanks

jeskudero gravatar imagejeskudero ( 2019-03-12 15:12:20 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-03-12 11:36:44 +0000

Seen: 951 times

Last updated: Mar 12 '19