From 9494eca514edcf027df91ae4b6aff6d15561a544 Mon Sep 17 00:00:00 2001 From: Martin Gallo Date: Thu, 20 Aug 2020 12:07:22 -0700 Subject: [PATCH] Arrange Raw import as in scapy>=2.4 Similar to what was reported in https://github.com/gelim/sap_ms/pull/2, in Scapy >= 2.4, the `Raw` class is no longer available in `scapy.layers.inet` and instead it should be imported from where it is defined `scapy.packet`. --- SAPanonGWv2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SAPanonGWv2.py b/SAPanonGWv2.py index 852d1cb..e80e2b4 100644 --- a/SAPanonGWv2.py +++ b/SAPanonGWv2.py @@ -7,8 +7,8 @@ from pysap.SAPNI import SAPNI, SAPNIStreamSocket from pysap.SAPDiag import SAPDiag, SAPDiagItem from scapy.supersocket import StreamSocket -from scapy.layers.inet import TCP, Raw -from scapy.packet import bind_layers +from scapy.layers.inet import TCP +from scapy.packet import bind_layers, Raw from scapy.all import hexdump, raw from scapy.config import conf from struct import *