summaryrefslogtreecommitdiff
path: root/net/scapy
diff options
context:
space:
mode:
authordrochner <drochner>2005-08-10 13:54:58 +0000
committerdrochner <drochner>2005-08-10 13:54:58 +0000
commita50999126261549c57666b8742427105e612307e (patch)
tree38f67828747b511b1003d3a6ea5e0ee08fb62259 /net/scapy
parent8e5f757344677c67a620730eebef3e6f6bc8f5c3 (diff)
downloadpkgsrc-a50999126261549c57666b8742427105e612307e.tar.gz
add scapy-1.0.0, a Python shell for network packet construction, injection
and capture
Diffstat (limited to 'net/scapy')
-rw-r--r--net/scapy/DESCR3
-rw-r--r--net/scapy/Makefile25
-rw-r--r--net/scapy/PLIST3
-rw-r--r--net/scapy/distinfo6
-rw-r--r--net/scapy/patches/patch-aa74
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: