@@ -0,0 +1,1473 @@
+#!/usr/bin/python3%0A# SPDX-License-Identifier: LGPL-2.1+%0A%0Aimport argparse%0Aimport sys%0Aimport subprocess%0Aimport os%0A%0Adef main():%0A    parser = argparse.ArgumentParser(description='Run afl-fuzz on all cores')%0A    parser.add_argument('--input', '-i', help='fuzzing input directory')%0A    parser.add_argument('--output', '-o', help='findings output directory')%0A    parser.add_argument('path', type=str, help='the fuzzer tool')%0A    args = parser.parse_args()%0A    if not args.input and not args.output:%0A        print('-i and -o required')%0A        return 1%0A    if not args.path:%0A        print('tool name required')%0A        return 1%0A%0A    # create if not already exists%0A    if not os.path.exists(args.output):%0A        os.makedirs(args.output)%0A%0A    # run the main instance%0A    envp = None%0A    argv = %5B'afl-fuzz', '-m300', '-i', args.input, '-o', args.output,%0A            '-M', 'fuzzer00', args.path, '@@'%5D%0A    print(argv)%0A    p = subprocess.Popen(argv, env=envp)%0A%0A    # run the secondary instances%0A    cs = %5B%5D%0A    for i in range(1, os.cpu_count()):%0A        argv = %5B'afl-fuzz', '-m300', '-i', args.input, '-o', args.output,%0A                '-S', 'fuzzer%2502i' %25 i, args.path, '@@'%5D%0A        print(argv)%0A        cs.append(subprocess.Popen(argv, env=envp, stdout=subprocess.DEVNULL))%0A%0A    # wait for the main instance%0A    try:%0A        p.wait()%0A    except KeyboardInterrupt as _:%0A        pass%0A    for c in cs:%0A        c.terminate()%0A    return 0%0A%0Aif __name__ == '__main__':%0A    sys.exit(main())%0A

Add a parallel fuzzing script