Python scapy nmap_fp“AttributeError:'list'对象没有属性'res'”

时间:2017-10-17 13:53:26

标签: python scapy

我有一个非常简单的python脚本,试图从nmap_fp

测试scapy模块
from scapy.all import *
ip = 'just.an.ip.range'
print(nmap_fp(ip))

现在,当我跑步时,我得到以下错误:

Begin emission:
...Finished to send 8 packets.
*......
Received 10 packets, got 1 answers, remaining 7 packets
Traceback (most recent call last):
  File "scapy_.py", line 7, in <module>
    ans = nmap_fp(my_phone_ip_2)
  File "/usr/lib/python2.7/dist-packages/scapy/modules/nmap.py", line 189, in nmap_fp
    sigs = nmap_sig(target, oport, cport)
  File "/usr/lib/python2.7/dist-packages/scapy/modules/nmap.py", line 144, in nmap_sig
    ans += map(lambda x: (x,None), unans)
  File "/usr/lib/python2.7/dist-packages/scapy/plist.py", line 89, in _add_
    return self.__class__(self.res+other.res,
AttributeError: 'list' object has no attribute 'res'

修改

使用scapy Version: 2.3.3

1 个答案:

答案 0 :(得分:0)

您应该升级到当前的development version,因为自上次发布以来,一些与Nmap相关的问题已得到修复。您还需要使用以前版本的Nmap指纹。