Skip to content

gns24/scapy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a fork of scapy (http://www.secdev.org) to make it compatible with python3. Fork based on scapy v2.3.1
All tests from regression (758 tests), ipsec, and both other test suites pass. I could go through whole tutorial series Building Network Tools with Scapy by @thepacketgeek (http://thepacketgeek.com/series/building-network-tools-with-scapy/) using scapy-python3.

Install with 'python3 setup.py install' from source tree or 'pip3 install scapy-python3' for latest published version.

N.B.! As a difference from scapy for python2, use bytes() instead of str() for most cases. Also, most arguments expect bytes value instead of str value.

All commands listed by lsc() should work. Tested layers are:
  - ARP
  - DHCP
  - DHCPv6
  - DNS
  - Dot3
  - Dot11
  - Ether
  - ICMP
  - ICMPv6
  - IP
  - IPv6
  - LLC
  - NTP
  - Padding
  - PPP
  - Raw
  - SCTP
  - SNAP
  - SNMP
  - STP
  - TCP
  - TFTP
  - UDP

Currently, works on Linux, Darwin, Unix and co. Using python 3.4 on Ubuntu and FreeBSD for testing. Windows support in progress.

On all OS except Linux libpcap should be installed for sending and receiving packets (not python modules - just C libraries). libdnet is recommended for sending packets, without libdnet packets will be sent by libpcap, which is limited. Also, netifaces module can be used for alternative and possibly cleaner way to determine local addresses.

Please, submit all issues https://github.com/phaethon/scapy preferrably with .pcap files for tests. Bugs for individual layers are usually easy to fix.

winpcapy.py by Massimo Ciani https://code.google.com/p/winpcapy/ integrated inside code

About

Fork of scapy with python3 compatibility

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%