def _report(self): template = u"\n{title}\n{issues}\n\n{statistics}" title = u"Scaning <{directory}> at {time}".format( directory=Out.R(conf.target), time=Out.R(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()))) issues_content = \ Out.Y("-"*80 + "\nFound security issues as follows:\n\n") for issue in issuemgr: issues_content = issues_content + self._format_issue(issue) statistics = Out.Y("-" * 80 + "\nStatistics information:\n") sinfo = issuemgr.statistics() for s in sinfo: statistics = statistics + \ "{key}: {value}".format(key=severity_map[s][0].capitalize(), value=sinfo[s]) + "\n" content = template.format(title=title, issues=issues_content, statistics=statistics) return content
def _report(self): template = u"\n{title}\n{issues}\n\n{statistics}" title = u"Scaning <{directory}> at {time}".format( directory = Out.R(conf.target), time = Out.R(self.now)) issues_content = \ Out.Y("-"*80 + "\nFound security issues as follows:\n\n") for issue in issuemgr: issues_content = issues_content + self._format_issue(issue) statistics = Out.Y("-"*80 + "\nStatistics information:\n") sinfo = issuemgr.statistics() for s in sinfo: statistics = statistics + \ "{key}: {value}".format(key=severity_map[s][0].capitalize(), value=sinfo[s]) + "\n" content = template.format( title = title, issues = issues_content, statistics = statistics) return content
def _get_scan_info(self): scan_info = {} scan_info['directory'] = conf.target scan_info['scan_time'] = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) scan_info['scope_titles'] = [] scan_info['scope_contents'] = [] for scope, linenum in filemgr.scope_statistics.iteritems(): scan_info['scope_titles'].append(scope) scan_info['scope_contents'].append(linenum) scan_info['severity_contents'] = \ [v for k,v in issuemgr.statistics().iteritems()] return scan_info
def _get_scan_info(self): scan_info = {} scan_info['directory'] = conf.target scan_info['scan_time'] = time.strftime( "%Y-%m-%d %H:%M:%S", time.localtime()) scan_info['scope_titles'] = [] scan_info['scope_contents'] = [] for scope,linenum in filemgr.scope_statistics.iteritems(): scan_info['scope_titles'].append(scope) scan_info['scope_contents'].append(linenum) scan_info['severity_contents'] = \ [v for k,v in issuemgr.statistics().iteritems()] return scan_info
def _report(self): template = u"{title}\n\n\n{issues}\n\n{statistics}" title = u"{banner}\nScaning <{directory}> at {time}".format( banner=self.banner, directory=conf.target, time=self.now) issues_content = "-" * 80 + "\nFound security issues as follows:\n\n" for issue in issuemgr: issues_content = issues_content + self._format_issue(issue) statistics = "-" * 80 + "\nStatistics information:\n" sinfo = issuemgr.statistics() for s in sinfo: statistics = statistics + \ "{key}: {value}".format(key=severity_map[s][0].capitalize(), value=sinfo[s]) + "\n" content = template.format(title=title, issues=issues_content, statistics=statistics) return content