Giter Site home page Giter Site logo

mauricelambert / packetanalysis Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 98 KB

This package implement Packet Analysis with network sniffer or pcap file reader.

License: GNU General Public License v3.0

Python 100.00%
pypi-package python3 network network-analysis network-programming scapy sniffer pcap

packetanalysis's Introduction

PacketAnalysis logo

PacketAnalysis

Description

This package prints and sniffs the packets.

Requirements

This package require:

  • python3
  • python3 Standard Library
  • Scapy

Installation

pip install PacketAnalysis

Examples

Command lines

python3 -m PacketAnalysis
python3 -m PacketAnalysis.Sniffer
python3 PacketAnalysis.pyz
PacketAnalysis -h
PacketAnalysis --help
PacketAnalysis
PacketAnalysis -v -H -s -d -D -p -r -i -f "tcp port 80 or udp" -S capture.pcap -I 172.16.10.
PacketAnalysis -R capture.pcap

Python3

from PacketAnalysis import PacketPrinter, Sniffer

sniffer = Sniffer(PacketPrinter())
sniffer.start()
sniffer.stop()

sniffer = Sniffer(PacketPrinter(), "tcp port 80 or udp", "capture.pcap", None, "172.16.10.")

sniffer = Sniffer(PacketPrinter(), filetoread="capture.pcap")

Links

Help

usage: PacketAnalysis.pyz [-h] [--verbose] [--no-hexa-printer] [--summary-printer] [--details-printer] [--details2-printer] [--python-printer] [--raw-printer] [--info-printer] [--filter FILTER]
                          [--savefilename SAVEFILENAME] [--packet-file PACKET_FILE] [--iface IFACE]

optional arguments:
  -h, --help            show this help message and exit
  --verbose, -v         Mode verbose (print debug message)
  --no-hexa-printer, -H
                        Do not print the hexadecimal packet
  --summary-printer, -s
                        Print the packet summary
  --details-printer, -d
                        Print packet details
  --details2-printer, -D
                        Print packet details type 2
  --python-printer, -p  Print the scapy command to build the package.
  --raw-printer, -r     Print raw packet
  --info-printer, -i    Print packet information
  --filter FILTER, -f FILTER
                        Scapy filter to select packets
  --savefilename SAVEFILENAME, -S SAVEFILENAME
                        Pcap file to save packets
  --packet-file PACKET_FILE, -R PACKET_FILE
                        Pcap file to read for analysis
  --iface IFACE, -I IFACE
                        Part of the IP, MAC or name of the interface

Licence

Licensed under the GPL, version 3.

packetanalysis's People

Contributors

mauricelambert avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

jtalverson

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.