List Info

Thread: UPDATE: net/scapy to version 1.1.1




UPDATE: net/scapy to version 1.1.1
user name
2007-04-26 11:16:35
This diff brings the scapy port to the newest version.
This is needed to make scapy6 work -- I'll create a port for
that too.

I had to fix a few issues -- grrr grumble. Lesson to learn:
never try to
parse netstat output assuming that you can simply split it
to seven
fields! Locked MTU entries add a 8 field and interfaces with
the name 'L'
will not work on OpenBSD. Took me about 1-2 hours of head
scratching to
understand why scapy suddenly crashed on startup.

Before aplying the diff you need to "mkdir
patches"
-- 
:wq Claudio

Index: Makefile
============================================================
=======
RCS file: /cvs/ports/net/scapy/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile	3 Jun 2006 09:43:03 -0000	1.2
+++ Makefile	25 Apr 2007 22:16:34 -0000
 -2,8
+2,7 
 
 COMMENT=	"powerful interactive packet manipulation in
python"
 
-DISTNAME=	scapy-1.0.4
-PKGNAME=	$p0
+DISTNAME=	scapy-1.1.1
 CATEGORIES=	net
 
 HOMEPAGE=	http://secdev.org/p
rojects/scapy/
 -30,7
+29,6  PKG_ARCH=	*
 NO_REGRESS=	Yes
 
 do-build:
-	gunzip < $/scapy.1.gz > $/scapy.1
 	perl -p -i -e "s,^(#S+ S+
)python$$,#!$," 
 		$/*.py
 	perl -p -i -e
"s,/etc/ethertypes,$/ethertypes,g" 
Index: distinfo
============================================================
=======
RCS file: /cvs/ports/net/scapy/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo	5 Apr 2007 16:20:15 -0000	1.2
+++ distinfo	25 Apr 2007 22:15:40 -0000
 -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
--- /dev/null	Thu Apr 26 18:03:28 2007
+++ patches/patch-scapy_py	Thu Apr 26 17:56:07 2007
 -0,0
+1,28 
+$OpenBSD$
+--- scapy.py.orig	Mon Apr  9 15:17:35 2007
++++ scapy.py	Thu Apr 26 17:54:43 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 netif.find("L") >= 0:
++		dummy,netif = netif.split()
+             ifaddr = get_if_addr(netif)
+             routes.append((dest,netmask,gw,netif,ifaddr))
+         f.close()
+ -12190,4 +12190,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)


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )