Skip to main content

This module sniffs network communications without any requirements

Project description

NetworkSniffer logo

NetworkSniffer

Description

This module sniffs network communications without any requirements (without scapy/npcap/winpcap).

Requirements

This package require:

  • python3
  • python3 Standard Library

Installation

pip install NetworkSniffer

Usages

Command line

python3 -m NetworkSniffer
python3 NetworkSniffer.pyz -x -s -c
NetworkSniffer -x -X -c
NetworkSniffer -x -s -t -c
NetworkSniffer -x -s -u -c
NetworkSniffer -x -s -4 -c
NetworkSniffer -x -s -6 -c
NetworkSniffer -x -s -c -n '192.168.56.0/24'
NetworkSniffer -x -s -c -n '10.0.0.0/8' '192.168.56.0/24'
NetworkSniffer -x -s -c -p 80
NetworkSniffer -x -s -c -p 80 53
NetworkSniffer -x -s -c -m '00:00:00:00:00:00'
NetworkSniffer -x -s -c -m '00:00:00:00:00:00' '08:00:27:b1:9d:67'
NetworkSniffer -x -s -c -i '192.168.56.101'
NetworkSniffer -x -s -c -i '192.168.56.101' '10.0.2.15'
NetworkSniffer -c -l 20
NetworkSniffer -x -s -f 'test.txt'

Python script

from NetworkSniffer import *

sniffer = Sniffer(
    [('192.168.0.47', 0), ('192.168.56.1', 0)],
    [('fe80:0000:0000:0000:6cc8:2732:3de4:496b', 0, 0, 18)],
    (summary, hexadecimal),
)
sniffer.sniff() 

SnifferFilters = new_class(
    "SnifferFilters",
    (TcpFilter, Sniffer),
    {},
)
sniffer = SnifferFilters(
    [('192.168.0.47', 0), ('192.168.56.1', 0)],
    [('fe80:0000:0000:0000:6cc8:2732:3de4:496b', 0, 0, 18)],
    (summary, hexadecimal),
    tcp_filter=True,
)
sniffer.sniff() 

ipv4_addresses, ipv6_addresses = get_addresses()
sniffer = Sniffer(
    ipv4_addresses,
    ipv6_addresses,
    (raw,),
)
sniffer.sniff() 

Links

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

NetworkSniffer-0.0.1.tar.gz (26.6 kB view details)

Uploaded Source

File details

Details for the file NetworkSniffer-0.0.1.tar.gz.

File metadata

  • Download URL: NetworkSniffer-0.0.1.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for NetworkSniffer-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0e0d123cb6ba7313a238ef7e355ad36094b8e6bf92c75163b318bc4a105a3682
MD5 6a16fd0d18eabdedad4a7c53aaa543bb
BLAKE2b-256 0f26045cf3ab546d8ed3ec07e8b73fdc9c945f9902121abc6fa26620a6b72924

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