通过控制台启动scapy或导入时,Python(2.7)不断崩溃 [英] Python(2.7) keeps crashing when launching scapy via console or importing it

查看:165
本文介绍了通过控制台启动scapy或导入时,Python(2.7)不断崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论我是否愿意

scapy

Python

from scapy.all import *

它只是使python崩溃.它用什么都不做的经典小条说"Python没有响应".我目前在Win10上.

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.

非常感谢.

推荐答案

好吧,没人回答,但我终于弄清楚了,所以在奇怪的情况下,有人最终陷入了同样的困境,这就是我的解决方法工作:

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:

确保已安装Windows周年纪念更新,并启用beta(或在您阅读本文时不再启用它)Linux bash(快速谷歌搜索将向您展示如何执行此操作,没什么特别的,仅需勾号的选项很少,howtogeek可以帮助您进行搜索的方法有一些指导.

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).

您必须重新启动计算机.然后,您应该能够在Windows上打开ubuntu bash. 转到scapy安装网站,然后转到本地linux "部分.在此之前,我个人卸载了所有其他版本的python,但它可能会卡在2.7.12或w/e中.但是无论如何,我都在其中安装了链接的2.5.然后,运行安装一系列依赖项的命令,如下所示:

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

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

然后去下载最新版本的scapi,目前是2.3.1.解压缩它,在bash中导航到目的地,然后使用sudo python setup.py安装它.

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.

现在它可以正常工作,如果仅使用"scapy"运行它就可以了,但会告诉您tcpdump出现路径问题或未安装.如果使用sudo运行它,则不会出现该问题.

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.

由于Microsoft尚未正确设置批处理的问题,Scapy遇到了一些问题,因为某些目标位置无法到达.我以为最终可能会修补(或一个希望?).

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?).

这篇关于通过控制台启动scapy或导入时,Python(2.7)不断崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