diff options
author | drochner <drochner@pkgsrc.org> | 2005-08-10 13:54:58 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2005-08-10 13:54:58 +0000 |
commit | ae5670997bc77491d312f8fa1168278dde2e5967 (patch) | |
tree | 38f67828747b511b1003d3a6ea5e0ee08fb62259 /net | |
parent | c533014cf9bd488f73e4cdd340aac4ca465fcf90 (diff) | |
download | pkgsrc-ae5670997bc77491d312f8fa1168278dde2e5967.tar.gz |
add scapy-1.0.0, a Python shell for network packet construction, injection
and capture
Diffstat (limited to 'net')
-rw-r--r-- | net/scapy/DESCR | 3 | ||||
-rw-r--r-- | net/scapy/Makefile | 25 | ||||
-rw-r--r-- | net/scapy/PLIST | 3 | ||||
-rw-r--r-- | net/scapy/distinfo | 6 | ||||
-rw-r--r-- | net/scapy/patches/patch-aa | 74 |
5 files changed, 111 insertions, 0 deletions
diff --git a/net/scapy/DESCR b/net/scapy/DESCR new file mode 100644 index 00000000000..af12af2757d --- /dev/null +++ b/net/scapy/DESCR @@ -0,0 +1,3 @@ +Scapy is a powerful interactive packet manipulation program. It is able +to forge or decode packets of a wide number of protocols, send them on +the wire, capture them, match requests and replies, and much more. diff --git a/net/scapy/Makefile b/net/scapy/Makefile new file mode 100644 index 00000000000..fe02ae1636d --- /dev/null +++ b/net/scapy/Makefile @@ -0,0 +1,25 @@ +# $NetBSD: Makefile,v 1.1.1.1 2005/08/10 13:54:58 drochner Exp $ +# + +DISTNAME= scapy-1.0.0 +CATEGORIES= net +MASTER_SITES= http://www.secdev.org/projects/scapy/files/ + +MAINTAINER= tech-pkg@NetBSD.org +HOMEPAGE= http://www.secdev.org/projects/scapy/ +COMMENT= Interactive packet manipulation program + +NO_BUILD= yes +PYTHON_VERSIONS_ACCEPTED= 23 24 +PYTHON_PATCH_SCRIPTS= scapy.py +MANCOMPRESSED= yes + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/scapy.py ${PREFIX}/bin/scapy + ${INSTALL_MAN} ${WRKSRC}/scapy.1.gz ${PREFIX}/man/man1 + +.include "../../lang/python/application.mk" +.include "../../net/py-libpcap/buildlink3.mk" +.include "../../net/py-libdnet/buildlink3.mk" +.include "../../devel/py-readline/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/net/scapy/PLIST b/net/scapy/PLIST new file mode 100644 index 00000000000..829fdfcc136 --- /dev/null +++ b/net/scapy/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2005/08/10 13:54:58 drochner Exp $ +bin/scapy +man/man1/scapy.1 diff --git a/net/scapy/distinfo b/net/scapy/distinfo new file mode 100644 index 00000000000..59b5676d751 --- /dev/null +++ b/net/scapy/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1.1.1 2005/08/10 13:54:58 drochner Exp $ + +SHA1 (scapy-1.0.0.tar.gz) = f851c3bda22cb52727509cf3a7a699578dabe940 +RMD160 (scapy-1.0.0.tar.gz) = 53ed9f326f42e6979410a149e63468921e0b9bae +Size (scapy-1.0.0.tar.gz) = 90189 bytes +SHA1 (patch-aa) = cb202d1a32d670c78a39c2059371ac1443c8b9a3 diff --git a/net/scapy/patches/patch-aa b/net/scapy/patches/patch-aa new file mode 100644 index 00000000000..e1711136c66 --- /dev/null +++ b/net/scapy/patches/patch-aa @@ -0,0 +1,74 @@ +$NetBSD: patch-aa,v 1.1.1.1 2005/08/10 13:54:58 drochner Exp $ + +--- scapy.py.orig 2005-08-09 20:30:34.000000000 +0200 ++++ scapy.py +@@ -1,4 +1,4 @@ +-#! /usr/bin/env python ++#!/usr/pkg/bin/python2.3 + + ############################################################################# + ## ## +@@ -888,7 +888,7 @@ except ImportError: + + + LINUX=sys.platform.startswith("linux") +-OPENBSD=sys.platform.startswith("openbsd") ++OPENBSD=sys.platform.startswith("openbsd") or sys.platform.startswith("netbsd") + + if LINUX: + DNET=PCAP=0 +@@ -1357,8 +1357,8 @@ if PCAP: + def get_working_if(): + try: + return pcap.lookupdev() +- except pcap.pcapc.EXCEPTION: +- return 'lo' ++ except: ++ return 'lo0' + + def attach_filter(s, filter): + warning("attach_filter() should not be called in PCAP mode") +@@ -6298,9 +6298,10 @@ class L3dnetSocket(SuperSocket): + warning("Unable to guess datalink type (interface=%s linktype=%i). Using Ethernet" % (self.iface, ll)) + cls = Ether + +- pkt = None +- while pkt is None: ## This fix a probable bug in libpcap/wrapper, that returns None while there is no read timeout +- pkt = self.ins.next()[1] ++ trypkt = None ++ while trypkt is None: ## This fix a probable bug in libpcap/wrapper, that returns None while there is no read timeout ++ trypkt = self.ins.next() ++ pkt = trypkt[1] + + try: + pkt = cls(pkt) +@@ -6342,9 +6343,11 @@ class L2dnetSocket(SuperSocket): + warning("Unable to guess datalink type (interface=%s linktype=%i). Using Ethernet" % (self.iface, ll)) + cls = Ether + +- pkt = None +- while pkt is None: ## This fix a probable bug in libpcap/wrapper, that returns None while there is no read timeout +- pkt = self.ins.next()[1] ++ trypkt = None ++ while trypkt is None: ## This fix a probable bug in libpcap/wrapper, that returns None while there is no read timeout ++ trypkt = self.ins.next() ++ pkt = trypkt[1] ++ + try: + pkt = cls(pkt) + except: +@@ -6399,9 +6402,11 @@ class L2pcapListenSocket(SuperSocket): + warning("Unable to guess datalink type (interface=%s linktype=%i). Using Ethernet" % (self.iface, ll)) + cls = Ether + +- pkt = None +- while pkt is None: ## This fix a probable bug in libpcap/wrapper, that returns None while there is no read timeout +- pkt = self.ins.next()[1] ++ trypkt = None ++ while trypkt is None: ## This fix a probable bug in libpcap/wrapper, that returns None while there is no read timeout ++ trypkt = self.ins.next() ++ pkt = trypkt[1] ++ + try: + pkt = cls(pkt) + except: |