def check_script(script):
    """ Checks if a given string is a script (hash160) (or at least if it is formatted as if it is).

    :param script: Script to be checked.
    :type script: hex str
    :return: True if the signatures matches the format, raise exception otherwise.
    :rtype: bool
    """

    if not isinstance(script, str):
        raise Exception("Wrong script format.")
    elif len(script)/2 != 20:
        raise Exception("Wrong signature length " + str(len(script)/2))
    else:
        return True