How to use sha256 method in Playwright Python

Best Python code snippet using playwright-python

_cipher_suites.py

Source:_cipher_suites.py Github

copy

Full Screen

1# coding: utf-82from __future__ import unicode_literals, division, absolute_import, print_function3__all__ = [4 'CIPHER_SUITE_MAP',5]6CIPHER_SUITE_MAP = {7 b'\x00\x00': 'TLS_NULL_WITH_NULL_NULL',8 b'\x00\x01': 'TLS_RSA_WITH_NULL_MD5',9 b'\x00\x02': 'TLS_RSA_WITH_NULL_SHA',10 b'\x00\x03': 'TLS_RSA_EXPORT_WITH_RC4_40_MD5',11 b'\x00\x04': 'TLS_RSA_WITH_RC4_128_MD5',12 b'\x00\x05': 'TLS_RSA_WITH_RC4_128_SHA',13 b'\x00\x06': 'TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5',14 b'\x00\x07': 'TLS_RSA_WITH_IDEA_CBC_SHA',15 b'\x00\x08': 'TLS_RSA_EXPORT_WITH_DES40_CBC_SHA',16 b'\x00\x09': 'TLS_RSA_WITH_DES_CBC_SHA',17 b'\x00\x0A': 'TLS_RSA_WITH_3DES_EDE_CBC_SHA',18 b'\x00\x0B': 'TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA',19 b'\x00\x0C': 'TLS_DH_DSS_WITH_DES_CBC_SHA',20 b'\x00\x0D': 'TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA',21 b'\x00\x0E': 'TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA',22 b'\x00\x0F': 'TLS_DH_RSA_WITH_DES_CBC_SHA',23 b'\x00\x10': 'TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA',24 b'\x00\x11': 'TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA',25 b'\x00\x12': 'TLS_DHE_DSS_WITH_DES_CBC_SHA',26 b'\x00\x13': 'TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA',27 b'\x00\x14': 'TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA',28 b'\x00\x15': 'TLS_DHE_RSA_WITH_DES_CBC_SHA',29 b'\x00\x16': 'TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA',30 b'\x00\x17': 'TLS_DH_anon_EXPORT_WITH_RC4_40_MD5',31 b'\x00\x18': 'TLS_DH_anon_WITH_RC4_128_MD5',32 b'\x00\x19': 'TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA',33 b'\x00\x1A': 'TLS_DH_anon_WITH_DES_CBC_SHA',34 b'\x00\x1B': 'TLS_DH_anon_WITH_3DES_EDE_CBC_SHA',35 b'\x00\x1E': 'TLS_KRB5_WITH_DES_CBC_SHA',36 b'\x00\x1F': 'TLS_KRB5_WITH_3DES_EDE_CBC_SHA',37 b'\x00\x20': 'TLS_KRB5_WITH_RC4_128_SHA',38 b'\x00\x21': 'TLS_KRB5_WITH_IDEA_CBC_SHA',39 b'\x00\x22': 'TLS_KRB5_WITH_DES_CBC_MD5',40 b'\x00\x23': 'TLS_KRB5_WITH_3DES_EDE_CBC_MD5',41 b'\x00\x24': 'TLS_KRB5_WITH_RC4_128_MD5',42 b'\x00\x25': 'TLS_KRB5_WITH_IDEA_CBC_MD5',43 b'\x00\x26': 'TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA',44 b'\x00\x27': 'TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA',45 b'\x00\x28': 'TLS_KRB5_EXPORT_WITH_RC4_40_SHA',46 b'\x00\x29': 'TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5',47 b'\x00\x2A': 'TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5',48 b'\x00\x2B': 'TLS_KRB5_EXPORT_WITH_RC4_40_MD5',49 b'\x00\x2C': 'TLS_PSK_WITH_NULL_SHA',50 b'\x00\x2D': 'TLS_DHE_PSK_WITH_NULL_SHA',51 b'\x00\x2E': 'TLS_RSA_PSK_WITH_NULL_SHA',52 b'\x00\x2F': 'TLS_RSA_WITH_AES_128_CBC_SHA',53 b'\x00\x30': 'TLS_DH_DSS_WITH_AES_128_CBC_SHA',54 b'\x00\x31': 'TLS_DH_RSA_WITH_AES_128_CBC_SHA',55 b'\x00\x32': 'TLS_DHE_DSS_WITH_AES_128_CBC_SHA',56 b'\x00\x33': 'TLS_DHE_RSA_WITH_AES_128_CBC_SHA',57 b'\x00\x34': 'TLS_DH_anon_WITH_AES_128_CBC_SHA',58 b'\x00\x35': 'TLS_RSA_WITH_AES_256_CBC_SHA',59 b'\x00\x36': 'TLS_DH_DSS_WITH_AES_256_CBC_SHA',60 b'\x00\x37': 'TLS_DH_RSA_WITH_AES_256_CBC_SHA',61 b'\x00\x38': 'TLS_DHE_DSS_WITH_AES_256_CBC_SHA',62 b'\x00\x39': 'TLS_DHE_RSA_WITH_AES_256_CBC_SHA',63 b'\x00\x3A': 'TLS_DH_anon_WITH_AES_256_CBC_SHA',64 b'\x00\x3B': 'TLS_RSA_WITH_NULL_SHA256',65 b'\x00\x3C': 'TLS_RSA_WITH_AES_128_CBC_SHA256',66 b'\x00\x3D': 'TLS_RSA_WITH_AES_256_CBC_SHA256',67 b'\x00\x3E': 'TLS_DH_DSS_WITH_AES_128_CBC_SHA256',68 b'\x00\x3F': 'TLS_DH_RSA_WITH_AES_128_CBC_SHA256',69 b'\x00\x40': 'TLS_DHE_DSS_WITH_AES_128_CBC_SHA256',70 b'\x00\x41': 'TLS_RSA_WITH_CAMELLIA_128_CBC_SHA',71 b'\x00\x42': 'TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA',72 b'\x00\x43': 'TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA',73 b'\x00\x44': 'TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA',74 b'\x00\x45': 'TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA',75 b'\x00\x46': 'TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA',76 b'\x00\x67': 'TLS_DHE_RSA_WITH_AES_128_CBC_SHA256',77 b'\x00\x68': 'TLS_DH_DSS_WITH_AES_256_CBC_SHA256',78 b'\x00\x69': 'TLS_DH_RSA_WITH_AES_256_CBC_SHA256',79 b'\x00\x6A': 'TLS_DHE_DSS_WITH_AES_256_CBC_SHA256',80 b'\x00\x6B': 'TLS_DHE_RSA_WITH_AES_256_CBC_SHA256',81 b'\x00\x6C': 'TLS_DH_anon_WITH_AES_128_CBC_SHA256',82 b'\x00\x6D': 'TLS_DH_anon_WITH_AES_256_CBC_SHA256',83 b'\x00\x84': 'TLS_RSA_WITH_CAMELLIA_256_CBC_SHA',84 b'\x00\x85': 'TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA',85 b'\x00\x86': 'TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA',86 b'\x00\x87': 'TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA',87 b'\x00\x88': 'TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA',88 b'\x00\x89': 'TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA',89 b'\x00\x8A': 'TLS_PSK_WITH_RC4_128_SHA',90 b'\x00\x8B': 'TLS_PSK_WITH_3DES_EDE_CBC_SHA',91 b'\x00\x8C': 'TLS_PSK_WITH_AES_128_CBC_SHA',92 b'\x00\x8D': 'TLS_PSK_WITH_AES_256_CBC_SHA',93 b'\x00\x8E': 'TLS_DHE_PSK_WITH_RC4_128_SHA',94 b'\x00\x8F': 'TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA',95 b'\x00\x90': 'TLS_DHE_PSK_WITH_AES_128_CBC_SHA',96 b'\x00\x91': 'TLS_DHE_PSK_WITH_AES_256_CBC_SHA',97 b'\x00\x92': 'TLS_RSA_PSK_WITH_RC4_128_SHA',98 b'\x00\x93': 'TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA',99 b'\x00\x94': 'TLS_RSA_PSK_WITH_AES_128_CBC_SHA',100 b'\x00\x95': 'TLS_RSA_PSK_WITH_AES_256_CBC_SHA',101 b'\x00\x96': 'TLS_RSA_WITH_SEED_CBC_SHA',102 b'\x00\x97': 'TLS_DH_DSS_WITH_SEED_CBC_SHA',103 b'\x00\x98': 'TLS_DH_RSA_WITH_SEED_CBC_SHA',104 b'\x00\x99': 'TLS_DHE_DSS_WITH_SEED_CBC_SHA',105 b'\x00\x9A': 'TLS_DHE_RSA_WITH_SEED_CBC_SHA',106 b'\x00\x9B': 'TLS_DH_anon_WITH_SEED_CBC_SHA',107 b'\x00\x9C': 'TLS_RSA_WITH_AES_128_GCM_SHA256',108 b'\x00\x9D': 'TLS_RSA_WITH_AES_256_GCM_SHA384',109 b'\x00\x9E': 'TLS_DHE_RSA_WITH_AES_128_GCM_SHA256',110 b'\x00\x9F': 'TLS_DHE_RSA_WITH_AES_256_GCM_SHA384',111 b'\x00\xA0': 'TLS_DH_RSA_WITH_AES_128_GCM_SHA256',112 b'\x00\xA1': 'TLS_DH_RSA_WITH_AES_256_GCM_SHA384',113 b'\x00\xA2': 'TLS_DHE_DSS_WITH_AES_128_GCM_SHA256',114 b'\x00\xA3': 'TLS_DHE_DSS_WITH_AES_256_GCM_SHA384',115 b'\x00\xA4': 'TLS_DH_DSS_WITH_AES_128_GCM_SHA256',116 b'\x00\xA5': 'TLS_DH_DSS_WITH_AES_256_GCM_SHA384',117 b'\x00\xA6': 'TLS_DH_anon_WITH_AES_128_GCM_SHA256',118 b'\x00\xA7': 'TLS_DH_anon_WITH_AES_256_GCM_SHA384',119 b'\x00\xA8': 'TLS_PSK_WITH_AES_128_GCM_SHA256',120 b'\x00\xA9': 'TLS_PSK_WITH_AES_256_GCM_SHA384',121 b'\x00\xAA': 'TLS_DHE_PSK_WITH_AES_128_GCM_SHA256',122 b'\x00\xAB': 'TLS_DHE_PSK_WITH_AES_256_GCM_SHA384',123 b'\x00\xAC': 'TLS_RSA_PSK_WITH_AES_128_GCM_SHA256',124 b'\x00\xAD': 'TLS_RSA_PSK_WITH_AES_256_GCM_SHA384',125 b'\x00\xAE': 'TLS_PSK_WITH_AES_128_CBC_SHA256',126 b'\x00\xAF': 'TLS_PSK_WITH_AES_256_CBC_SHA384',127 b'\x00\xB0': 'TLS_PSK_WITH_NULL_SHA256',128 b'\x00\xB1': 'TLS_PSK_WITH_NULL_SHA384',129 b'\x00\xB2': 'TLS_DHE_PSK_WITH_AES_128_CBC_SHA256',130 b'\x00\xB3': 'TLS_DHE_PSK_WITH_AES_256_CBC_SHA384',131 b'\x00\xB4': 'TLS_DHE_PSK_WITH_NULL_SHA256',132 b'\x00\xB5': 'TLS_DHE_PSK_WITH_NULL_SHA384',133 b'\x00\xB6': 'TLS_RSA_PSK_WITH_AES_128_CBC_SHA256',134 b'\x00\xB7': 'TLS_RSA_PSK_WITH_AES_256_CBC_SHA384',135 b'\x00\xB8': 'TLS_RSA_PSK_WITH_NULL_SHA256',136 b'\x00\xB9': 'TLS_RSA_PSK_WITH_NULL_SHA384',137 b'\x00\xBA': 'TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256',138 b'\x00\xBB': 'TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256',139 b'\x00\xBC': 'TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256',140 b'\x00\xBD': 'TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256',141 b'\x00\xBE': 'TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256',142 b'\x00\xBF': 'TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256',143 b'\x00\xC0': 'TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256',144 b'\x00\xC1': 'TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256',145 b'\x00\xC2': 'TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256',146 b'\x00\xC3': 'TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256',147 b'\x00\xC4': 'TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256',148 b'\x00\xC5': 'TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256',149 b'\x00\xFF': 'TLS_EMPTY_RENEGOTIATION_INFO_SCSV',150 b'\x13\x01': 'TLS_AES_128_GCM_SHA256',151 b'\x13\x02': 'TLS_AES_256_GCM_SHA384',152 b'\x13\x03': 'TLS_CHACHA20_POLY1305_SHA256',153 b'\x13\x04': 'TLS_AES_128_CCM_SHA256',154 b'\x13\x05': 'TLS_AES_128_CCM_8_SHA256',155 b'\xC0\x01': 'TLS_ECDH_ECDSA_WITH_NULL_SHA',156 b'\xC0\x02': 'TLS_ECDH_ECDSA_WITH_RC4_128_SHA',157 b'\xC0\x03': 'TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA',158 b'\xC0\x04': 'TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA',159 b'\xC0\x05': 'TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA',160 b'\xC0\x06': 'TLS_ECDHE_ECDSA_WITH_NULL_SHA',161 b'\xC0\x07': 'TLS_ECDHE_ECDSA_WITH_RC4_128_SHA',162 b'\xC0\x08': 'TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA',163 b'\xC0\x09': 'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA',164 b'\xC0\x0A': 'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA',165 b'\xC0\x0B': 'TLS_ECDH_RSA_WITH_NULL_SHA',166 b'\xC0\x0C': 'TLS_ECDH_RSA_WITH_RC4_128_SHA',167 b'\xC0\x0D': 'TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA',168 b'\xC0\x0E': 'TLS_ECDH_RSA_WITH_AES_128_CBC_SHA',169 b'\xC0\x0F': 'TLS_ECDH_RSA_WITH_AES_256_CBC_SHA',170 b'\xC0\x10': 'TLS_ECDHE_RSA_WITH_NULL_SHA',171 b'\xC0\x11': 'TLS_ECDHE_RSA_WITH_RC4_128_SHA',172 b'\xC0\x12': 'TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA',173 b'\xC0\x13': 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA',174 b'\xC0\x14': 'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA',175 b'\xC0\x15': 'TLS_ECDH_anon_WITH_NULL_SHA',176 b'\xC0\x16': 'TLS_ECDH_anon_WITH_RC4_128_SHA',177 b'\xC0\x17': 'TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA',178 b'\xC0\x18': 'TLS_ECDH_anon_WITH_AES_128_CBC_SHA',179 b'\xC0\x19': 'TLS_ECDH_anon_WITH_AES_256_CBC_SHA',180 b'\xC0\x1A': 'TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA',181 b'\xC0\x1B': 'TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA',182 b'\xC0\x1C': 'TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA',183 b'\xC0\x1D': 'TLS_SRP_SHA_WITH_AES_128_CBC_SHA',184 b'\xC0\x1E': 'TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA',185 b'\xC0\x1F': 'TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA',186 b'\xC0\x20': 'TLS_SRP_SHA_WITH_AES_256_CBC_SHA',187 b'\xC0\x21': 'TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA',188 b'\xC0\x22': 'TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA',189 b'\xC0\x23': 'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256',190 b'\xC0\x24': 'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384',191 b'\xC0\x25': 'TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256',192 b'\xC0\x26': 'TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384',193 b'\xC0\x27': 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256',194 b'\xC0\x28': 'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384',195 b'\xC0\x29': 'TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256',196 b'\xC0\x2A': 'TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384',197 b'\xC0\x2B': 'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256',198 b'\xC0\x2C': 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384',199 b'\xC0\x2D': 'TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256',200 b'\xC0\x2E': 'TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384',201 b'\xC0\x2F': 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256',202 b'\xC0\x30': 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384',203 b'\xC0\x31': 'TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256',204 b'\xC0\x32': 'TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384',205 b'\xC0\x33': 'TLS_ECDHE_PSK_WITH_RC4_128_SHA',206 b'\xC0\x34': 'TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA',207 b'\xC0\x35': 'TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA',208 b'\xC0\x36': 'TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA',209 b'\xC0\x37': 'TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256',210 b'\xC0\x38': 'TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384',211 b'\xC0\x39': 'TLS_ECDHE_PSK_WITH_NULL_SHA',212 b'\xC0\x3A': 'TLS_ECDHE_PSK_WITH_NULL_SHA256',213 b'\xC0\x3B': 'TLS_ECDHE_PSK_WITH_NULL_SHA384',214 b'\xC0\x3C': 'TLS_RSA_WITH_ARIA_128_CBC_SHA256',215 b'\xC0\x3D': 'TLS_RSA_WITH_ARIA_256_CBC_SHA384',216 b'\xC0\x3E': 'TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256',217 b'\xC0\x3F': 'TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384',218 b'\xC0\x40': 'TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256',219 b'\xC0\x41': 'TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384',220 b'\xC0\x42': 'TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256',221 b'\xC0\x43': 'TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384',222 b'\xC0\x44': 'TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256',223 b'\xC0\x45': 'TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384',224 b'\xC0\x46': 'TLS_DH_anon_WITH_ARIA_128_CBC_SHA256',225 b'\xC0\x47': 'TLS_DH_anon_WITH_ARIA_256_CBC_SHA384',226 b'\xC0\x48': 'TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256',227 b'\xC0\x49': 'TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384',228 b'\xC0\x4A': 'TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256',229 b'\xC0\x4B': 'TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384',230 b'\xC0\x4C': 'TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256',231 b'\xC0\x4D': 'TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384',232 b'\xC0\x4E': 'TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256',233 b'\xC0\x4F': 'TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384',234 b'\xC0\x50': 'TLS_RSA_WITH_ARIA_128_GCM_SHA256',235 b'\xC0\x51': 'TLS_RSA_WITH_ARIA_256_GCM_SHA384',236 b'\xC0\x52': 'TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256',237 b'\xC0\x53': 'TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384',238 b'\xC0\x54': 'TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256',239 b'\xC0\x55': 'TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384',240 b'\xC0\x56': 'TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256',241 b'\xC0\x57': 'TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384',242 b'\xC0\x58': 'TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256',243 b'\xC0\x59': 'TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384',244 b'\xC0\x5A': 'TLS_DH_anon_WITH_ARIA_128_GCM_SHA256',245 b'\xC0\x5B': 'TLS_DH_anon_WITH_ARIA_256_GCM_SHA384',246 b'\xC0\x5C': 'TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256',247 b'\xC0\x5D': 'TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384',248 b'\xC0\x5E': 'TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256',249 b'\xC0\x5F': 'TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384',250 b'\xC0\x60': 'TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256',251 b'\xC0\x61': 'TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384',252 b'\xC0\x62': 'TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256',253 b'\xC0\x63': 'TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384',254 b'\xC0\x64': 'TLS_PSK_WITH_ARIA_128_CBC_SHA256',255 b'\xC0\x65': 'TLS_PSK_WITH_ARIA_256_CBC_SHA384',256 b'\xC0\x66': 'TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256',257 b'\xC0\x67': 'TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384',258 b'\xC0\x68': 'TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256',259 b'\xC0\x69': 'TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384',260 b'\xC0\x6A': 'TLS_PSK_WITH_ARIA_128_GCM_SHA256',261 b'\xC0\x6B': 'TLS_PSK_WITH_ARIA_256_GCM_SHA384',262 b'\xC0\x6C': 'TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256',263 b'\xC0\x6D': 'TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384',264 b'\xC0\x6E': 'TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256',265 b'\xC0\x6F': 'TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384',266 b'\xC0\x70': 'TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256',267 b'\xC0\x71': 'TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384',268 b'\xC0\x72': 'TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256',269 b'\xC0\x73': 'TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384',270 b'\xC0\x74': 'TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256',271 b'\xC0\x75': 'TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384',272 b'\xC0\x76': 'TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256',273 b'\xC0\x77': 'TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384',274 b'\xC0\x78': 'TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256',275 b'\xC0\x79': 'TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384',276 b'\xC0\x7A': 'TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256',277 b'\xC0\x7B': 'TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384',278 b'\xC0\x7C': 'TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256',279 b'\xC0\x7D': 'TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384',280 b'\xC0\x7E': 'TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256',281 b'\xC0\x7F': 'TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384',282 b'\xC0\x80': 'TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256',283 b'\xC0\x81': 'TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384',284 b'\xC0\x82': 'TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256',285 b'\xC0\x83': 'TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384',286 b'\xC0\x84': 'TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256',287 b'\xC0\x85': 'TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384',288 b'\xC0\x86': 'TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256',289 b'\xC0\x87': 'TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384',290 b'\xC0\x88': 'TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256',291 b'\xC0\x89': 'TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384',292 b'\xC0\x8A': 'TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256',293 b'\xC0\x8B': 'TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384',294 b'\xC0\x8C': 'TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256',295 b'\xC0\x8D': 'TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384',296 b'\xC0\x8E': 'TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256',297 b'\xC0\x8F': 'TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384',298 b'\xC0\x90': 'TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256',299 b'\xC0\x91': 'TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384',300 b'\xC0\x92': 'TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256',301 b'\xC0\x93': 'TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384',302 b'\xC0\x94': 'TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256',303 b'\xC0\x95': 'TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384',304 b'\xC0\x96': 'TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256',305 b'\xC0\x97': 'TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384',306 b'\xC0\x98': 'TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256',307 b'\xC0\x99': 'TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384',308 b'\xC0\x9A': 'TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256',309 b'\xC0\x9B': 'TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384',310 b'\xC0\x9C': 'TLS_RSA_WITH_AES_128_CCM',311 b'\xC0\x9D': 'TLS_RSA_WITH_AES_256_CCM',312 b'\xC0\x9E': 'TLS_DHE_RSA_WITH_AES_128_CCM',313 b'\xC0\x9F': 'TLS_DHE_RSA_WITH_AES_256_CCM',314 b'\xC0\xA0': 'TLS_RSA_WITH_AES_128_CCM_8',315 b'\xC0\xA1': 'TLS_RSA_WITH_AES_256_CCM_8',316 b'\xC0\xA2': 'TLS_DHE_RSA_WITH_AES_128_CCM_8',317 b'\xC0\xA3': 'TLS_DHE_RSA_WITH_AES_256_CCM_8',318 b'\xC0\xA4': 'TLS_PSK_WITH_AES_128_CCM',319 b'\xC0\xA5': 'TLS_PSK_WITH_AES_256_CCM',320 b'\xC0\xA6': 'TLS_DHE_PSK_WITH_AES_128_CCM',321 b'\xC0\xA7': 'TLS_DHE_PSK_WITH_AES_256_CCM',322 b'\xC0\xA8': 'TLS_PSK_WITH_AES_128_CCM_8',323 b'\xC0\xA9': 'TLS_PSK_WITH_AES_256_CCM_8',324 b'\xC0\xAA': 'TLS_PSK_DHE_WITH_AES_128_CCM_8',325 b'\xC0\xAB': 'TLS_PSK_DHE_WITH_AES_256_CCM_8',326 b'\xCC\xA8': 'TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256',327 b'\xCC\xA9': 'TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256',328 b'\xCC\xAA': 'TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256',329 b'\xCC\xAB': 'TLS_PSK_WITH_CHACHA20_POLY1305_SHA256',330 b'\xCC\xAC': 'TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256',331 b'\xCC\xAD': 'TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256',332 b'\xCC\xAE': 'TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256',...

