Я пытаюсь использовать Scapy для прослушивания сетевых пакетов HTTPS.Я уже установил scapy_ssl_tls :
Requirement already satisfied: scapy-ssl_tls in path\python36\lib\site-packages (2.0.0)
Requirement already satisfied: pycryptodomex>=3.4 in path\python36\lib\site-packages (from scapy-ssl_tls) (3.7.3)
Requirement already satisfied: scapy==2.4.* in path\python36\lib\site-packages (from scapy-ssl_tls) (2.4.2)
Requirement already satisfied: tinyec>=0.3.1 in path\python36\lib\site-packages (from scapy-ssl_tls) (0.3.1)
, но когда я пробую этот фрагмент:
from scapy_ssl_tls.ssl_tls import TLS
У меня есть это исключение:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "path\Python36\lib\site-packages\scapy_ssl_tls\ssl_tls.py", line 8, in <module>
from scapy.layers import x509
File "path\Python36\lib\site-packages\scapy\layers\x509.py", line 31, in <module>
class ASN1P_OID(ASN1_Packet):
File "path\Python36\lib\site-packages\scapy\layers\x509.py", line 33, in ASN1P_OID
ASN1_root = ASN1F_OID("oid", "0")
File "path\Python36\lib\site-packages\scapy\asn1fields.py", line 55, in __init__
self.default = self.ASN1_tag.asn1_object(default)
File "path\Python36\lib\site-packages\scapy\asn1\asn1.py", line 120, in asn1_object
return self._asn1_obj(val)
File "path\Python36\lib\site-packages\scapy\asn1\asn1.py", line 403, in __init__
val = conf.mib._oid(plain_str(val))
AttributeError: 'Conf' object has no attribute 'mib'
Я уже пробовал использовать Python 2.7, и когда я запускаю ту же команду, вывод:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "path\Python27\lib\site-packages\scapy_ssl_tls\ssl_tls.py", line 7, in <module>
from scapy.layers.inet import TCP, UDP
File "path\Python27\lib\site-packages\scapy\layers\inet.py", line 14, in <module>
from scapy.layers.l2 import *
File "path\Python27\lib\site-packages\scapy\layers\l2.py", line 14, in <module>
from scapy.ansmachine import *
File "path\Python27\lib\site-packages\scapy\ansmachine.py", line 14, in <module>
from sendrecv import send,sendp,sniff
File "path\Python27\lib\site-packages\scapy\sendrecv.py", line 13, in <module>
import arch
File "path\Python27\lib\site-packages\scapy\arch\__init__.py", line 80, in <module>
from windows import *
File "path\Python27\lib\site-packages\scapy\arch\windows\__init__.py", line 17, in <module>
from scapy.sendrecv import debug, srp1
ImportError: cannot import name debug
Может кто-нибудь помочь мне или они могут предложить другой способ прослушивания пакетов https из сети, используяscapy