Giter Club home page Giter Club logo

packet_profiler's Introduction

Packet Profiler

A simple script to parse out network traffic into its component distributions. Useful if you want
to break down network elements by percentage.

Usage:

$ ./profiler.py -h
profiler.py
	-c	Number of packets to capture and process.
	-d	Profile a specific destination address.
	-f	Pcap file you want to profile.
	-h	This help output.
	-i	Interface name to listen to.

Example:

$ ./profiler.py -i en0 -c 100
{
    "ipDstIpDist": {
        "142.250.189.133": 1.0,
        "142.250.64.206": 2.0,
        "172.217.2.195": 8.0,
        "172.64.145.85": 10.0,
        "192.168.0.0": 1.0,
        "192.168.0.1": 1.0,
        "192.168.0.5": 1.0,
        "192.168.1.11": 20.0,
        "192.168.1.202": 43.0,
        "192.168.7.255": 2.0,
        "224.0.0.251": 6.0,
        "ff02::fb": 5.0
    },
    "ipLenDist": {
        "106": 1.0,
        "107": 2.0,
        "108": 1.0,
        "120": 1.0,
        "127": 4.0,
        "1278": 2.0,
        "130": 4.0,
        "142": 3.0,
        "147": 1.0,
        "180": 1.0,
        "199": 2.0,
        "258": 1.0,
        "304": 1.0,
        "40": 11.0,
        "405": 1.0,
        "413": 1.0,
        "49": 2.0,
        "52": 19.0,
        "53": 4.0,
        "54": 1.0,
        "551": 1.0,
        "574": 1.0,
        "58": 1.0,
        "596": 1.0,
        "61": 4.0,
        "63": 1.0,
        "638": 1.0,
        "64": 1.0,
        "67": 1.0,
        "75": 2.0,
        "79": 1.0,
        "820": 1.0,
        "92": 1.0,
        "95": 12.0
    },
    "ipProtoDist": {
        "ARP": 3.0,
        "TCP": 62.0,
        "UDP": 35.0
    },
    "ipSrcIpDist": {
        "142.250.189.133": 1.0,
        "142.250.64.206": 3.0,
        "172.217.2.195": 9.0,
        "172.64.145.85": 10.0,
        "192.168.0.4": 1.0,
        "192.168.1.11": 19.0,
        "192.168.1.202": 43.0,
        "192.168.1.225": 2.0,
        "192.168.7.140": 1.0,
        "192.168.7.16": 2.0,
        "192.168.7.64": 4.0,
        "fe80::847:3b90:f11:22f3": 1.0,
        "fe80::8a6:af6e:48c6:5576": 1.0,
        "fe80::ce2:fc06:801a:2282": 3.0
    },
    "ipTtlDist": {
        "1": 1.0,
        "119": 1.0,
        "255": 5.0,
        "54": 10.0,
        "56": 12.0,
        "64": 63.0
    },
    "packets": 100,
    "tcpDestPortDist": {
        "443": 29.0,
        "51116": 10.0,
        "57203": 1.0,
        "57516": 1.0,
        "64677": 2.0,
        "64679": 17.0,
        "902": 2.0
    },
    "tcpFlagDist": {
        "A": 30.0,
        "AP": 31.0,
        "AS": 1.0
    },
    "tcpLengthDist": {
        "0": 31.0,
        "159": 2.0,
        "35": 2.0,
        "353": 1.0,
        "361": 1.0,
        "39": 1.0,
        "43": 9.0,
        "52": 1.0,
        "534": 1.0,
        "55": 4.0,
        "556": 1.0,
        "75": 4.0,
        "78": 4.0
    },
    "tcpSrcPortDist": {
        "443": 28.0,
        "51116": 10.0,
        "57203": 1.0,
        "62078": 1.0,
        "64677": 2.0,
        "64679": 18.0,
        "902": 2.0
    },
    "tcpWinSizeDist": {
        "130": 17.0,
        "2048": 3.0,
        "2051": 10.0,
        "2896": 1.0,
        "340": 1.0,
        "36724": 1.0,
        "36725": 1.0,
        "36732": 2.0,
        "36733": 6.0,
        "512": 2.0,
        "5893": 2.0,
        "5894": 16.0
    },
    "udpDestPortDist": {
        "32412": 1.0,
        "32414": 1.0,
        "443": 10.0,
        "53204": 3.0,
        "5353": 11.0,
        "62266": 9.0
    },
    "udpLengthDist": {
        "100": 1.0,
        "122": 5.0,
        "1258": 2.0,
        "127": 1.0,
        "160": 2.0,
        "238": 2.0,
        "284": 2.0,
        "29": 2.0,
        "33": 4.0,
        "34": 1.0,
        "38": 1.0,
        "41": 4.0,
        "43": 1.0,
        "47": 1.0,
        "531": 1.0,
        "618": 1.0,
        "75": 1.0,
        "800": 1.0,
        "86": 1.0,
        "88": 1.0
    },
    "udpSrcPortDist": {
        "443": 12.0,
        "53204": 2.0,
        "5353": 10.0,
        "57942": 1.0,
        "58875": 1.0,
        "62266": 8.0,
        "65101": 1.0
    }
}

packet_profiler's People

Watchers

Wadih Frederick Khairallah 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.