I use the ruby NMAP::XML class to pick apart the nse output from large scans but it expects the script output to be embedded in hostscript tags.

I have just started using http-drupal-enum script (in view of the recent drupal vulnerability) but the ruby analysis script does not extract the script output.

When I looked at the xml file there were no hostscript tags around the script.

Does anyone know if this is a known problem with this script or how to get the script to add in the tags so the output can be processed with standard tools.

This all may be moot as I find, having run this across our server networks, that it only works with HTTP (not S) and even then it fails to detect some sites known to be running drupal.

  • What's your question? – schroeder Mar 6 '19 at 8:09
  • Is this more of a question for the nmap devs? – schroeder Mar 6 '19 at 8:10

Script output is in a <hostscript> element when the script is running as a host script with a hostrule function. If it is running as a service script with a portrule function, then the output will be nested under the associated <port> element in a <script> element.

| improve this answer | |
  • Doh! I had noticed that it was tagged onto the end of the port detail but the significance escaped me. – Russell Fulton Mar 6 '19 at 21:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.