def __init__(self, bin_directory, output_directory, patched_xml_directory, patched_svg_directory): """ Constructor :param bin_directory: the path of the directory where the bin files of the symbols are stored. :param output_directory: the path of the directory where the library and the svg directory will be stored. :param patched_xml_directory: the path of the directory with patches for the library. :param patched_svg_directory: the path of the directory with patches for svg images. """ self.bin_directory = bin_directory self.output_directory = output_directory self.patched_xml_directory = patched_xml_directory self.patched_svg_directory = patched_svg_directory initialize_registry()
#!/usr/bin/env python """ Converts a binary style file blob to a symbol and dumps its properties to the console """ import argparse import pprint from io import BytesIO from slyr.parser.symbol_parser import read_symbol from slyr.converters.dictionary import DictionaryConverter from slyr.bintools.scanner import SCANNERS from slyr.parser.initalize_registry import initialize_registry initialize_registry() parser = argparse.ArgumentParser() parser.add_argument("file", help="bin file to parse") parser.add_argument('--debug', help='Debug mode', action='store_true') parser.add_argument('--scan', help='Scan mode', action='store_true') args = parser.parse_args() if args.scan: from colorama import init, Fore init() print('Scanning....') with open(args.file, 'rb') as f: