Coder Social home page Coder Social logo

fibexconverter's Introduction

FibexConverter

Convert SOME/IP config in FIBEX 4 to different configuration formats (e.g. Wireshark).

Convert a FIBEX4 file to text:

Just call it like this:

python3 configuration_to_text.py FIBEX example-file.xml

The result will be:

example-file/text/example-file.txt

Convert a FIBEX4 file to wireshark configs:

Just call it like this:

python3 configuration_to_wireshark_config.py FIBEX example-file.xml

The results (hosts, vlanids, SOMEIP...) will be in:

example-file/wireshark/

Copy the result files to your wireshark configuration directory (e.g. ~/.config/wireshark for MacOS X or %appdata%\Wireshark for Windows).

Important:

  • SOME/IP support was added to Wireshark 3.2, you need a custom plugin before.
  • Wireshark loads the config on start. So you better stop Wireshark while copying the configs in.

Convert a FIBEX4 file to CSV reports:

Just call it like this:

python3 configuration_to_reports.py FIBEX example-file.xml

The result will be:

example-file/reports/

fibexconverter's People

Contributors

larsvoelker avatar vanhauser-thc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fibexconverter's Issues

TypeError: 'NoneType' object is not subscriptable

Hi,
I tried to convert the example Some/IP FIBEX configuration file from vector to wireshark config using the Fibex Converter tool.
I got the below error

TypeError: 'NoneType' object is not subscriptable

Is it a problem with my FIBEX file ? I can't able to clearly see where is the error . The same file is working fine in the CANoe simulation.

Please have a look at the attached error log file for more information
error.txt

I have also attached my FIBEX file too. I attached it as text file, you can change the extension to xml if you want to try it
FBX4_VECTOR_SOME_IP_MM.txt

dependency `isodate` really needed?

I was wondering whether non-standard library dependency isodate is really needed by running

python3 configuration_to_text.py FIBEX example-file.xml

and

python3 configuration_to_wireshark_config.py FIBEX example-file.xml

for one example fibex file with the following patch:

diff --git a/abstract_parser.py b/abstract_parser.py
index 73a2d93..82bd564 100644
--- a/abstract_parser.py
+++ b/abstract_parser.py
@@ -19,7 +19,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-import isodate
+#import isodate
 
 
 class AbstractParser(object):
@@ -99,4 +99,4 @@ class AbstractParser(object):
         s = self.get_child_text(element, childtag)
         if s is None:
             return -1
-        return (isodate.parse_duration(s)).total_seconds()
+        raise NotImplementedError

and it worked without issues.

So the question is whether we can get rid of this dependency?

module name `parser` clashes with Python standard lib module

According to https://docs.python.org/3.8/library/parser.html#module-parser module name parser i.e. parser.py is already taken by Python standard lib.

Because of that statements like

https://github.com/LarsVoelker/FibexConverter/blob/34d51b0/configuration_to_wireshark_config.py#L26

might result in unexpected outcome.
As you use from parser import * problem is not immediately recognized at import statement , but later on Python interpreter might complain about e.g. name 'parse_input_files' is not defined, because it actually used another file for this module.

See also https://chrisyeh96.github.io/2017/08/08/definitive-guide-python-imports.html#basics-of-the-python-import-and-syspath for details in which order imports are resolved.

Would it be possible to create github releases?

I'd like to use your tool (btw. kudos for that!) in order to generate wireshark configs in order to decode SOME/IP payload.

However, in order to use it in our build system it would be easier to reference a release of your repo (i.e. a tarball with all the sources of this release/tag) instead of a specific commit. See docs for details.

Would it be possible to create releases in this repo? For now it would be sufficient to do that once.

FIBEX4 Example File for SOME/IP

Hello,
it would be great if you could add a FIBEX 4 example File for creating a Wireshark Config File. I need it for your Wireshark 3.2 SOME/IP plugin. Or just a general guide how to set up payload dissection with the new SOME/IP plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.