pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/scapy add scapy-1.0.0, a Python shell for network ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/27465b37a35b
branches: trunk
changeset: 498022:27465b37a35b
user: drochner <drochner%pkgsrc.org@localhost>
date: Wed Aug 10 13:54:58 2005 +0000
description:
add scapy-1.0.0, a Python shell for network packet construction, injection
and capture
diffstat:
net/scapy/DESCR | 3 +
net/scapy/Makefile | 25 +++++++++++++++
net/scapy/PLIST | 3 +
net/scapy/distinfo | 6 +++
net/scapy/patches/patch-aa | 74 ++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 111 insertions(+), 0 deletions(-)
diffs (131 lines):
diff -r bfcd35b827c5 -r 27465b37a35b net/scapy/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/scapy/DESCR Wed Aug 10 13:54:58 2005 +0000
@@ -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 -r bfcd35b827c5 -r 27465b37a35b net/scapy/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/scapy/Makefile Wed Aug 10 13:54:58 2005 +0000
@@ -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@localhost
+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 -r bfcd35b827c5 -r 27465b37a35b net/scapy/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/scapy/PLIST Wed Aug 10 13:54:58 2005 +0000
@@ -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 -r bfcd35b827c5 -r 27465b37a35b net/scapy/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/scapy/distinfo Wed Aug 10 13:54:58 2005 +0000
@@ -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 -r bfcd35b827c5 -r 27465b37a35b net/scapy/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/scapy/patches/patch-aa Wed Aug 10 13:54:58 2005 +0000
@@ -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:
Home |
Main Index |
Thread Index |
Old Index