Update scapy to 1.1.1 and add some patches needed to make it more reliable.

OK jasper@
This commit is contained in:
claudio 2007-05-05 14:23:18 +00:00
parent 6b44bc04de
commit a071d37e46
3 changed files with 45 additions and 9 deletions

View File

@ -1,9 +1,8 @@
# $OpenBSD: Makefile,v 1.2 2006/06/03 09:43:03 alek Exp $
# $OpenBSD: Makefile,v 1.3 2007/05/05 14:23:18 claudio Exp $
COMMENT= "powerful interactive packet manipulation in python"
DISTNAME= scapy-1.0.4
PKGNAME= ${DISTNAME}p0
DISTNAME= scapy-1.1.1
CATEGORIES= net
HOMEPAGE= http://secdev.org/projects/scapy/
@ -30,7 +29,6 @@ PKG_ARCH= *
NO_REGRESS= Yes
do-build:
gunzip < ${WRKSRC}/scapy.1.gz > ${WRKBUILD}/scapy.1
perl -p -i -e "s,^(\#\S+ \S+ )python\$$,#!${MODPY_BIN}," \
${WRKSRC}/*.py
perl -p -i -e "s,/etc/ethertypes,${SYSCONFDIR}/ethertypes,g" \

View File

@ -1,10 +1,10 @@
MD5 (ethertypes) = lL/96PdaG4+JH7eAv+Fcog==
MD5 (scapy-1.0.4.tar.gz) = wVZmjPq0wf3idvgeC4W12Q==
MD5 (scapy-1.1.1.tar.gz) = iscgob6kMEeXxxPvHtBj8Q==
RMD160 (ethertypes) = KWuI/tkRslOYtfZXzWu1yR5y4og=
RMD160 (scapy-1.0.4.tar.gz) = JhhUgEL2Ww0CRhYj/s6T1MJYiVk=
RMD160 (scapy-1.1.1.tar.gz) = IL2x6lmgX0UqUV5DjiMOHYW4EBY=
SHA1 (ethertypes) = btD+JEZmaHbXe4lx/Y7fSVqcC+M=
SHA1 (scapy-1.0.4.tar.gz) = q+fMJCr08g7wFlV4AOLlIcLhShs=
SHA1 (scapy-1.1.1.tar.gz) = hw2o5uKoeGsDoAVfwswdExfzCOQ=
SHA256 (ethertypes) = 4UAHHkYt+Kq597Y6OWW/IGeX7Lz/M0o+xJQlbe/jXcs=
SHA256 (scapy-1.0.4.tar.gz) = NAvrsmu/jLN728+3uN+SJa04Sgs/CzO1XKC4umyaOwI=
SHA256 (scapy-1.1.1.tar.gz) = KhG6BfNLKXivOt1iOmQeA0DTkyK0yivSa6rnQ8eN6VY=
SIZE (ethertypes) = 1317
SIZE (scapy-1.0.4.tar.gz) = 132677
SIZE (scapy-1.1.1.tar.gz) = 147401

View File

@ -0,0 +1,38 @@
$OpenBSD: patch-scapy_py,v 1.1 2007/05/05 14:23:18 claudio Exp $
--- scapy.py.orig Mon Apr 9 15:17:35 2007
+++ scapy.py Sat May 5 15:59:19 2007
@@ -1152,7 +1152,7 @@ if not LINUX:
dest,mask,gw,netif,mxfrg,rtt,ref,flg = l.split()[:8]
else:
if mtu_present:
- dest,gw,flg,ref,use,mtu,netif = l.split()[:7]
+ dest,gw,flg,ref,use,mtu,netif = l.split(None, 6)[:7]
else:
dest,gw,flg,ref,use,netif = l.split()[:6]
if flg.find("Lc") >= 0:
@@ -1172,6 +1172,8 @@ if not LINUX:
dest, = struct.unpack("I",inet_aton(dest))
if not "G" in flg:
gw = '0.0.0.0'
+ if 'L' in netif:
+ _,netif = netif.split()
ifaddr = get_if_addr(netif)
routes.append((dest,netmask,gw,netif,ifaddr))
f.close()
@@ -9847,7 +9849,8 @@ class PcapWriter:
"""
if self.header_done == 0:
- if self.linktype == None:
+ linktype = self.linktype
+ if linktype == None:
if isinstance(pkt,Packet):
linktype = LLNumTypes.get(pkt.__class__,1)
else:
@@ -12190,4 +12193,5 @@ def read_config_file(configfile):
if __name__ == "__main__":
interact()
else:
- read_config_file(DEFAULT_CONFIG_FILE)
+ if DEFAULT_CONFIG_FILE:
+ read_config_file(DEFAULT_CONFIG_FILE)