码迷,mamicode.com
首页 > 系统相关 > 详细

mac上安装scapy遇到的问题

时间:2016-03-26 17:03:58      阅读:2667      评论:0      收藏:0      [点我收藏+]

标签:

在mac上安装scapy可以说是困难重重,一来因为scapy实在有些小众和老旧,再加上安装说明文档都是python2.5 也没有详细说明一些安装问题。

折腾了大概三个小时之后终于解决了这个老大难。

注:我的环境为anaconda2.3 - python2.7.10

 

一,首先scapy依赖了以下几个库:

1.PyX  :   

2.pcapy

3.gnuplot-py

4.dnet 

其中gnuplot-py 以及pyx一定要使用官方网站上面的指定版本。

如果你FQ不方便,请使用我的备份库github: https://github.com/todototry/scapyInstallDependents   

 

二,dnet是个大坑,

1. 需要注意的是dnet不能使用官方版本,需要使用libdnet1.12, 并configure ; make install 逐步安装,一定要记得进入该dnet的python子文件夹安装其对应的python库。

2. 安装好之后请注意检查python的对应site-package中是否有dnet.so 这个文件。

3.如果出现cannot import dnet 可能的原因是:没有安装dnet的依赖库: pip install graphillion 

4. 如果遵照上述方法安装后,任然出现AttributeError: ‘module‘ object has no attribute ‘intf‘, 请使用pip uninstall pydnet , 可能是官网的pydnet 与 libdnet1.12中的python接口冲突引起的。

 

三,如果sniff出现 pcapy权限不足

请卸载pcapy, 用pypcap替代,完美解决pcap权限问题。参见以下

 Scapy “Warning pcapy API does not permit to get capure file descriptor”?

 

参考:

1. 官网:http://www.secdev.org/projects/scapy/doc/installation.html

2. dnet安装与dnet.so 依赖问题,http://stackoverflow.com/questions/26229057/scapy-installation-fails-on-osx-with-dnet-import-error

3. http://juhalaaksonen.com/blog/2013/12/11/installing-scapy-for-mac-os-x/

4. https://github.com/dugsong/libdnet/issues/9

5. AttributeError: ‘module‘ object has no attribute ‘intf‘ 解决方案: https://github.com/Homebrew/homebrew-python/issues/212

 

mac上安装scapy遇到的问题

标签:

原文地址:http://www.cnblogs.com/ToDoToTry/p/5323118.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!