Python scapy import error

前端 未结 8 901
小蘑菇
小蘑菇 2021-01-17 14:38

If I include following line in my python source file

from scapy.all import *

I get this error

from scapy.all import *
Impor         


        
8条回答
  •  無奈伤痛
    2021-01-17 14:45

    I think there was a change is scapy somewhere. I put the following code in my scapy projects so it remains compatible.

    try:
        import scapy
    except ImportError:
        del scapy
        from scapy import all as scapy
    

提交回复
热议问题