stephenfewer / grinder

Grinder is a system to automate the fuzzing of web browsers and the management of a large number of crashes.
BSD 3-Clause "New" or "Revised" License
415 stars 131 forks source link

Any way to debug "Error, Failed to parse the xml crash log file" message #19

Closed debasishm89 closed 10 years ago

debasishm89 commented 10 years ago

I have written a custom fuzzer for grinder. But I'm getting Error, Failed to parse the xml crash log file error message when generating POC html. I'm not sure whether I've done any silly mistake when logging the fuzzing activities or not. So,I'm unable to track this error down.

So I wanted to know whether I can debug this error message in any way and fix this .log file and generate POC html from that log?

screenshot at 2013-12-19 00 59 41

Thanks in Advance! Debasish

mutfuzz commented 10 years ago

probably you need simply to close the fuzzer tag at the end of you .log file do this open the .log file and add < /fuzzer > (without the spaces) to the end of the log file if it was not there already

debasishm89 commented 10 years ago

Solved this issue using python. Used one python xml parser lib. to parse that xml log file . It actually gives verbose error message, and pointed out in line which line the error is. Like below,

debasish@debasish:~/Desktop$ python grinder.py Traceback (most recent call last): File "grinder.py", line 2, in tree = ET.parse("D4DCB7D5.693E83FF.log") File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1177, in parse tree.parse(source, parser) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 653, in parse parser.feed(data) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1624, in feed self._raiseerror(v) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1488, in _raiseerror raise err xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 8531

Actually, I was using few special characters in my fuzzer and those special characters were responsible for breaking the ruby xml parser. :) After removing them it worked smoothly.

Debasish https://twitter.com/debasishm89

stephenfewer commented 10 years ago

Glad you solved the issue!