Skip to main content

This package prints and sniffs the packets.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PacketAnalysis-1.1.0.tar.gz (19.5 kB view details)

Uploaded Source

File details

Details for the file PacketAnalysis-1.1.0.tar.gz.

File metadata

  • Download URL: PacketAnalysis-1.1.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/58.2.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.9

File hashes

Hashes for PacketAnalysis-1.1.0.tar.gz
Algorithm Hash digest
SHA256 3e9e59181bfd439e6c8b1845e272ba3a33c5895fb2aa080d31bc781e0ce0ad9f
MD5 a4cf761c8e9ce930c3b44833a1e4985d
BLAKE2b-256 9f26aed69a51b68f09dffb149056d0dd8838ad71afab46f4473860aa6275035b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page