Python(2.7) keeps crashing when launching scapy via console or importing it

断了今生、忘了曾经 提交于 2019-12-12 01:22:33

问题


Regardless of if I do

scapy

or

Python

from scapy.all import *

it simply crashes python. It says "Python is not responding" with the classic little bar that does nothing. I'm currently on Win10.

There's only one other person that I found had this problem, and nobody bothered to answer him, couldn't find anything else about this. I've tried multiple installers from differently packaged ones. No can do. I'm about to go raving mad.

Many thanks in advance.


回答1:


Well, nobody put an answer, but I finally figured it out, so in the oddball chance someone ends up in the same predicament, here's how I got it to work:

Make sure the anniversary update for windows is installed, and enable the beta(or not anymore by the time your read this?) linux bash (a quick googling will show you how to do this, nothing special to do, just a few options to tick, howtogeek has a little guide if it can help you search).

You'll have to restart your computer. You should then be able to open an ubuntu bash on windows. Go to to the scapy installation website, and go to the "native linux" part. I personally uninstalled all other versions of python prior to this, but it might of stuck with 2.7.12 or w/e. But in any case, I installed the 2.5 that is linked in there. Then, ran the command that installs a bunch of dependencies looking something like this:

$ sudo apt-get install tcpdump graphviz imagemagick python-gnuplot python-crypto python-pyx

then went to download the lastest version of scapi, which, at this current time, is 2.3.1. Unzip it, navigate to the destination in your bash, and sudo python setup.py install it.

It now works just fine, if you simply run it with "scapy" it'll work but tell you tcpdump has a path problem or isn't installed. if you run it with sudo, you won't have that issue.

Anyways, figured I appreciated when people left solutions behind, so here's me doing my part - answering my own darn question.

EDIT: Due to microsoft problems with their not yet correctly set up batch, scapy has a few issues because some destinations are not reachable. I'm assuming that might be patched eventually (or one hopes?).




回答2:


Use this to install in terminal:

sudo apt-get install tcpdump graphvix python-gnuplot python-crypt python-pyx


来源:https://stackoverflow.com/questions/38926728/python2-7-keeps-crashing-when-launching-scapy-via-console-or-importing-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!