scapy坏文件描述符

时间:2014-10-29 20:05:57

标签: python python-2.7 scapy

scapy OSError: [Errno 9] Bad file descriptor 和这家伙一样的错误。在windows.downloded所有的扩展使用python 2.7.5并一步一步地遵循一切。仍然似乎没有工作。每个函数我尝试它是sr1或发送或其他任何我得到此错误OSError:[Errno 9]错误的文件描述符.. 并且它提到了一些scapy脚本中的行(scapy \ sendrecv.pyc作为示例..) 我尝试在解释器中运行的最简单的事情是行不通的。如:

from scapy.all import * 
p=sr1(IP(dst='190.200.2.5')/ICMP())

所以我尝试重新安装这一次,根据他们在网站上提供的指南并使用python 2.6,相同的结果..

>>> p=sr1(IP(dst='192.168.1.1')/ICMP())
ERROR: --- Error sending packets
Traceback (most recent call last):
  File "C:\Python26\lib\site-packages\scapy\arch\windows\__init__.py", line 374, in sndrcv
    pks.send(p)
  File "C:\Python26\lib\site-packages\scapy\arch\pcapdnet.py", line 237, in send
    ifs = dnet.eth(iff)
  File "dnet.pyx", line 112, in dnet.eth.__init__
OSError: Result too large

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in <module>
    p=sr1(IP(dst='192.168.1.1')/ICMP())
  File "C:\Python26\lib\site-packages\scapy\sendrecv.py", line 335, in sr1
    a,b=sndrcv(s,x,*args,**kargs)
  File "C:\Python26\lib\site-packages\scapy\arch\windows\__init__.py", line 431, in sndrcv
    os.write(1, ".")
OSError: [Errno 9] Bad file descriptor

0 个答案:

没有答案