#!/usr/bin/env python3 # # Interpret a file that crashes an fuzz_ndr_X binary. # # Copyright (C) Catalyst IT Ltd. 2019 import sys import os from base64 import b64encode import struct import argparse import re TYPE_MASK = 3 TYPES = ['struct', 'in', 'out'] FLAGS = [ (4, 'ndr64', '--ndr64'), ] def print_if_verbose(*args, **kwargs): if verbose: print(*args, **kwargs) def process_one_file(f): print_if_verbose(f.name) print_if_verbose('-' * len(f.name)) b = f.read() flags, function = struct.unpack('