Python XMLRPC Nessus Error

Does anyone know why I am getting this error?

I am using 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 

I tried passing an integer, but there was no such luck.

Attached code from the actual module that has the problem:

  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'] 

Link to pastebin newnessusscan.py enters: http://pastebin.com/Bd2Zsw49

+4
source share
1 answer

This is caused by an error in nessusxmlrpc-py.

You can apply the patch or download the patched version of NessusXMLRPC.py .

+2
source

Source: https://habr.com/ru/post/1389302/


All Articles