Full Screen

Full Screen

mkcipherlist.py

Source:mkcipherlist.py Github

copy

Full Screen

1#!/usr/bin/env python2# -*- coding: utf-8 -*-3# This script read cipher suite list csv file [1] and prints out id4# and name of black listed cipher suites. The output is used by5# src/ssl.cc.6#7# [1] http://www.iana.org/assignments/tls-parameters/tls-parameters-4.csv8# [2] http://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml9from __future__ import unicode_literals10import re11import sys12import csv13# From RFC 754014blacklist = [15 'TLS_NULL_WITH_NULL_NULL',16 'TLS_RSA_WITH_NULL_MD5',17 'TLS_RSA_WITH_NULL_SHA',18 'TLS_RSA_EXPORT_WITH_RC4_40_MD5',19 'TLS_RSA_WITH_RC4_128_MD5',20 'TLS_RSA_WITH_RC4_128_SHA',21 'TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5',22 'TLS_RSA_WITH_IDEA_CBC_SHA',23 'TLS_RSA_EXPORT_WITH_DES40_CBC_SHA',24 'TLS_RSA_WITH_DES_CBC_SHA',25 'TLS_RSA_WITH_3DES_EDE_CBC_SHA',26 'TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA',27 'TLS_DH_DSS_WITH_DES_CBC_SHA',28 'TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA',29 'TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA',30 'TLS_DH_RSA_WITH_DES_CBC_SHA',31 'TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA',32 'TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA',33 'TLS_DHE_DSS_WITH_DES_CBC_SHA',34 'TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA',35 'TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA',36 'TLS_DHE_RSA_WITH_DES_CBC_SHA',37 'TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA',38 'TLS_DH_anon_EXPORT_WITH_RC4_40_MD5',39 'TLS_DH_anon_WITH_RC4_128_MD5',40 'TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA',41 'TLS_DH_anon_WITH_DES_CBC_SHA',42 'TLS_DH_anon_WITH_3DES_EDE_CBC_SHA',43 'TLS_KRB5_WITH_DES_CBC_SHA',44 'TLS_KRB5_WITH_3DES_EDE_CBC_SHA',45 'TLS_KRB5_WITH_RC4_128_SHA',46 'TLS_KRB5_WITH_IDEA_CBC_SHA',47 'TLS_KRB5_WITH_DES_CBC_MD5',48 'TLS_KRB5_WITH_3DES_EDE_CBC_MD5',49 'TLS_KRB5_WITH_RC4_128_MD5',50 'TLS_KRB5_WITH_IDEA_CBC_MD5',51 'TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA',52 'TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA',53 'TLS_KRB5_EXPORT_WITH_RC4_40_SHA',54 'TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5',55 'TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5',56 'TLS_KRB5_EXPORT_WITH_RC4_40_MD5',57 'TLS_PSK_WITH_NULL_SHA',58 'TLS_DHE_PSK_WITH_NULL_SHA',59 'TLS_RSA_PSK_WITH_NULL_SHA',60 'TLS_RSA_WITH_AES_128_CBC_SHA',61 'TLS_DH_DSS_WITH_AES_128_CBC_SHA',62 'TLS_DH_RSA_WITH_AES_128_CBC_SHA',63 'TLS_DHE_DSS_WITH_AES_128_CBC_SHA',64 'TLS_DHE_RSA_WITH_AES_128_CBC_SHA',65 'TLS_DH_anon_WITH_AES_128_CBC_SHA',66 'TLS_RSA_WITH_AES_256_CBC_SHA',67 'TLS_DH_DSS_WITH_AES_256_CBC_SHA',68 'TLS_DH_RSA_WITH_AES_256_CBC_SHA',69 'TLS_DHE_DSS_WITH_AES_256_CBC_SHA',70 'TLS_DHE_RSA_WITH_AES_256_CBC_SHA',71 'TLS_DH_anon_WITH_AES_256_CBC_SHA',72 'TLS_RSA_WITH_NULL_SHA256',73 'TLS_RSA_WITH_AES_128_CBC_SHA256',74 'TLS_RSA_WITH_AES_256_CBC_SHA256',75 'TLS_DH_DSS_WITH_AES_128_CBC_SHA256',76 'TLS_DH_RSA_WITH_AES_128_CBC_SHA256',77 'TLS_DHE_DSS_WITH_AES_128_CBC_SHA256',78 'TLS_RSA_WITH_CAMELLIA_128_CBC_SHA',79 'TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA',80 'TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA',81 'TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA',82 'TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA',83 'TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA',84 'TLS_DHE_RSA_WITH_AES_128_CBC_SHA256',85 'TLS_DH_DSS_WITH_AES_256_CBC_SHA256',86 'TLS_DH_RSA_WITH_AES_256_CBC_SHA256',87 'TLS_DHE_DSS_WITH_AES_256_CBC_SHA256',88 'TLS_DHE_RSA_WITH_AES_256_CBC_SHA256',89 'TLS_DH_anon_WITH_AES_128_CBC_SHA256',90 'TLS_DH_anon_WITH_AES_256_CBC_SHA256',91 'TLS_RSA_WITH_CAMELLIA_256_CBC_SHA',92 'TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA',93 'TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA',94 'TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA',95 'TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA',96 'TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA',97 'TLS_PSK_WITH_RC4_128_SHA',98 'TLS_PSK_WITH_3DES_EDE_CBC_SHA',99 'TLS_PSK_WITH_AES_128_CBC_SHA',100 'TLS_PSK_WITH_AES_256_CBC_SHA',101 'TLS_DHE_PSK_WITH_RC4_128_SHA',102 'TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA',103 'TLS_DHE_PSK_WITH_AES_128_CBC_SHA',104 'TLS_DHE_PSK_WITH_AES_256_CBC_SHA',105 'TLS_RSA_PSK_WITH_RC4_128_SHA',106 'TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA',107 'TLS_RSA_PSK_WITH_AES_128_CBC_SHA',108 'TLS_RSA_PSK_WITH_AES_256_CBC_SHA',109 'TLS_RSA_WITH_SEED_CBC_SHA',110 'TLS_DH_DSS_WITH_SEED_CBC_SHA',111 'TLS_DH_RSA_WITH_SEED_CBC_SHA',112 'TLS_DHE_DSS_WITH_SEED_CBC_SHA',113 'TLS_DHE_RSA_WITH_SEED_CBC_SHA',114 'TLS_DH_anon_WITH_SEED_CBC_SHA',115 'TLS_RSA_WITH_AES_128_GCM_SHA256',116 'TLS_RSA_WITH_AES_256_GCM_SHA384',117 'TLS_DH_RSA_WITH_AES_128_GCM_SHA256',118 'TLS_DH_RSA_WITH_AES_256_GCM_SHA384',119 'TLS_DH_DSS_WITH_AES_128_GCM_SHA256',120 'TLS_DH_DSS_WITH_AES_256_GCM_SHA384',121 'TLS_DH_anon_WITH_AES_128_GCM_SHA256',122 'TLS_DH_anon_WITH_AES_256_GCM_SHA384',123 'TLS_PSK_WITH_AES_128_GCM_SHA256',124 'TLS_PSK_WITH_AES_256_GCM_SHA384',125 'TLS_RSA_PSK_WITH_AES_128_GCM_SHA256',126 'TLS_RSA_PSK_WITH_AES_256_GCM_SHA384',127 'TLS_PSK_WITH_AES_128_CBC_SHA256',128 'TLS_PSK_WITH_AES_256_CBC_SHA384',129 'TLS_PSK_WITH_NULL_SHA256',130 'TLS_PSK_WITH_NULL_SHA384',131 'TLS_DHE_PSK_WITH_AES_128_CBC_SHA256',132 'TLS_DHE_PSK_WITH_AES_256_CBC_SHA384',133 'TLS_DHE_PSK_WITH_NULL_SHA256',134 'TLS_DHE_PSK_WITH_NULL_SHA384',135 'TLS_RSA_PSK_WITH_AES_128_CBC_SHA256',136 'TLS_RSA_PSK_WITH_AES_256_CBC_SHA384',137 'TLS_RSA_PSK_WITH_NULL_SHA256',138 'TLS_RSA_PSK_WITH_NULL_SHA384',139 'TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256',140 'TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256',141 'TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256',142 'TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256',143 'TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256',144 'TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256',145 'TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256',146 'TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256',147 'TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256',148 'TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256',149 'TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256',150 'TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256',151 'TLS_EMPTY_RENEGOTIATION_INFO_SCSV',152 'TLS_ECDH_ECDSA_WITH_NULL_SHA',153 'TLS_ECDH_ECDSA_WITH_RC4_128_SHA',154 'TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA',155 'TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA',156 'TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA',157 'TLS_ECDHE_ECDSA_WITH_NULL_SHA',158 'TLS_ECDHE_ECDSA_WITH_RC4_128_SHA',159 'TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA',160 'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA',161 'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA',162 'TLS_ECDH_RSA_WITH_NULL_SHA',163 'TLS_ECDH_RSA_WITH_RC4_128_SHA',164 'TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA',165 'TLS_ECDH_RSA_WITH_AES_128_CBC_SHA',166 'TLS_ECDH_RSA_WITH_AES_256_CBC_SHA',167 'TLS_ECDHE_RSA_WITH_NULL_SHA',168 'TLS_ECDHE_RSA_WITH_RC4_128_SHA',169 'TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA',170 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA',171 'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA',172 'TLS_ECDH_anon_WITH_NULL_SHA',173 'TLS_ECDH_anon_WITH_RC4_128_SHA',174 'TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA',175 'TLS_ECDH_anon_WITH_AES_128_CBC_SHA',176 'TLS_ECDH_anon_WITH_AES_256_CBC_SHA',177 'TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA',178 'TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA',179 'TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA',180 'TLS_SRP_SHA_WITH_AES_128_CBC_SHA',181 'TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA',182 'TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA',183 'TLS_SRP_SHA_WITH_AES_256_CBC_SHA',184 'TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA',185 'TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA',186 'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256',187 'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384',188 'TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256',189 'TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384',190 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256',191 'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384',192 'TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256',193 'TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384',194 'TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256',195 'TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384',196 'TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256',197 'TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384',198 'TLS_ECDHE_PSK_WITH_RC4_128_SHA',199 'TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA',200 'TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA',201 'TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA',202 'TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256',203 'TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384',204 'TLS_ECDHE_PSK_WITH_NULL_SHA',205 'TLS_ECDHE_PSK_WITH_NULL_SHA256',206 'TLS_ECDHE_PSK_WITH_NULL_SHA384',207 'TLS_RSA_WITH_ARIA_128_CBC_SHA256',208 'TLS_RSA_WITH_ARIA_256_CBC_SHA384',209 'TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256',210 'TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384',211 'TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256',212 'TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384',213 'TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256',214 'TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384',215 'TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256',216 'TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384',217 'TLS_DH_anon_WITH_ARIA_128_CBC_SHA256',218 'TLS_DH_anon_WITH_ARIA_256_CBC_SHA384',219 'TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256',220 'TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384',221 'TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256',222 'TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384',223 'TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256',224 'TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384',225 'TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256',226 'TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384',227 'TLS_RSA_WITH_ARIA_128_GCM_SHA256',228 'TLS_RSA_WITH_ARIA_256_GCM_SHA384',229 'TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256',230 'TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384',231 'TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256',232 'TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384',233 'TLS_DH_anon_WITH_ARIA_128_GCM_SHA256',234 'TLS_DH_anon_WITH_ARIA_256_GCM_SHA384',235 'TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256',236 'TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384',237 'TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256',238 'TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384',239 'TLS_PSK_WITH_ARIA_128_CBC_SHA256',240 'TLS_PSK_WITH_ARIA_256_CBC_SHA384',241 'TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256',242 'TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384',243 'TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256',244 'TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384',245 'TLS_PSK_WITH_ARIA_128_GCM_SHA256',246 'TLS_PSK_WITH_ARIA_256_GCM_SHA384',247 'TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256',248 'TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384',249 'TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256',250 'TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384',251 'TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256',252 'TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384',253 'TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256',254 'TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384',255 'TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256',256 'TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384',257 'TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256',258 'TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384',259 'TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256',260 'TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384',261 'TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256',262 'TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384',263 'TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256',264 'TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384',265 'TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256',266 'TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384',267 'TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256',268 'TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384',269 'TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256',270 'TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384',271 'TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256',272 'TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384',273 'TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256',274 'TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384',275 'TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256',276 'TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384',277 'TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256',278 'TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384',279 'TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256',280 'TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384',281 'TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256',282 'TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384',283 'TLS_RSA_WITH_AES_128_CCM',284 'TLS_RSA_WITH_AES_256_CCM',285 'TLS_RSA_WITH_AES_128_CCM_8',286 'TLS_RSA_WITH_AES_256_CCM_8',287 'TLS_PSK_WITH_AES_128_CCM',288 'TLS_PSK_WITH_AES_256_CCM',289 'TLS_PSK_WITH_AES_128_CCM_8',290 'TLS_PSK_WITH_AES_256_CCM_8',291]292ciphers = []293found = set()294for hl, name, _, _ in csv.reader(sys.stdin):295 if name not in blacklist:296 continue297 found.add(name)298 high, low = hl.split(',')299 id = high + low[2:] + 'u'300 ciphers.append((id, name))301print '''\302enum {'''303for id, name in ciphers:304 print '{} = {},'.format(name, id)305print '''\306};307'''308for id, name in ciphers:309 print '''\310case {}:'''.format(name)311if len(found) != len(blacklist):312 print '{} found out of {}; not all cipher was found: {}'.format(313 len(found), len(blacklist),...

