dradis Framework Forumsdradis General ForumsUser extensions and pluginsNessus Web import (svn + 2.5 release)
Pages: [1]
Print
Author Topic: Nessus Web import (svn + 2.5 release)  (Read 1568 times)
raesene
Newbie
*
Posts: 9


View Profile Email
« on: February 07, 2010, 03:12:21 pm »

Hi,

I'm hitting a bug importing data from nessus (v4.2).  when I try to import a .nessus file, I get the error

undefined method 'text' for nil:NilClass.

Looking at the stack trace the relevant lines would seem to be.

dradis-2.5/server/vendor/plugins/nessus_upload/lib/nessus_upload/filters.rb:34:in `parse_xml_output'
dradis-2.5/server/vendor/plugins/nessus_upload/lib/nessus_upload/filters.rb:26:in `each'
dradis-2.5/server/vendor/plugins/nessus_upload/lib/nessus_upload/filters.rb:26:in `parse_xml_output'
dradis-2.5/server/vendor/plugins/nessus_upload/lib/nessus_upload/filters.rb:78:in `import

I had a look at the .nessus file and the code and it seems to be complaining about "host.elements['num_ports'].text .  For all the other lines in that section of the code it's possible to find the element of the hash (eg, HostName, os_name, startTime), but for the .nessus files I've got there's no entry for num_ports.

Modifying line 34 to look lik

      if host.elements['num_ports']
         current_host.open_ports   = host.elements['num_ports'].text
      else
         current_host.open_ports = 0
      end

does resolve the issue for me, so that may be a reasonable fix if the num_ports element is showing up in other .nessus files (not sure if it's maybe a v3 vs v4 thing?)

Cheers

Rory
Logged

etd
dradis Core Team
Jr. Member
*****
Posts: 91



View Profile Email
« Reply #1 on: February 16, 2010, 09:10:08 am »

Hi Rory,

thanks for your patch. I will let you know as soon as we commit the change to the repo.

Regards,

Daniel
Logged

etd
dradis Core Team
Jr. Member
*****
Posts: 91



View Profile Email
« Reply #2 on: February 18, 2010, 09:51:05 pm »

Hi Rory,

thanks for your patch. I will let you know as soon as we commit the change to the repo.

Updated: Patch is commited in r1927
Regards,

Daniel
Logged

jcwiekalo
Newbie
*
Posts: 2


View Profile Email
« Reply #3 on: March 06, 2010, 11:55:30 pm »

This is probably not the appropriate place for my question so I apologize.

How do I update my version of Dradis so the Nessus web import works?

Thanks.
Logged

etd
dradis Core Team
Jr. Member
*****
Posts: 91



View Profile Email
« Reply #4 on: March 07, 2010, 10:00:02 pm »

Hi jcwiekalo,

The bug discussed in this thread was patched in release 2.5.1.

Regards,

Daniel
Logged

jcwiekalo
Newbie
*
Posts: 2


View Profile Email
« Reply #5 on: March 09, 2010, 03:25:11 am »

I understand, but don't know how to use svn to update my system. That's what I'm trying to figure out. Help or guidance is appreciated.
Logged

etd
dradis Core Team
Jr. Member
*****
Posts: 91



View Profile Email
« Reply #6 on: March 09, 2010, 08:07:21 pm »

Hi jcwiekalo,

If you are running Linux/BSD, you can download the package for 2.5.1 from the download page. In windows you can uninstall 2.5.0 and install 2.5.1.

If you want to use the latest stable release I would recommend you point your subversion the the release branch for 2.5.x, for example:

Code:
cd /tmp/
mkidr dradis-2.5
cd dradis-2.5
svn co https://dradis.svn.sourceforge.net/svnroot/dradis/server/branches/RB-2.5/ server
cd server
cp config/database.yml.template config/database.yml
rake dradis:reset

Whenever we release 2.5.2, you will just need to go to that folder and svn update and you will autamtically be in the latest version.

Whenever we release 2.6, you will to upgrade your installation or follow the same process but pointing to RB-2.6 instead.

I am not sure if this info is what you were after, please let me know if it helps,

Daniel
Logged

Pages: [1]
Print
Jump to: