且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过控制台启动scapy或导入时,Python(2.7)不断崩溃

更新时间:2022-11-26 11:07:12

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

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