Exemplo n.º 1
0
# ---------------------------------------------------------
# HTML Webpage
TMPL_FILE = '/'.join([SCAN_HOME, 'fibasic-results.tmpl'])
html = Template(file=TMPL_FILE)

html.no_results = False
if len(high) == 0 and len(medium) == 0 and len(low) == 0:
    html.no_results = True
else:
    html.img = '.'.join([str(fibasic.scan_id), 'png'])

html.host = fibasic.hostname
html.high = high
html.medium = medium
html.low = low


page_file = '%s.html' % fibasic.scan_id
fd = open('/'.join([SCAN_HOME, page_file]), 'w')
fd.write(html.respond())
fd.close()

# ---------------------------------------------------------
# CSV file (for spreadsheet)
csv_file = '%s.txt' % fibasic.scan_id
fd = open('/'.join([TMPDIR, csv_file]), 'w')

if len(high) > 0:
    for h in high:
        s = "%s|%s|%s|%s\n" % ('HIGH', h['name'], h['url'], h['description'])
Exemplo n.º 2
0
# ---------------------------------------------------------
# HTML Webpage
TMPL_FILE = '/'.join([SCAN_HOME, 'forxf.html'])
html = Template(file=TMPL_FILE)

html.no_results = False
if len(high) == 0 and len(medium) == 0 and len(low) == 0:
    html.no_results = True
else:
    html.img = '.'.join([str(queue.scan_id), 'png'])

html.host = queue.hostname
html.high = high
html.medium = medium
html.low = low


page_file = '%s.html' % queue.scan_id
fd = open('/'.join([SCAN_HOME, page_file]), 'w')
fd.write(html.respond())
fd.close()



# PDF
PDF_TMPL = '/'.join([SCAN_HOME, 'forxf-pdf.html'])
pdf_html = Template(file=PDF_TMPL)
pdf_html.no_results = False
if len(high) == 0 and len(medium) == 0 and len(low) == 0:
    pdf_html.no_results = True