Nmap Import fails

I imported a nmap xml file and the dradis parser responded:

[13:18:54] Small attachment detected. Processing in line.
[13:18:54] Parsing Nmap output from ~/dradis-ce/attachments/3/<ip_removed>nmap.xml...
[13:18:54] Done.
[13:18:54] Validating Nmap output...
[13:18:54] Done.
[13:18:55] New host: <ip_revmoved>
[13:18:55] There was a fatal error processing your upload:
[13:18:55] No such file or directory @ rb_file_s_mtime - /root/dradis-ce/templates/plugins/nmap/host.template
[13:18:55] /var/lib/gems/2.3.0/gems/dradis-plugins-3.5.0/lib/dradis/plugins/template_service.rb:74:in `mtime'
[13:18:55] /var/lib/gems/2.3.0/gems/dradis-plugins-3.5.0/lib/dradis/plugins/template_service.rb:74:in `template_source'
[13:18:55] /var/lib/gems/2.3.0/gems/dradis-plugins-3.5.0/lib/dradis/plugins/template_service.rb:20:in `process_template'
[13:18:55] /var/lib/gems/2.3.0/gems/dradis-nmap-3.1.0/lib/dradis/plugins/nmap/importer.rb:40:in `block in import'
[13:18:56] /var/lib/gems/2.3.0/gems/ruby-nmap-0.9.2/lib/nmap/xml.rb:289:in `block in each_host'
[13:18:56] /var/lib/gems/2.3.0/gems/nokogiri-1.6.8/lib/nokogiri/xml/node_set.rb:187:in `block in each'
[13:18:56] /var/lib/gems/2.3.0/gems/nokogiri-1.6.8/lib/nokogiri/xml/node_set.rb:186:in `upto'
[13:18:56] /var/lib/gems/2.3.0/gems/nokogiri-1.6.8/lib/nokogiri/xml/node_set.rb:186:in `each'
[13:18:56] /var/lib/gems/2.3.0/gems/ruby-nmap-0.9.2/lib/nmap/xml.rb:288:in `each_host'
[13:18:57] /var/lib/gems/2.3.0/gems/dradis-nmap-3.1.0/lib/dradis/plugins/nmap/importer.rb:29:in `import'
[13:18:57] /root/dradis-ce/app/controllers/upload_controller.rb:93:in `process_upload_inline'
[13:18:57] Worker process completed.

I can confirm that the installation did not create /root/dradis-ce/templates/ or any subfolder within. What can I do?

Update:
The Setup Script in dradis-ce create a lot of directories on the same level as dradis-ce:
~/dradis# ls -1
dradis-acunetix
dradis-brakeman
dradis-burp
dradis-calculator_cvss
dradis-calculator_dread
dradis-ce
dradis-csv
dradis-html_export
dradis-mediawiki
dradis-metasploit
dradis-nessus
dradis-nexpose
dradis-nikto
dradis-nmap
…
In dradis-nmap exists a “templates” folder with a hosts file, but it’s in the completely wrong folder… has the Setup script a bug?

Solution:

Edit:
Gemfile.plugins
Gemfile.plugins.template

Point both files to the dradis-nmap folder.

  • bundle install
  • restart dradis
  • works
1 Like