def _on_connection_made(self):
        """
        Gets called when the TCP connection to kik's servers is done and we are connected.
        Now we might initiate a login request or an auth request.
        """
        if self.username is not None and self.password is not None and self.kik_node is not None:
            # we have all required credentials, we can authenticate
            log.info("[+] Establishing authenticated connection using kik node '{}'...".format(self.kik_node))

            message = login.EstablishAuthenticatedSessionRequest(self.kik_node, self.username, self.password, self.device_id_override)
            self.initial_connection_payload = message.serialize()
        else:
            self.initial_connection_payload = '<k anon="">'.encode()

        self.connection.send_raw_data(self.initial_connection_payload)
def _on_connection_made ( self ) : if self . username is not None and self . password is not None and self . kik_node is not None : log . info ( "[+] Establishing authenticated connection using kik node '{}'..." . format ( self . kik_node ) ) message = login . EstablishAuthenticatedSessionRequest ( self . kik_node , self . username , self . password , self . device_id_override ) self . initial_connection_payload = message . serialize ( ) else : self . initial_connection_payload = '<k anon="">' . encode ( ) self . connection . send_raw_data ( self . initial_connection_payload )
Gets called when the TCP connection to kik's servers is done and we are connected.
        Now we might initiate a login request or an auth request.