Python XMLRPC Nessus Error



谁知道为什么我得到这个错误?

我使用http://code.google.com/p/nessusxmlrpc/wiki/HowTo

root@bt:~/NessusXMLRPC-0.21# python newnessusscan.py 
Traceback (most recent call last):
  File "newnessusscan.py", line 6, in <module>
    scan = x.quickScan("MyXMLTestSCan", "192.168.1.100", "Internal Network Scan")
  File "/root/NessusXMLRPC-0.21/NessusXMLRPC.py", line 280, in quickScan
    if type(policies['policy']) is dict:
TypeError: list indices must be integers, not str

我也试过传递一个整数,但是没有这样的运气。

附件是实际模块的代码,有问题:

 if type(policies['policy']) is dict:
            # There appears to be only one configured policy
            policy = policies['policy']
            if policy['policyName'] == policy_name:
                policy_id = policy['policyID']

包含newnessusscan.py的粘贴库链接:http://pastebin.com/Bd2Zsw49

这是由nessusxmlrpc-py中的错误引起的。

您可以应用补丁或下载NessusXMLRPC.py的更正版本

相关内容

  • 没有找到相关文章

最新更新