How to use the sslyze.plugins.http_headers_plugin.HttpHeadersScanCommand function in sslyze

To help you get started, we’ve selected a few sslyze examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github VainlyStrain / Vaile / modules / ScanningEnumeration / ssltlsscan.py View on Github external
print('')

            command = CertificateInfoScanCommand()
            scan_result = scanner.run_scan_command(server_info, command)
            print(G+' [+] Certificate Information:'+color.TR2+C)
            for entry in scan_result.as_text():
                if entry != '':
                    if 'certificate information' in entry.lower():
                        pass
                    elif ':' in entry:
                        print(GR+'    [+] '+entry.strip().split(':', 1)[0].strip()+' : '+C+entry.strip().split(':', 1)[1].strip())
                    else:
                        print(C+'\n  [+] ' +entry.strip())
            print('')

            command = HttpHeadersScanCommand()
            scan_result = scanner.run_scan_command(server_info, command)
            print(G+' [+] HTTP Results:'+C+color.TR2+C)
            for entry in scan_result.as_text():
                if 'http security' not in entry.strip().lower() and entry != '':
                    if '-' in entry:
                        print(GR+'    [+] '+entry.split('-',1)[0].strip()+' - '+C+entry.split('-',1)[1].strip())
                    elif ':' in entry:
                        print(GR+'    [+] '+entry.strip().split(':', 1)[0].strip()+' : '+C+entry.strip().split(':', 1)[1].strip())
                    else:
                        print(C+'\n  [+] ' +entry.strip())
            print('')

        except Exception as e:
            print(R+' [-] Unhandled SSL Runtime Exception : '+str(e))
            pass
github 0xInfection / TIDoS-Framework / modules / 0x02-Scanning+Enumeration / ssltlsscan.py View on Github external
print('')

            command = CertificateInfoScanCommand()
            scan_result = scanner.run_scan_command(server_info, command)
            print(G+' [+] Certificate Information:')
            for entry in scan_result.as_text():
                if entry != '':
                    if 'certificate information' in entry.lower():
                        pass
                    elif ':' in entry:
                        print(GR+'    [+] '+entry.strip().split(':', 1)[0].strip()+' : '+C+entry.strip().split(':', 1)[1].strip())
                    else:
                        print(O+'\n  [+] ' +entry.strip())
            print('')

            command = HttpHeadersScanCommand()
            scan_result = scanner.run_scan_command(server_info, command)
            print(G+' [+] HTTP Results:')
            for entry in scan_result.as_text():
                if 'http security' not in entry.strip().lower() and entry != '':
                    if '-' in entry:
                        print(GR+'    [+] '+entry.split('-',1)[0].strip()+' - '+C+entry.split('-',1)[1].strip())
                    elif ':' in entry:
                        print(GR+'    [+] '+entry.strip().split(':', 1)[0].strip()+' : '+C+entry.strip().split(':', 1)[1].strip())
                    else:
                        print(O+'\n  [+] ' +entry.strip())
            print('')

        except Exception as e:
            print(R+' [-] Unhandled SSL Runtime Exception : '+str(e))
            pass
github jonluca / Anubis / anubis / scanners / ssl.py View on Github external
print('    {}'.format(cipher.name))

    # Certificate information
    command = CertificateInfoScanCommand()
    scan_result = synchronous_scanner.run_scan_command(server_info, command)
    for entry in scan_result.as_text():
      print(entry)

    # Heartbleed vulnerability info
    command = HeartbleedScanCommand()
    scan_result = synchronous_scanner.run_scan_command(server_info, command)
    for entry in scan_result.as_text():
      print(entry)

    # HTTP Headers info
    command = HttpHeadersScanCommand()
    scan_result = synchronous_scanner.run_scan_command(server_info, command)
    for entry in scan_result.as_text():
      print(entry)

  except Exception as e:
    self.handle_exception(e, "Error running SSL scan")
    pass