Python XMLRPC Nessus 错误

标签 python xml-rpc nessus

有人知道我为什么会收到此错误吗?

我正在使用 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 的 pastebin 的链接: http://pastebin.com/Bd2Zsw49

最佳答案

这是由 error 引起的在 nessusxmlrpc-py 中。

您可以申请 patchdownload the corrected version NessusXMLRPC.py

关于Python XMLRPC Nessus 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8729499/

相关文章:

python - 将文本文件附加到文本文件

python - Tensorflow v1.14 中的梯度裁剪错误

security - OpenVAS:CLI 漏洞扫描 [CentOS]

rest - 无法使用Nessus 7 Professional自动进行扫描

python - 在 python 中从其他 3 个数据帧创建一个数据帧

python - 请帮助我理解 python 类与实例变量

javascript - 如何读取 XML-RPC 响应

Python SimpleXMLRPCServer : get user IP and simple authentication

python - 使用 Python 的基于 Web 的向导

security - 如何登录 Nessus 中的网页并执行 SecTest?