Closed lmcthbe closed 8 years ago
Hello @lmcthbe. We're trying to debug this now. Thanks for reporting the issue!
Doing the change below fix the issue
Regards Thierry
76 def get_hosts(self, tree): 77 """ 78 @return items A list of Host instances 79 """ 80 # for host_node in tree.find('niktoscan').findall('scandetails'): 81 for host_node in tree.findall('scandetails'): 82 yield Host(host_node)
Look into it and I can send a new Pull Request if you like
We have a fix, you do not need to do a pull request. I was going to send a patch right now: p In the next version, this will be resolved.
Thank you for your report and the fix. Regards
Hi,
Processing of nikto 2.1.5 or 2.1.6 output xml file failed with the error below
Attached xml output file nikto-2.1.5.zip
Do you have any user guide for troubleshooting xml parsing issue of faraday plugin? It would be useful to have one.
Regards Thierry
2016-04-15 21:44:08,767 - faraday - INFO - Report file is /home/lmcthbe/.faraday/report/test/nikto-2.1.5.xml 2016-04-15 21:44:08,770 - faraday - INFO - Report type detected: xml 2016-04-15 21:44:08,773 - faraday - INFO - The file is /home/lmcthbe/.faraday/report/test/nikto-2.1.5.xml, nikto 2016-04-15 21:44:08,774 - faraday - INFO - Executing ./nikto /home/lmcthbe/.faraday/report/test/nikto-2.1.5.xml 2016-04-15 21:44:08,967 - faraday.CouchDbConnector - DEBUG - Saving document in couch db
2016-04-15 21:44:08,986 - faraday.CouchDbConnector - DEBUG - Saving document in couch db
2016-04-15 21:44:09,037 - faraday - DEBUG - PluginController (139713150082256) - Created plugin_process (139713139300496) for plugin instance (139713150081744)
2016-04-15 21:44:09,047 - faraday - DEBUG - ----------------------------------------
2016-04-15 21:44:09,049 - faraday - DEBUG - proc_name = PluginProcess-2
2016-04-15 21:44:09,049 - faraday - DEBUG - Starting run method on PluginProcess
2016-04-15 21:44:09,050 - faraday - DEBUG - parent process: 31921
2016-04-15 21:44:09,050 - faraday - DEBUG - process id: 5296
2016-04-15 21:44:09,051 - faraday - DEBUG - ----------------------------------------
2016-04-15 21:44:09,051 - faraday - DEBUG - PluginProcess-2: New Output
2016-04-15 21:44:09,053 - faraday - DEBUG - Plugin Error: Nikto, (5cfe682f866ac961ac46e0eae659c88bd84b25a6)
2016-04-15 21:44:09,053 - faraday - DEBUG - Plugin raised an exception:
2016-04-15 21:44:09,054 - faraday - DEBUG - Traceback (most recent call last):
File "/home/lmcthbe/Downloads/faraday-dev/plugins/core.py", line 817, in run
self.plugin.parseOutputString(output)
File "/home/lmcthbe/.faraday/plugins/nikto/plugin.py", line 310, in parseOutputString
parser = NiktoXmlParser(output)
File "/home/lmcthbe/.faraday/plugins/nikto/plugin.py", line 55, in init
self.hosts = [host for host in self.get_hosts(tree)]
File "/home/lmcthbe/.faraday/plugins/nikto/plugin.py", line 80, in get_hosts
for host_node in tree.find('niktoscan').findall('scandetails'):
AttributeError: 'NoneType' object has no attribute 'findall'
2016-04-15 21:44:09,055 - faraday - DEBUG - PluginProcess-2: Exiting 2016-04-15 21:44:09,055 - faraday - INFO - Plugin finished: Nikto, (5cfe682f866ac961ac46e0eae659c88bd84b25a6) 2016-04-15 21:44:09,056 - faraday - DEBUG - (PluginController) _processAction - 3000 - parameters = [] 2016-04-15 21:44:09,059 - faraday - DEBUG - (PluginController) _processAction - 3001 - parameters = [] 2016-04-15 21:44:09,095 - faraday - DEBUG - _processAction - 3000 - parameters = () 2016-04-15 21:44:09,096 - faraday.ModelController - INFO - Plugin Started 2016-04-15 21:44:09,099 - faraday - DEBUG - Action code 3000 failed. Parameters = () 2016-04-15 21:44:09,102 - faraday - DEBUG - _processAction - 3001 - parameters = () 2016-04-15 21:44:09,105 - faraday.ModelController - INFO - Plugin Ended