Full Screen

Full Screen

tls.py

Source:tls.py Github

copy

Full Screen

1#!/usr/bin/python32# Runs SSLyze on the TLS endpoints of a box and outputs3# the results so we can inspect the settings and compare4# against a known good version in tls_results.txt.5#6# Make sure you have SSLyze available:7# wget https://github.com/nabla-c0d3/sslyze/releases/download/release-0.11/sslyze-0_11-linux64.zip8# unzip sslyze-0_11-linux64.zip9#10# Then run:11#12# python3 tls.py yourservername13#14# If you are on a residential network that blocks outbound15# port 25 connections, then you can proxy the connections16# through some other host you can ssh into (maybe the box17# itself?):18#19# python3 --proxy user@ssh_host yourservername20#21# (This will launch "ssh -N -L10023:yourservername:testport user@ssh_host"22# to create a tunnel.)23import sys, subprocess, re, time, json, csv, io, urllib.request24######################################################################25# PARSE COMMAND LINE26proxy = None27args = list(sys.argv[1:])28while len(args) > 0:29 if args[0] == "--proxy":30 args.pop(0)31 proxy = args.pop(0)32 break33if len(args) == 0:34 print("Usage: python3 tls.py [--proxy ssh_host] hostname")35 sys.exit(0)36host = args[0]37######################################################################38SSLYZE = "sslyze-0_11-linux64/sslyze/sslyze.py"39common_opts = ["--sslv2", "--sslv3", "--tlsv1", "--tlsv1_1", "--tlsv1_2", "--reneg", "--resum",40 "--hide_rejected_ciphers", "--compression", "--heartbleed"]41# Recommendations from Mozilla as of May 20, 2015 at42# https://wiki.mozilla.org/Security/Server_Side_TLS.43#44# The 'modern' ciphers support Firefox 27, Chrome 22, IE 11,45# Opera 14, Safari 7, Android 4.4, Java 8. Assumes TLSv1.1,46# TLSv1.2 only, though we may also be allowing TLSv3.47#48# The 'intermediate' ciphers support Firefox 1, Chrome 1, IE 7,49# Opera 5, Safari 1, Windows XP IE8, Android 2.3, Java 7.50# Assumes TLSv1, TLSv1.1, TLSv1.2.51#52# The 'old' ciphers bring compatibility back to Win XP IE 6.53MOZILLA_CIPHERS_MODERN = "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK"54MOZILLA_CIPHERS_INTERMEDIATE = "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA"55MOZILLA_CIPHERS_OLD = "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA"56######################################################################57def sslyze(opts, port, ok_ciphers):58 # Print header.59 header = ("PORT %d" % port)60 print(header)61 print("-" * (len(header)))62 # What ciphers should we expect?63 ok_ciphers = subprocess.check_output(["openssl", "ciphers", ok_ciphers]).decode("utf8").strip().split(":")64 # Form the SSLyze connection string.65 connection_string = host + ":" + str(port)66 # Proxy via SSH.67 proxy_proc = None68 if proxy:69 connection_string = "localhost:10023"70 proxy_proc = subprocess.Popen(["ssh", "-N", "-L10023:%s:%d" % (host, port), proxy])71 time.sleep(3)72 try:73 # Execute SSLyze.74 out = subprocess.check_output([SSLYZE] + common_opts + opts + [connection_string])75 out = out.decode("utf8")76 # Trim output to make better for storing in git.77 if "SCAN RESULTS FOR" not in out:78 # Failed. Just output the error.79 out = re.sub("[\w\W]*CHECKING HOST\(S\) AVAILABILITY\n\s*-+\n", "", out) # chop off header that shows the host we queried80 out = re.sub("[\w\W]*SCAN RESULTS FOR.*\n\s*-+\n", "", out) # chop off header that shows the host we queried81 out = re.sub("SCAN COMPLETED IN .*", "", out)82 out = out.rstrip(" \n-") + "\n"83 # Print.84 print(out)85 # Pull out the accepted ciphers list for each SSL/TLS protocol86 # version outputted.87 accepted_ciphers = set()88 for ciphers in re.findall(" Accepted:([\w\W]*?)\n *\n", out):89 accepted_ciphers |= set(re.findall("\n\s*(\S*)", ciphers))90 # Compare to what Mozilla recommends, for a given modernness-level.91 print(" Should Not Offer: " + (", ".join(sorted(accepted_ciphers-set(ok_ciphers))) or "(none -- good)"))92 print(" Could Also Offer: " + (", ".join(sorted(set(ok_ciphers)-accepted_ciphers)) or "(none -- good)"))93 # What clients does that mean we support on this protocol?94 supported_clients = { }95 for cipher in accepted_ciphers:96 if cipher in cipher_clients:97 for client in cipher_clients[cipher]:98 supported_clients[client] = supported_clients.get(client, 0) + 199 print(" Supported Clients: " + (", ".join(sorted(supported_clients.keys(), key = lambda client : -supported_clients[client]))))100 # Blank line.101 print()102 finally:103 if proxy_proc:104 proxy_proc.terminate()105 try:106 proxy_proc.wait(5)107 except TimeoutExpired:108 proxy_proc.kill()109# Get a list of OpenSSL cipher names.110cipher_names = { }111for cipher in csv.DictReader(io.StringIO(urllib.request.urlopen("https://raw.githubusercontent.com/mail-in-a-box/user-agent-tls-capabilities/master/cipher_names.csv").read().decode("utf8"))):112 # not sure why there are some multi-line values, use first line:113 cipher["OpenSSL"] = cipher["OpenSSL"].split("\n")[0]114 cipher_names[cipher["IANA"]] = cipher["OpenSSL"]115# Get a list of what clients support what ciphers, using OpenSSL cipher names.116client_compatibility = json.loads(urllib.request.urlopen("https://raw.githubusercontent.com/mail-in-a-box/user-agent-tls-capabilities/master/clients.json").read().decode("utf8"))117cipher_clients = { }118for client in client_compatibility:119 if len(set(client['protocols']) & set(["TLS 1.0", "TLS 1.1", "TLS 1.2"])) == 0: continue # does not support TLS120 for cipher in client['ciphers']:121 cipher_clients.setdefault(cipher_names.get(cipher), set()).add("/".join(x for x in [client['client']['name'], client['client']['version'], client['client']['platform']] if x))122# Run SSLyze on various ports.123# SMTP124sslyze(["--starttls=smtp"], 25, MOZILLA_CIPHERS_OLD)125# SMTP Submission126sslyze(["--starttls=smtp"], 587, MOZILLA_CIPHERS_MODERN)127# HTTPS128sslyze(["--http_get", "--chrome_sha1", "--hsts"], 443, MOZILLA_CIPHERS_INTERMEDIATE)129# IMAP130sslyze([], 993, MOZILLA_CIPHERS_MODERN)131# POP3...

