hammackj / risu

Risu is Nessus parser, that converts the generated reports into a ActiveRecord database, this allows for easy report generation and vulnerability verification.
http://hammackj.github.io/risu
MIT License
63 stars 20 forks source link

ruby error with assets.rb template #4

Closed ebdavison closed 13 years ago

ebdavison commented 13 years ago

I am receiving an error when trying to use assets.rb template. I do not get this with the other ones and am not a ruby programmer so do not know where to start:

Error: private method gsub' called for nil:NilClass ./bin/../lib/nessusdb/prawn_templater.rb:32:ingenerate' (eval):17:in sort' (eval):17:ingenerate' /var/lib/gems/1.8/gems/prawn-core-0.8.4/lib/prawn/document.rb:238:in eval' ./bin/../lib/nessusdb/prawn_templater.rb:32:ingenerate' /var/lib/gems/1.8/gems/prawn-core-0.8.4/lib/prawn/document.rb:238:in instance_eval' /var/lib/gems/1.8/gems/prawn-core-0.8.4/lib/prawn/document.rb:238:ininitialize' /var/lib/gems/1.8/gems/prawn-core-0.8.4/lib/prawn/document.rb:130:in new' /var/lib/gems/1.8/gems/prawn-core-0.8.4/lib/prawn/document.rb:130:ingenerate' ./bin/../lib/nessusdb/prawn_templater.rb:31:in generate' bin/nessusdb:218:inmain' bin/nessusdb:229

hammackj commented 13 years ago

I am taking a look at this. It looks like I fixed it in 1.2, but I haven't released that version yet. If you comment out line 17 in the assets.rb, by placing a # on the beginning of the line. This will allow you to generate the report but the assets will not be sorted.

The problem seems to be that you have a host without an IP in the database? Could you verify that?

I am releasing 1.2 sometime next week, which should address this.

ebdavison commented 13 years ago

Yes, there were 61 without IP but the name was the IP.

I went ahead and updated ip where it was null to the name (as that was the IP anyway) and then assets.rb worked just fine. I will keep in mind if I run into this again.

Maybe this is something to do with the import that needs to be addressed?

ebdavison commented 13 years ago

Oh, BTW. Thank you very much for responding so quickly! I like what I see here so far and think it will be a useful tool. Now, only if I knew ruby so I could add more templates ...

hammackj commented 13 years ago

I will look at the not sure, what happens on a scan to get a null ip. I will have a more robust fix for this next release.

I am building a template language, so that one template can generate pdf/word/excel/etc documents. Just taking longer than I thought.

hammackj commented 13 years ago

v1.2 was release and this should be fixed.