Scapy.all import * does not work

后端 未结 5 1006
遥遥无期
遥遥无期 2021-01-11 11:10

So, I wrote a little script in Ubuntu for scapy.

#!/usr/bin/env python
import sys
#from scapy.all import *
try 
   import scapy
   except ImportError:
              


        
5条回答
  •  [愿得一人]
    2021-01-11 11:56

    I like to add something to @Daniel answer. Your real problem is not scapy package. Your real problem is in your python file name. Don't ever use library name or its contents as your file name.

    In your case, your file name is scapy.py. After that you import scappy. In here you accidentally call your python file as object in your code there for your compiler can't understand which type(file or library) to call. There for that error was appeared.

提交回复
热议问题