def __init__(self, *args, **kwargs): self.callbacks = {} # fname:func # trickery: disable unneeded automata internal sockets by faking a null-obj kwargs['ll'] = type('obj', (object, ), {}) kwargs['recvsock'] = kwargs['ll'] Automaton.__init__(self, *args, **kwargs) self.STATES = { TLSClientHello: 'CLIENT_HELLO_SENT', TLSServerHello: 'SERVER_HELLO_RECV', TLSCertificate: 'SERVER_HELLO_RECV', TLSCertificateList: 'SERVER_HELLO_RECV', TLSServerHelloDone: 'SERVER_HELLO_RECV', TLSFinished: 'CLIENT_FINISH_SENT', TLSChangeCipherSpec: 'CLIENT_CHANGE_CIPHERSPEC_SENT', TLSClientKeyExchange: 'CLIENT_KEY_EXCHANGE_SENT', # TLSServerKeyExchange: 'xxx', TLSPlaintext: 'CLIENT_APPDATA_SENT', TLSDecryptablePacket: 'CLIENT_APPDATA_SENT', } self.ACTIONS = { TLSClientHello: 'send_client_hello', TLSServerHello: 'recv_server_hello', TLSCertificate: 'recv_server_hello', TLSCertificateList: 'recv_server_hello', TLSServerHelloDone: 'recv_server_hello', TLSFinished: 'send_client_finish', TLSChangeCipherSpec: 'send_client_change_cipher_spec', TLSClientKeyExchange: 'send_client_key_exchange', # TLSServerKeyExchange: 'xxx', TLSPlaintext: 'send_client_appdata', TLSDecryptablePacket: 'send_client_appdata', }
def __init__(self, *args, **kwargs): self.callbacks = {} # fname:func Automaton.__init__(self, *args, **kwargs) self.STATES = {TLSClientHello: 'CLIENT_HELLO_SENT', TLSServerHello: 'SERVER_HELLO_RECV', TLSCertificate: 'SERVER_HELLO_RECV', TLSCertificateList: 'SERVER_HELLO_RECV', TLSServerHelloDone: 'SERVER_HELLO_RECV', TLSFinished: 'CLIENT_FINISH_SENT', TLSChangeCipherSpec: 'CLIENT_CHANGE_CIPHERSPEC_SENT', TLSClientKeyExchange: 'CLIENT_KEY_EXCHANGE_SENT', # TLSServerKeyExchange: 'xxx', TLSPlaintext: 'CLIENT_APPDATA_SENT', TLSDecryptablePacket: 'CLIENT_APPDATA_SENT', } self.ACTIONS = {TLSClientHello: 'send_client_hello', TLSServerHello: 'recv_server_hello', TLSCertificate: 'recv_server_hello', TLSCertificateList: 'recv_server_hello', TLSServerHelloDone: 'recv_server_hello', TLSFinished: 'send_client_finish', TLSChangeCipherSpec: 'send_client_change_cipher_spec', TLSClientKeyExchange: 'send_client_key_exchange', # TLSServerKeyExchange: 'xxx', TLSPlaintext: 'send_client_appdata', TLSDecryptablePacket: 'send_client_appdata', }
def __init__(self, *args, **kwargs): self.callbacks = {} # fname:func # trickery: disable unneeded automata internal sockets by faking a null-obj kwargs['ll'] = type('obj', (object,), {}) kwargs['recvsock'] = kwargs['ll'] Automaton.__init__(self, *args, **kwargs) self.STATES = {TLSClientHello: 'CLIENT_HELLO_SENT', TLSServerHello: 'SERVER_HELLO_RECV', TLSCertificate: 'SERVER_HELLO_RECV', TLSCertificateList: 'SERVER_HELLO_RECV', TLSServerHelloDone: 'SERVER_HELLO_RECV', TLSFinished: 'CLIENT_FINISH_SENT', TLSChangeCipherSpec: 'CLIENT_CHANGE_CIPHERSPEC_SENT', TLSClientKeyExchange: 'CLIENT_KEY_EXCHANGE_SENT', # TLSServerKeyExchange: 'xxx', TLSPlaintext: 'CLIENT_APPDATA_SENT', TLSDecryptablePacket: 'CLIENT_APPDATA_SENT', } self.ACTIONS = {TLSClientHello: 'send_client_hello', TLSServerHello: 'recv_server_hello', TLSCertificate: 'recv_server_hello', TLSCertificateList: 'recv_server_hello', TLSServerHelloDone: 'recv_server_hello', TLSFinished: 'send_client_finish', TLSChangeCipherSpec: 'send_client_change_cipher_spec', TLSClientKeyExchange: 'send_client_key_exchange', # TLSServerKeyExchange: 'xxx', TLSPlaintext: 'send_client_appdata', TLSDecryptablePacket: 'send_client_appdata', }
def __init__(self, *args, **kwargs): self.callbacks = {} # fname:func Automaton.__init__(self, *args, **kwargs) self.STATES = {TLSClientHello: 'CLIENT_HELLO_RECV', TLSServerHello: 'SERVER_HELLO_SENT', TLSCertificate: 'SERVER_CERTIFICATES_SENT', TLSCertificateList: 'SERVER_CERTIFICATES_SENT', TLSServerHelloDone: 'SERVER_HELLO_DONE_SENT', TLSFinished: 'SERVER_FINISH_SENT', TLSChangeCipherSpec: 'SERVER_CCS_SENT', TLSClientKeyExchange: 'CLIENT_KEY_EXCHANGE_RECV', TLSServerKeyExchange: 'SERVER_KEY_EXCHANGE_SENT', TLSPlaintext: 'SERVER_APPDATA_SENT', TLSDecryptablePacket: 'SERVER_APPDATA_SENT', } self.ACTIONS = {TLSClientHello: 'recv_client_hello', TLSServerHello: 'send_server_hello', TLSCertificate: 'send_server_certificates', TLSCertificateList: 'send_server_certificates', TLSServerHelloDone: 'send_server_hello_done', TLSFinished: 'send_server_finish', TLSChangeCipherSpec: 'send_server_ccs', TLSClientKeyExchange: 'recv_client_key_exchange', TLSServerKeyExchange: 'send_server_key_exchange', TLSPlaintext: 'send_server_appdata', TLSDecryptablePacket: 'send_server_appdata', }