V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
master13
V2EX  ›  Python

我就想不明白了, scapy 这么好用,为什么 libdnet 那么难装!

  •  
  •   master13 · 2015-10-29 16:48:21 +08:00 · 2740 次点击
    这是一个创建于 3094 天前的主题,其中的信息可能已经有所发展或是发生改变。

    要在 Windows 上装这个东西,烦死了

    Scapy 是啥

    这玩意需要一堆必备东西,其中有个 libdnet 。这个东西真是醉了,用pip install libdnet根本找不到这玩意,上网搜了半天也只找到 5 年前的版本。 Scapy 官网教程指定说code.google.com/p/libdnet可以下载,费老半天劲科学上网过去,竟然直接重定向到GitHub.com!这个工程里最老的文件都 11 年前了,比我爷爷的爷爷还要大

    各位看客,以及看客中的大牛,以及看客中的喷子们,这么牛逼的东西就没有一个完整的教程来指导我们安装吗?
    另外,pydnetlibdnet是什么关系,能替代吗?

    14 条回复    2016-05-26 15:31:43 +08:00
    masterqing
        1
    masterqing  
       2015-10-29 17:46:41 +08:00 via Android
    用 Linux 不就好了
    Owenjia
        2
    Owenjia  
       2015-10-29 18:15:06 +08:00
    libdnet 好像是可选依赖吧?应该不装也能用的。
    至于 libdnet 用 pypi 上找不到……这个不是 python 的库。

    本来想说官网上安装手册挺详细的,但是瞅了眼官网上的安装手册, WindowsInstallationGuide 页面 404 了……


    题外话:你爷爷的爷爷多大?
    thinkqob
        3
    thinkqob  
       2015-10-29 22:25:59 +08:00
    看成 scrapy 。。。
    beordle
        4
    beordle  
       2015-10-30 00:52:06 +08:00
    为何不用 pcap..
    master13
        5
    master13  
    OP
       2015-10-30 09:09:01 +08:00
    @Owenjia 装好 scapy 后, from scapy.all import *,可以看到有一部分是依赖 libdnet 的

    题外话:-*-
    master13
        6
    master13  
    OP
       2015-10-30 09:09:35 +08:00
    @beordle pypcap 是 scapy 的必备项之一
    est
        7
    est  
       2015-10-30 09:09:49 +08:00
    libdnet 是构造 IP 包的。相当碉堡的工具。
    master13
        8
    master13  
    OP
       2015-10-30 09:10:22 +08:00
    @thinkqob scrapy , scipy , scapy ,傻傻分不清楚
    master13
        9
    master13  
    OP
       2015-10-30 09:10:50 +08:00
    @masterqing windows 已撕
    Owenjia
        10
    Owenjia  
       2015-10-30 12:41:00 +08:00
    @master13
    看了下我这里,好像开了 tcpreplay 这个 USE flag 才会依赖 libdnet 。
    上面对这个 USE flag 的解释是 Enable net-analyzer/tcpreply support for fast packet replay 。

    GitHub 上那个 libdnet 你试过了没?能安装么?
    master13
        11
    master13  
    OP
       2015-10-30 14:32:47 +08:00
    @Owenjia GitHub 那个源码,需要在 windows 平台上面重新编译的,我用 VC9.0+ for python2.7 的 CL 编译了一下,并没有成功,网上说要用 MinGW ,我并没有尝试。
    网上广泛流传着 dnet-1.12.win32-py2.7.exe ,一件傻瓜安装,其实就是拷了个编译好的 pyd 和 egg 到 Lib 里,这种傻瓜模式适合我这种傻瓜……
    honmaple
        12
    honmaple  
       2015-10-30 16:15:48 +08:00
    我也看成 scrapy 了
    master13
        13
    master13  
    OP
       2015-10-30 16:48:17 +08:00
    @honmaple 爬虫改变世界
    moogle
        14
    moogle  
       2016-05-26 15:31:43 +08:00
    我把 python2.7 下的 scapy 搞定了,但是 3.5 版本的没搞定。启动 scapy 时出现以下错误:
    INFO: Can't import PyX. Won't be able to use psdump() or pdfdump().
    WARNING: Windows support for scapy3k is currently in testing. Sniffing/sending/receiving packets should be working with WinPcap driver and Powershell. Create issues at https://github.com/phaethon/scapy
    Traceback (most recent call last):
    File "C:\Anaconda3\Scripts\\scapy", line 25, in <module>
    interact()
    File "C:\Anaconda3\lib\site-packages\scapy\main.py", line 293, in interact
    scapy_builtins = __import__("scapy.all",globals(),locals(),".").__dict__
    File "C:\Anaconda3\lib\site-packages\scapy\all.py", line 16, in <module>
    from .arch import *
    File "C:\Anaconda3\lib\site-packages\scapy\arch\__init__.py", line 88, in <module>
    from .windows import *
    File "C:\Anaconda3\lib\site-packages\scapy\arch\windows\__init__.py", line 198, in <module>
    ifaces.load_from_powershell()
    File "C:\Anaconda3\lib\site-packages\scapy\arch\windows\__init__.py", line 149, in load_from_powershell
    for i in get_windows_if_list():
    File "C:\Anaconda3\lib\site-packages\scapy\arch\windows\__init__.py", line 85, in get_windows_if_list
    name, value = [ j.strip() for j in i.split(b':') ]
    ValueError: too many values to unpack (expected 2)
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5618 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 02:03 · PVG 10:03 · LAX 19:03 · JFK 22:03
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.