Code Monkey home page Code Monkey logo

pcap2uml's Introduction

pcap2uml

IMS Call flow visualizer for HTTP, SIP, Diameter, GSM MAP and CAMEL protocols

This program can parse inpur pcap and generate result in plantuml format.

Project page: https://github.com/dgudtsov/pcap2uml

Uses pyshark library: http://kiminewt.github.io/pyshark/
and plantuml sequence diagram: http://plantuml.com/

Prerequisite

Python 2 version >= 2.6
Python 3 is not supported

pyshark library https://github.com/KimiNewt/pyshark

To install it:
pip install pyshark

Plantuml: http://plantuml.com/download

Configure

edit conf/conf_uml.py file:

  1. define 'participants' dict
  2. define 'uml_intro'
  3. define plantuml library and java path in JAVA_BIN and plantuml_jar params

Usage

run:
./pcap2uml.py -i input.pcap -o out.uml -y filter -t format

where:
input.pcap - source pcap (mandatory)
out.uml - result diagram in PlanUML format (optional, default is ./out.uml)
filter - wireshark view filter (optional, default = 'sip||sccp||diameter||http')
format - png,svg,eps,pdf (optional)

As a result, plantuml diagram will be generated.
If you have defined -t option, then appropriate document will be generated as well along with uml source

Then, to generate graphical version of diagram, run (if you didn't define -t option):
java -jar plantuml.jar -tpng out.uml

The plantuml will generate out.png in result.

Usage notice

If you didn't define all parties in 'participants' dict in conf/conf_uml.py file, then program will dump list of undefined participants for you. You can copy that list and paste it into configuration file and then fill it values with appropriate names.

Please note about filter syntax. It should be escaped and do not contains whitespaces, e.g.: sip.Call-ID=="0feX8451416300Q3beGhEfIgAke@SIP"\|\|sip.Call-ID=="0050569E78EF-554c-acc81700-becf6-588f3c46-495a"

Advanced usage

You can edit 'proto_formatter' dict in conf/conf_uml.py and define there any field from protocol that you want. Before adding new header line, please ensure the same line defined in 'headers' dict. Because only headers defined in 'headers' dict are considered.

pcap2uml's People

Contributors

dgudtsov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.