Example #1
0
    def __get_authkey(self, email, data):
        user_address = extract_address(email["from"])
        user_hashkey = self.__extract_hashkey(data)

        authkey = AuthKey(user_address, user_hashkey)

        return authkey
Example #2
0
    def __get_authkey(self, email, data):
        user_address = extract_address(email["from"])
        user_hashkey = self.__extract_hashkey(data)

        authkey = AuthKey(user_address, user_hashkey)

        return authkey
Example #3
0
    def __get_command_id(self, email):
        cmd_id = None

        # Buscamos en el asunto del correo
        email_subject = email["subject"].lower().lstrip().rstrip()

        subject_regex = "^(\w+:\s*)*@cmd:\s?(\w+)$"
        match = re.search(subject_regex, email_subject)

        if match:
            cmd_id = match.group(2)

        # Intenta buscar el comando en la cabecera "To:" del correo electrónico
        else:
            cmd_address = extract_address(email["to"])
            cmd_id = cmd_address.split("@")[0]

        return cmd_id
Example #4
0
    def __get_command_id(self, email):
        cmd_id = None

        # Buscamos en el asunto del correo
        email_subject = email["subject"].lower().lstrip().rstrip()

        subject_regex = "^(\w+:\s*)*@cmd:\s?(\w+)$"
        match = re.search(subject_regex, email_subject)

        if match:
            cmd_id = match.group(2)

        # Intenta buscar el comando en la cabecera "To:" del correo electrónico
        else:
            cmd_address = extract_address(email["to"])
            cmd_id = cmd_address.split("@")[0]

        return cmd_id