Giter Club home page Giter Club logo

802.15.4-to-netjson's Introduction

802.15.4 to netJSON

A tool to visualize 802.15.4 PCAP file turning it to netJSON, can be useful for Zigbee, Thread. It uses the two layers including a destination and source short address, Command and Data layers. Visualization thank to netJSONgraph. This Python script runs into Python 3.7 or newer as it uses dataclass.

doc/network-example.png

netJSON

NetJSON is a data interchange format based on JSON designed to ease the development of software tools for computer networks.

NetJSON defines several types of JSON objects and the manner in which they are combined to represent a network: configuration of devices, monitoring data, network topology and routing information.

Described in their website https://netjson.org/

This format comes with many tools to visualize the data. Here is used netJSONgraph https://github.com/openwisp/netjsongraph.js for the html visualization.

Scapy

Scapy is the library used to parse the input PCAP.

Scapy is a powerful interactive packet manipulation program. It is able to forge or decode packets of a wide number of protocols, send them on the wire, capture them, match requests and replies, and much more. It can easily handle most classical tasks like scanning, tracerouting, probing, unit tests, attacks or network discovery (it can replace hping, 85% of nmap, arpspoof, arp-sk, arping, tcpdump, tshark, p0f, etc.).

It is the unique dependency of this library.

install the dependency

In your shell or console:

python -m pip install -r requirements.txt

Usage

Just need the PCAP filepath as input, can be piped. A --zigbee token can be added to get read of the broadcast communication for a clearer view. As per the specification all the nodes above 0xfff7 are reserved for broadcast communication and will be removed. The --serve token serve the netJSONgraph view of the netJSON opened in the browser at http://localhost:8005/:

python 802dot15dot4-to-netjson.py <PCAP filepath> --zigbee --serve

To just create the netJSON file remove the --serve token:

python 802dot15dot4-to-netjson.py <PCAP filepath>

Optional argument --min and --max specify the first and last packet to analyze.

Start analysis frame 1000:

python 802dot15dot4-to-netjson.py <PCAP filepath> --min=1000

From beginning till frame 1000:

python 802dot15dot4-to-netjson.py <PCAP filepath> --max=1000

From frame 1000 to 2000:

python 802dot15dot4-to-netjson.py <PCAP filepath> --min=1000 --max=2000

802.15.4-to-netjson's People

Contributors

phe-sto avatar

Stargazers

 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.