Full Screen

Full Screen

cryptutil.py

Source:cryptutil.py Github

copy

Full Screen

...46 return sha1_module.new(s).digest()47if sha256_module is not None:48 def hmacSha256(key, text):49 return hmac.new(key, text, sha256_module).digest()50 def sha256(s):51 return sha256_module.new(s).digest()52 SHA256_AVAILABLE = True53else:54 _no_sha256 = NotImplementedError(55 'Use Python 2.5, install pycrypto or install hashlib to use SHA256')56 def hmacSha256(unused_key, unused_text):57 raise _no_sha25658 def sha256(s):59 raise _no_sha25660 SHA256_AVAILABLE = False61try:62 from Crypto.Util.number import long_to_bytes, bytes_to_long63except ImportError:64 import pickle65 try:66 # Check Python compatiblity by raising an exception on import67 # if the needed functionality is not present. Present in68 # Python >= 2.369 pickle.encode_long70 pickle.decode_long71 except AttributeError:72 raise ImportError(...

Full Screen

Full Screen

Playwright tutorial

LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.

Chapters:

  1. What is Playwright : Playwright is comparatively new but has gained good popularity. Get to know some history of the Playwright with some interesting facts connected with it.
  2. How To Install Playwright : Learn in detail about what basic configuration and dependencies are required for installing Playwright and run a test. Get a step-by-step direction for installing the Playwright automation framework.
  3. Playwright Futuristic Features: Launched in 2020, Playwright gained huge popularity quickly because of some obliging features such as Playwright Test Generator and Inspector, Playwright Reporter, Playwright auto-waiting mechanism and etc. Read up on those features to master Playwright testing.
  4. What is Component Testing: Component testing in Playwright is a unique feature that allows a tester to test a single component of a web application without integrating them with other elements. Learn how to perform Component testing on the Playwright automation framework.
  5. Inputs And Buttons In Playwright: Every website has Input boxes and buttons; learn about testing inputs and buttons with different scenarios and examples.
  6. Functions and Selectors in Playwright: Learn how to launch the Chromium browser with Playwright. Also, gain a better understanding of some important functions like “BrowserContext,” which allows you to run multiple browser sessions, and “newPage” which interacts with a page.
  7. Handling Alerts and Dropdowns in Playwright : Playwright interact with different types of alerts and pop-ups, such as simple, confirmation, and prompt, and different types of dropdowns, such as single selector and multi-selector get your hands-on with handling alerts and dropdown in Playright testing.
  8. Playwright vs Puppeteer: Get to know about the difference between two testing frameworks and how they are different than one another, which browsers they support, and what features they provide.
  9. Run Playwright Tests on LambdaTest: Playwright testing with LambdaTest leverages test performance to the utmost. You can run multiple Playwright tests in Parallel with the LammbdaTest test cloud. Get a step-by-step guide to run your Playwright test on the LambdaTest platform.
  10. Playwright Python Tutorial: Playwright automation framework support all major languages such as Python, JavaScript, TypeScript, .NET and etc. However, there are various advantages to Python end-to-end testing with Playwright because of its versatile utility. Get the hang of Playwright python testing with this chapter.
  11. Playwright End To End Testing Tutorial: Get your hands on with Playwright end-to-end testing and learn to use some exciting features such as TraceViewer, Debugging, Networking, Component testing, Visual testing, and many more.
  12. Playwright Video Tutorial: Watch the video tutorials on Playwright testing from experts and get a consecutive in-depth explanation of Playwright automation testing.

Run Playwright Python automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful