10.08.2015 Views

Packet generation and network based attacks with Scapy - SecDev.org

Packet generation and network based attacks with Scapy - SecDev.org

Packet generation and network based attacks with Scapy - SecDev.org

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ReferencesExternal scriptExternal script#! /usr/bin/env pythonimport sysi f len ( sys . argv ) != 2:print "Usage:␣arping␣\n␣eg:␣arping␣192.168.1.0/24"sys . exit (1)from scapy import srp , Ether ,ARP, confconf . verb=0ans , unans=srp ( Ether ( dst="ff:ff:ff:ff:ff:ff")/ARP( pdst=sys . argv [ 1 ] ) ,timeout=2)for s , r in ans :print r . s p r i n t f ("%Ether.src%␣%ARP.psrc%")Philippe BIONDI<strong>Packet</strong> <strong>generation</strong> <strong>and</strong> <strong>network</strong> <strong>based</strong> <strong>attacks</strong> <strong>with</strong> <strong>Scapy</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!