Skip to content

Packets / ICMP / Capture

Back to the Command Index

This category contains examples using ImpactPacket / ImpactDecoder. These are separate from the SMB/RPC Structure system: parent-child links between layer objects produce wire data through get_packet(). sniff.py / split.py import pcapy directly, although it is not a distribution dependency.

When using raw sockets or live capture, pay attention to permissions and the handling of third-party traffic.

CommandSummary
ping.pyA small example that sends ICMP Echo through a raw IPv4 socket using Impacket packet structures.
ping6.pyA small example that sends ICMPv6 Echo using Impacket IPv6/ICMPv6 structures.
sniff.pyCaptures packets with libpcap, then decodes and displays them according to the link-layer format.
sniffer.pyReceives IP packets through a raw socket without libpcap and displays them with Impacket decoders.
split.pyReads a pcap file and splits IPv4 TCP conversations into separate files by source and destination.