This decorator removes the temp file from disk. This is the case where
    you want to analyze from a payload.

def clean(func):
    """
    This decorator removes the temp file from disk. This is the case where
    you want to analyze from a payload.
    """
    def wrapper(*args, **kwargs):
        # tuple: output command, path given from command line,
        # path of templ file when you give the payload
        out, given_path, path = func(*args, **kwargs)

        try:
            if not given_path:
                os.remove(path)
        except OSError:
            pass

        return out

    return wrapper