Exemple #1
0
def pdfify(enhanced, output):
    enhanced["scan"]["time"] = fromEpoch(enhanced["scan"]["time"])
    enhanced["enhanced"]["time"] = fromEpoch(enhanced["enhanced"]["time"])
    appendixes = []

    appendix = 1
    for system in enhanced["systems"]:
        if "cpes" in system:
            for cpe in system["cpes"]:
                cpe["cpe"] = toHuman(cpe["cpe"])
                if "cves" in cpe and len(cpe["cves"]) != 0:
                    appendixes.append(cpe["cves"])
                    cpe.pop("cves")
                    cpe["appendix"] = appendix
                    appendix += 1
        for service in system["services"]:
            service["banner"] = product(service["banner"])
            if "cves" in service and len(service["cves"]) != 0:
                appendixes.append(service["cves"])
                service["appendix"] = appendix
                appendix += 1
            if "cves" in service: service.pop("cves")

    enhanced["appendixes"] = appendixes
    html_out = template.render(enhanced)
    HTML(string=html_out).write_pdf(output, stylesheets=[stylesheets])
Exemple #2
0
def pdfify(enhanced, output):
  enhanced["scan"]["time"] = fromEpoch(enhanced["scan"]["time"])
  enhanced["enhanced"]["time"] = fromEpoch(enhanced["enhanced"]["time"])
  appendixes=[]
  
  appendix = 1
  for system in enhanced["systems"]:
    if "cpes" in system:
      for cpe in system["cpes"]:
        cpe["cpe"] = toHuman(cpe["cpe"])
        if "cves" in cpe and len(cpe["cves"])!=0:
          appendixes.append(cpe["cves"])
          cpe.pop("cves")
          cpe["appendix"]=appendix
          appendix += 1
    for service in system["services"]:
      service["banner"]=product(service["banner"])
      if "cves" in service and len(service["cves"])!=0:
        appendixes.append(service["cves"])
        service["appendix"] = appendix
        appendix += 1
      if "cves" in service: service.pop("cves")

  enhanced["appendixes"]=appendixes
  html_out = template.render(enhanced)
  HTML(string=html_out).write_pdf(output, stylesheets=[stylesheets])
Exemple #3
0
 def info():
   text=[{'t': "Scan", 'm': "title"},
         {'t': "  Date: %s"%fromEpoch(scan['scan']['time'])},
         {'t': "  Type: %s"%scan['scan']['type']},
         {'t': "Enhancement", 'm': "title"},
         {'t': "  Date: %s"%fromEpoch(scan['enhanced']['time'])}]
   screen.scroll(text, footer=tDefFoot, nav=extendedNav)
Exemple #4
0
 def printInfo():
   text=[{'t':'Scan', 'm':md_head},
         {'t':'  Date: %s'%fromEpoch(scan['scan']['time'])},
         {'t':'  Type: %s'%scan['scan']['type']},
         {'t':'Enhancement', 'm':md_head},
         {'t':'  Date: %s'%fromEpoch(scan['enhanced']['time'])}]
   f=[' - press q to return to the previous page -']
   scroll(text,footer=f)
Exemple #5
0
 def info():
     text = [{
         't': "Scan",
         'm': "title"
     }, {
         't': "  Date: %s" % fromEpoch(scan['scan']['time'])
     }, {
         't': "  Type: %s" % scan['scan']['type']
     }, {
         't': "Enhancement",
         'm': "title"
     }, {
         't': "  Date: %s" % fromEpoch(scan['enhanced']['time'])
     }]
     screen.scroll(text, footer=tDefFoot, nav=extendedNav)
Exemple #6
0
 def fromEpoch_filter(epoch):
     return fromEpoch(epoch)
Exemple #7
0
 def fromEpoch_filter(epoch):
   return fromEpoch(epoch)