def confirm_action(msg):
    """ Prompts user for confirmation of action. """
    print(" [*] {}".format(msg))
    prompt = input(" [*] Y/N? ")
    if prompt in ["yes", "y"]:
        return True
    elif prompt in ["no", "n"]:
        return False
    else:
        print(" [-] Please answer with y/n")
        return confirm_action(msg)