Projects STRLCPY headers-analyzer Commits 652f8ffa
🤬
  • ■ ■ ■ ■ ■ ■
    HeadersAnalyzer.py
    skipped 391 lines
    392 392   headers_dict[header_split[0].lower()] = header_split[1]
    393 393  
    394 394   if self.interestingHeadersCB.isSelected():
    395  - self.findInteresting(headers_dict)
     395 + self.findInteresting(host, headers_dict)
    396 396  
    397 397   if self.securityHeadersCB.isSelected():
    398  - self.findSecure(headers_dict)
     398 + self.findSecure(host, headers_dict)
    399 399  
    400 400   return (self.scan_issues)
    401 401  
    402  - def findInteresting(self, headers):
     402 + def findInteresting(self, host, headers):
    403 403   list_boring_headers = []
    404 404   model = self.boringHeadersList.getModel()
    405 405  
    skipped 4 lines
    410 410   issuename = "Interesting Header(s)"
    411 411   issuelevel = "Low"
    412 412   issuedetail = "<p>The response includes the following potentially interesting headers:</p><ul>"
    413  - log = "[+] Interesting Headers found:\n"
     413 + log = "[+] Interesting Headers found: " + host + "\n"
    414 414   found = 0
    415 415  
    416 416   for header in headers:
    skipped 19 lines
    436 436  
    437 437   self.logsTA.append(log)
    438 438  
    439  - def findSecure(self, headers):
     439 + def findSecure(self, host, headers):
    440 440   issuename = "Lack or Misconfiguration of Security Header(s)"
    441 441   issuelevel = "Low"
    442 442   issuedetail = """<p>The response lacks or includes the following misconfigured security headers.</p>
    skipped 65 lines
    508 508   if len(badheaders) > 0 or len(missingsecurity) > 0:
    509 509   if len(badheaders) > 0:
    510 510   issuedetail += "<p>Potentially misconfigured headers:</p><ul>"
    511  - log = "[+] Potentially miconfigured headers found:\n"
     511 + log = "[+] Potentially miconfigured headers found: " + host + "\n"
    512 512  
    513 513   for bad in badheaders:
    514 514   issuedetail += "<li>Header name: <b>" + bad + "</b>. Header value: <b>" + headers[bad] + "</b></li>"
    skipped 11 lines
    526 526  
    527 527   if len(missingsecurity) > 0:
    528 528   issuedetail += "<p>Missing headers:</p><ul>"
    529  - log = "[+] Missing headers found:\n"
     529 + log = "[+] Missing security headers: " + host + "\n"
    530 530  
    531 531   for missing in missingsecurity:
    532 532   issuedetail += "<li>Header name: <b>" + missing + "</b>.</li>"
    skipped 58 lines
Please wait...
Page is in error, reload to recover