From 62803a0ecc68b890d7803ef319f2a6ffffd6f3c9 Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Mon, 5 Feb 2018 09:45:24 +0530 Subject: scapy: update to 2.3.3 Drop patch included in update. Signed-off-by: Armin Kuster --- .../scapy/scapy/scapy-Pickling-issues-fixed.patch | 111 --------------------- recipes-security/scapy/scapy_2.3.2.bb | 25 ----- recipes-security/scapy/scapy_2.3.3.bb | 24 +++++ 3 files changed, 24 insertions(+), 136 deletions(-) delete mode 100644 recipes-security/scapy/scapy/scapy-Pickling-issues-fixed.patch delete mode 100644 recipes-security/scapy/scapy_2.3.2.bb create mode 100644 recipes-security/scapy/scapy_2.3.3.bb diff --git a/recipes-security/scapy/scapy/scapy-Pickling-issues-fixed.patch b/recipes-security/scapy/scapy/scapy-Pickling-issues-fixed.patch deleted file mode 100644 index 9901f91..0000000 --- a/recipes-security/scapy/scapy/scapy-Pickling-issues-fixed.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 331dff6c73f89307d108f9ae89264b9548e22dc6 Mon Sep 17 00:00:00 2001 -From: Guillaume Valadon -Date: Wed, 31 Aug 2016 13:59:21 +0200 -Subject: [PATCH] Pickling issues fixed - -Backport from: -https://github.com/secdev/scapy/pull/284 - -Upstream-Status: Backport - -Signed-off-by: Jackie Huang ---- - scapy/layers/inet.py | 6 ++++-- - scapy/layers/inet6.py | 4 +++- - scapy/layers/l2.py | 14 +++++++++----- - scapy/route.py | 1 - - 4 files changed, 16 insertions(+), 9 deletions(-) - -diff --git a/scapy/layers/inet.py b/scapy/layers/inet.py -index 4b66946..e35a247 100644 ---- a/scapy/layers/inet.py -+++ b/scapy/layers/inet.py -@@ -734,8 +734,10 @@ conf.l3types.register(ETH_P_IP, IP) - conf.l3types.register_num2layer(ETH_P_ALL, IP) - - --conf.neighbor.register_l3(Ether, IP, lambda l2,l3: getmacbyip(l3.dst)) --conf.neighbor.register_l3(Dot3, IP, lambda l2,l3: getmacbyip(l3.dst)) -+def inet_register_l3(l2, l3): -+ return getmacbyip(l3.dst) -+conf.neighbor.register_l3(Ether, IP, inet_register_l3) -+conf.neighbor.register_l3(Dot3, IP, inet_register_l3) - - - ################### -diff --git a/scapy/layers/inet6.py b/scapy/layers/inet6.py -index ba5674c..195ca9c 100644 ---- a/scapy/layers/inet6.py -+++ b/scapy/layers/inet6.py -@@ -474,7 +474,9 @@ class IPv6(_IPv6GuessPayload, Packet, IPTools): - return self.payload.answers(other.payload) - - --conf.neighbor.register_l3(Ether, IPv6, lambda l2,l3: getmacbyip6(l3.dst)) -+def inet6_register_l3(l2, l3): -+ return getmacbyip6(l3.dst) -+conf.neighbor.register_l3(Ether, IPv6, inet6_register_l3) - - - class IPerror6(IPv6): -diff --git a/scapy/layers/l2.py b/scapy/layers/l2.py -index 3d88961..47fa386 100644 ---- a/scapy/layers/l2.py -+++ b/scapy/layers/l2.py -@@ -183,8 +183,10 @@ class LLC(Packet): - XByteField("ssap", 0x00), - ByteField("ctrl", 0) ] - --conf.neighbor.register_l3(Ether, LLC, lambda l2,l3: conf.neighbor.resolve(l2,l3.payload)) --conf.neighbor.register_l3(Dot3, LLC, lambda l2,l3: conf.neighbor.resolve(l2,l3.payload)) -+def l2_register_l3(l2, l3): -+ return conf.neighbor.resolve(l2, l3.payload) -+conf.neighbor.register_l3(Ether, LLC, l2_register_l3) -+conf.neighbor.register_l3(Dot3, LLC, l2_register_l3) - - - class CookedLinux(Packet): -@@ -203,7 +205,7 @@ class SNAP(Packet): - fields_desc = [ X3BytesField("OUI",0x000000), - XShortEnumField("code", 0x000, ETHER_TYPES) ] - --conf.neighbor.register_l3(Dot3, SNAP, lambda l2,l3: conf.neighbor.resolve(l2,l3.payload)) -+conf.neighbor.register_l3(Dot3, SNAP, l2_register_l3) - - - class Dot1Q(Packet): -@@ -236,7 +238,7 @@ class Dot1Q(Packet): - return self.sprintf("802.1q (%Dot1Q.type%) vlan %Dot1Q.vlan%") - - --conf.neighbor.register_l3(Ether, Dot1Q, lambda l2,l3: conf.neighbor.resolve(l2,l3.payload)) -+conf.neighbor.register_l3(Ether, Dot1Q, l2_register_l3) - - class STP(Packet): - name = "Spanning Tree Protocol" -@@ -351,7 +353,9 @@ class ARP(Packet): - else: - return self.sprintf("ARP %op% %psrc% > %pdst%") - --conf.neighbor.register_l3(Ether, ARP, lambda l2,l3: getmacbyip(l3.pdst)) -+def l2_register_l3_arp(l2, l3): -+ return getmacbyip(l3.pdst) -+conf.neighbor.register_l3(Ether, ARP, l2_register_l3_arp) - - class GRErouting(Packet): - name = "GRE routing informations" -diff --git a/scapy/route.py b/scapy/route.py -index 52a9562..4bd27b7 100644 ---- a/scapy/route.py -+++ b/scapy/route.py -@@ -20,7 +20,6 @@ from error import Scapy_Exception,warning - class Route: - def __init__(self): - self.resync() -- self.s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - self.cache = {} - - def invalidate_cache(self): --- -2.8.3 - diff --git a/recipes-security/scapy/scapy_2.3.2.bb b/recipes-security/scapy/scapy_2.3.2.bb deleted file mode 100644 index 2965c72..0000000 --- a/recipes-security/scapy/scapy_2.3.2.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "Network scanning and manipulation tool" -DESCRIPTION = "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. It can easily handle most classical tasks like scanning, tracerouting, probing, unit tests, attacks or network discovery (it can replace hping, 85% of nmap, arpspoof, arp-sk, arping, tcpdump, tethereal, p0f, etc.). It also performs very well at a lot of other specific tasks that most other tools can't handle, like sending invalid frames, injecting your own 802.11 frames, combining technics (VLAN hopping+ARP cache poisoning, VOIP decoding on WEP encrypted channel, ...), etc." -SECTION = "security" -LICENSE = "GPLv2" - -LIC_FILES_CHKSUM = "file://bin/scapy;beginline=9;endline=13;md5=1d5249872cc54cd4ca3d3879262d0c69" - -SRC_URI = "https://github.com/secdev/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \ - file://run-ptest \ - file://scapy-Pickling-issues-fixed.patch \ -" - -SRC_URI[md5sum] = "00f11df3d6b46fe6ac306efd757486f9" -SRC_URI[sha256sum] = "1b8a86d687feb8ed01114c0c016b428674cbfec04e3eb6f5249a018c427c4f6a" - -inherit setuptools ptest - -do_install_ptest() { - install -m 0644 ${S}/test/regression.uts ${D}${PTEST_PATH} - sed -i 's,@PTEST_PATH@,${PTEST_PATH},' ${D}${PTEST_PATH}/run-ptest -} - -RDEPENDS_${PN} = "tcpdump python-subprocess python-compression python-netclient \ - python-netserver python-pydoc python-pkgutil python-shell \ - python-threading python-numbers python-pycrypto" diff --git a/recipes-security/scapy/scapy_2.3.3.bb b/recipes-security/scapy/scapy_2.3.3.bb new file mode 100644 index 0000000..1c8685b --- /dev/null +++ b/recipes-security/scapy/scapy_2.3.3.bb @@ -0,0 +1,24 @@ +SUMMARY = "Network scanning and manipulation tool" +DESCRIPTION = "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. It can easily handle most classical tasks like scanning, tracerouting, probing, unit tests, attacks or network discovery (it can replace hping, 85% of nmap, arpspoof, arp-sk, arping, tcpdump, tethereal, p0f, etc.). It also performs very well at a lot of other specific tasks that most other tools can't handle, like sending invalid frames, injecting your own 802.11 frames, combining technics (VLAN hopping+ARP cache poisoning, VOIP decoding on WEP encrypted channel, ...), etc." +SECTION = "security" +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "file://bin/scapy;beginline=9;endline=13;md5=1d5249872cc54cd4ca3d3879262d0c69" + +SRC_URI = "https://github.com/secdev/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \ + file://run-ptest \ +" + +SRC_URI[md5sum] = "336d6832110efcf79ad30c9856ef5842" +SRC_URI[sha256sum] = "67642cf7b806e02daeddd588577588caebddc3426db7904e7999a0b0334a63b5" + +inherit setuptools ptest + +do_install_ptest() { + install -m 0644 ${S}/test/regression.uts ${D}${PTEST_PATH} + sed -i 's,@PTEST_PATH@,${PTEST_PATH},' ${D}${PTEST_PATH}/run-ptest +} + +RDEPENDS_${PN} = "tcpdump python-subprocess python-compression python-netclient \ + python-netserver python-pydoc python-pkgutil python-shell \ + python-threading python-numbers python-pycrypto" -- cgit v1.2.3-54-g00ecf