:mod:`expliot.plugins.internet.khijack` ======================================= .. py:module:: expliot.plugins.internet.khijack Module Contents --------------- .. py:class:: KHijack Bases: :class:`expliot.core.tests.test.Test` .. method:: cipher(self, str, encrypt=True) Encrypt/Decrypt a string using the known AES key of the smartplug. :param str: string to encrypt or decrypt :param encrypt: True means encrypt (default), false means decrypt :return: The encrypted/decrypted string .. method:: send_recv(self, ip, port, m) Send and then receive encrypted data to/from the smartplug :param ip: IP address of the smartplug :param port: Port number of the listening service :param m: plaintext message :return: The response received from the smartplug .. method:: createmsg(self, cmd, cid=None) Create the command message to be sent to the the smartplug :param cmd: the command to send - open/close/confirm :param cid: confirmation id used in confirm command :return: The command message .. method:: get_confirmid(self, m) Extract the confirmation id from the response message :param self: :param m: The response message :return: The confirmation id .. method:: execute(self)