Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Contrib: Code: SimplisticARPMonitor

Pierre LALET edited this pageJan 17, 2016 ·1 revision

Simplistic ARP Monitor

This program uses thesniff() callback (paramterprn). Thestoreparameter is set to 0 so thatsniff() will not store anything (as itwould do otherwise) and thus can run forever. Thefilter parameteris used for better performances on high load: the filter is appliedinside the kernel and Scapy will only see ARP traffic.

#! /usr/bin/env pythonfromscapyimport*defarp_monitor_callback(pkt):ifARPinpktandpkt[ARP].opin (1,2):#who-has or is-atreturnpkt.sprintf("%ARP.hwsrc% %ARP.psrc%")sniff(prn=arp_monitor_callback,filter="arp",store=0)

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp