contrib/fuzz/dirs_corpus.py
author Sandu Turcan <idlsoft@gmail.com>
Tue, 03 May 2022 21:44:30 -0400
branchstable
changeset 49241 6b10151b9621
parent 43844 b7af8a02a304
child 48875 6000f5b25c9b
permissions -rw-r--r--
narrow_widen_acl: enforce narrowacl in narrow_widen (SEC) Reviewer note: this was sent by the author as a simple bugfix, but can be considered a security patch, since it allows users to access things outside of the ACL, hence the (SEC) prefix. However, this affects the `narrow` extention which is still marked as experimental and has relatively few users aside from large companies with their own security layers on top from what we can gather. We feel (Alphare: or at least, I feel) like pinging the packaging list is enough in this case.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
43844
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
from __future__ import absolute_import, print_function
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
     2
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
import argparse
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
     4
import zipfile
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
     5
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
     6
ap = argparse.ArgumentParser()
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
     7
ap.add_argument("out", metavar="some.zip", type=str, nargs=1)
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
     8
args = ap.parse_args()
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
     9
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    10
with zipfile.ZipFile(args.out[0], "w", zipfile.ZIP_STORED) as zf:
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    11
    zf.writestr(
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    12
        "greek-tree",
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    13
        "\n".join(
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    14
            [
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    15
                "iota",
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    16
                "A/mu",
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    17
                "A/B/lambda",
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    18
                "A/B/E/alpha",
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    19
                "A/B/E/beta",
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    20
                "A/D/gamma",
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    21
                "A/D/G/pi",
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    22
                "A/D/G/rho",
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    23
                "A/D/G/tau",
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    24
                "A/D/H/chi",
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    25
                "A/D/H/omega",
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    26
                "A/D/H/psi",
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    27
            ]
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    28
        ),
b7af8a02a304 fuzz: add a seed corpus for the dirs fuzzer
Augie Fackler <augie@google.com>
parents:
diff changeset
    29
    )