Closed ebdavison closed 13 years ago
Found the problem. Here is a patch:
88c88
select("items.*").select("count(*) as count_all").joins(:plugin).where("plugin_id != 1").where(:severity => 3).group(:plugin_id).order("count_all DESC").limit(limit)
I don't understand this git markup. I hope you can read that.
1.1 template with 1.2 engine. Please use the 1.2 templates.
How do I do that. I have done a 'git pull' which says it is current at 1.3 and the templates directory is where these files are. How do I get the 1.2 templates if not with a 'git pull'?
Try this I am assuming you are using the system ruby: First update your gems, this will give you nessusdb 1.2
sudo gem update
type nessusdb -v this should output soemthing like this: nessusdb - Nessus Parser and Report Generator v1.2
cd some_project_directory git://github.com/hammackj/nessusdb.git 1.3 cd 1.3 git checkout 1.3
then
nessusdb -t ./lib/nessusdb/templates/TEMPLATE -o output.pdf
this will use 1.2 to on a 1.3 template, all 1.3 templates should work except for the coversheet and that is because in 1.3, I expose the path to the template to the engine. So you will have to change the image path to your logo
You can try ./bin/nessusdb and use the binary from 1.3 but i am not sure that is fully functional yet, as 1.3 is a development branch. the config files for 1.3 are different along with other things.
I did get 1.3 to work finally; I just need to come up to speed with git. Going through the templates for now.
The graphs template still has the same error I already reported in 1.3 as well. Just ran through it and none of the graphs generate due to the 'count()' where it should be 'count(*)'.
I am fixing my copy of item.rb locally to handle for now. There are actually 5 of them that need to be fixed.
I will look into the count(*) not sure why its not working for you.
I am getting the following with the graphs.rb template:
Error: undefined method
number_of_hosts' for #<Class:0xb660fe44> /usr/lib/ruby/gems/1.8/gems/nessusdb-1.2/bin/../lib/nessusdb/prawn_templater.rb:31:in
generate' (eval):19:ingenerate' /usr/lib/ruby/gems/1.8/gems/prawn-core-0.8.4/lib/prawn/document.rb:238:in
eval' /usr/lib/ruby/gems/1.8/gems/nessusdb-1.2/bin/../lib/nessusdb/prawn_templater.rb:31:ingenerate' /usr/lib/ruby/gems/1.8/gems/prawn-core-0.8.4/lib/prawn/document.rb:238:in
instance_eval' /usr/lib/ruby/gems/1.8/gems/prawn-core-0.8.4/lib/prawn/document.rb:238:ininitialize' /usr/lib/ruby/gems/1.8/gems/prawn-core-0.8.4/lib/prawn/document.rb:130:in
new' /usr/lib/ruby/gems/1.8/gems/prawn-core-0.8.4/lib/prawn/document.rb:130:ingenerate' /usr/lib/ruby/gems/1.8/gems/nessusdb-1.2/bin/../lib/nessusdb/prawn_templater.rb:29:in
generate' /usr/lib/ruby/gems/1.8/gems/nessusdb-1.2/bin/nessusdb:230:inmain' /usr/lib/ruby/gems/1.8/gems/nessusdb-1.2/bin/nessusdb:241 /usr/bin/nessusdb:19:in
load' /usr/bin/nessusdb:19