class ReportText

Public Instance Methods

file_extension() click to toggle source
# File lib/dockscan/modules/report/txt.rb, line 11
def file_extension
        return ".txt"
end
format() click to toggle source
# File lib/dockscan/modules/report/txt.rb, line 7
def format
        return "txt"
end
info() click to toggle source
# File lib/dockscan/modules/report/txt.rb, line 3
def info
        return 'This plugin produces text reports'
end
report(opts) click to toggle source
# File lib/dockscan/modules/report/txt.rb, line 15
def report(opts)
        output=""
        output << "Dockscan Report\n\n"
        
        issues = sortvulns
        7.downto(3) do |sev|
                if issues.key?(sev)
                        output << "-[ " << sev2word(sev) << " ]-\n"
                        issues[sev].each do |v|
                                output << "=" << v.vuln.title << "=\n"
                                output << "Description:\n" << v.vuln.description << "\n"
                                output << "Output:\n" << v.output << "\n" 
                                output << "Solution:\n" << v.vuln.solution << "\n"
                                output << "\n"
                        end
                        output << "\n"
                end
        end
        return output
end