Class: Risu::Templates::ExecSummary
- Inherits:
-
Base::TemplateBase
- Object
- Base::TemplateBase
- Risu::Templates::ExecSummary
- Includes:
- TemplateHelper
- Defined in:
- lib/risu/templates/exec_summary.rb
Instance Attribute Summary
Attributes inherited from Base::TemplateBase
Instance Method Summary collapse
-
#initialize ⇒ ExecSummary
constructor
A new instance of ExecSummary.
- #render(output) ⇒ Object
Methods included from TemplateHelper
#default_credential_plugins, #default_credentials_appendix_section, #default_credentials_section, #definition, #has_default_credentials?, #heading1, #heading2, #heading3, #heading4, #heading5, #heading6, #item_count_by_plugin_id, #item_count_by_plugin_name, #new_page, #report_author, #report_classification, #report_subtitle, #report_title, #table, #text, #title
Methods included from ScanHelper
#authenticated_count, #scan_info_to_hash
Methods included from SharesTemplateHelper
#anon_ftp_count, #anon_ftp_section, #anon_smb_count, #anon_smb_query, #anon_smb_section, #shares_appendix_section, #shares_section, #shares_section_has_findings?
Methods included from GraphTemplateHelper
#other_os_graph_page, #risks_by_service_graph_page, #risks_by_severity_graph_page, #root_cause_graph_page, #windows_os_graph_page
Methods included from MalwareTemplateHelper
#conficker_appendix_section, #conficker_count, #conficker_section, #known_malicious_process_appendix_section, #known_malicious_process_count, #known_malicious_process_section, #malware_appendix_section, #malware_section
Methods included from HostTemplateHelper
#unsupported_os, #unsupported_os_appendix_section
Methods inherited from Base::TemplateBase
Constructor Details
#initialize ⇒ ExecSummary
Returns a new instance of ExecSummary.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/risu/templates/exec_summary.rb', line 29 def initialize @template_info = { :name => "exec_summary", :author => "hammackj", :version => "0.0.5", :renderer => "PDF", :description => "Generates a simple executive summary." } end |
Instance Method Details
#render(output) ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/risu/templates/exec_summary.rb', line 42 def render output output.text Report.classification.upcase, :align => :center output.text "\n" report_title Report.title report_subtitle "Executive Summary" "This report was prepared by\n#{Report.}" output.text "\n\n\n" output.text "Scan Date:", :style => :bold output.text "#{Report.scan_date}" output.text "\n" output.text "This report contains the results of a security audit performed on #{Report.scan_date}." if Report.owner.nil? or Report.network.nil? or Report.location.nil? output.text "It contains confidential information about the state of your network." else output.text "It contains confidential information about the state of #{Report.owner}'s #{Report.network} network at #{Report.location}." end output.text "Access to this information by unauthorized personnel may allow them to compromise said network.\n\n" output.text "A total of #{Host.count} hosts were found and scanned for vulnerabilities.\n\n" output.text "There were #{Item.risks.count} vulnerabilities found during this scan. Of these, #{Item.critical_risks.count} were critical vulnerabilities,#{Item.high_risks.count} were high vulnerabilities, #{Item.medium_risks.count} were medium vulnerabilities, #{Item.low_risks.count} were low vulnerabilities and #{Item.info_risks.count} were information findings.\n\n" output.text "Scan Statistics", :style => :bold output.text "\n" output.table([[ "Number of hosts", "Number of risks", "Critical Risks", "High Risks", "Medium Risks", "Low Risks", "Info Risks"], [ Host.count, Item.risks.count, Item.critical_risks.count, Item.high_risks.count, Item.medium_risks.count, Item.low_risks.count, Item.info_risks.count]], :cell_style => { :padding =>12 }, :width => output.bounds.width) output.text "\n\n\n" output.text "Graphs of key finding statistics", :style => :bold output.text "\n\n\n" cury = output.y output.image Item.risks_by_severity_graph, :width => 250, :at => [output.bounds.left, cury] output.image Host.top_vuln_graph(10), :width => 250, :at => [output.bounds.right - 250, cury] output.move_down 50 output.start_new_page cury = output.y output.image Item.risks_by_service_graph(10), :width => 250, :at => [output.bounds.left, cury] output.image Host.other_os_graph, :width => 250, :at => [output.bounds.right - 250, cury] output.move_down 250 cury = output.y output.image Host.windows_os_graph, :width => 250, :at => [output.bounds.left, cury] output.image Item.stigs_severity_graph, :width => 250, :at => [output.bounds.right - 250, cury] end |