def main(): parser = argparse.ArgumentParser(description="Parse and reconstruct dex file") parser.add_argument('source',help='Source DEX file') parser.add_argument('target',help='Target DEX file') args = parser.parse_args() dex = Dex(args.source) dex.save(args.target)
def main(): parser = argparse.ArgumentParser( description="Parse and reconstruct dex file") parser.add_argument('source', help='Source DEX file') parser.add_argument('target', help='Target DEX file') args = parser.parse_args() dex = Dex(args.source) dex.save(args.target)
def main(): parser = argparse.ArgumentParser(description="Parse and reconstruct dex file") parser.add_argument('target',help='Target DEX file') parser.add_argument('string',help='String to be added') args = parser.parse_args() dex = Dex(args.target) dex.add_string(args.string) dex.save("out2.dex") update_signature("out2.dex") update_checksum("out2.dex") print "Done"
def main(): parser = argparse.ArgumentParser(description="Add a string to a DEX file.") parser.add_argument('source',help='Source DEX file') parser.add_argument('target',help='Target DEX file') parser.add_argument('string',help='String to be added') args = parser.parse_args() dex = Dex(args.source) dex.add_string(args.string) dex.save(args.target) update_signature(args.target) update_checksum(args.target) print "Done"
def main(): parser = argparse.ArgumentParser(description="Add a string to a DEX file.") parser.add_argument('source', help='Source DEX file') parser.add_argument('target', help='Target DEX file') parser.add_argument('string', help='String to be added') args = parser.parse_args() dex = Dex(args.source) dex.add_string(args.string) dex.save(args.target) update_signature(args.target) update_checksum(args.target) print "Done"
def main(): parser = argparse.ArgumentParser( description="Parse and reconstruct dex file") parser.add_argument('target', help='Target DEX file') parser.add_argument('string', help='String to be added') args = parser.parse_args() dex = Dex(args.target) dex.add_string(args.string) dex.save("out2.dex") update_signature("out2.dex") update_checksum("out2.dex") print "Done"
def print_dump(args): printer = DexPrinter(args.meta) dex = Dex(args.dex_file) if args.H: printer.header(dex.header()) if args.X: printer.maplist(dex.map_list()) if args.S: for item in dex.string_ids(): printer.stringid(item) if args.T: for item in dex.type_ids(): printer.typeid(item) if args.P: for item in dex.proto_ids(): printer.protoid(item) if args.F: for item in dex.field_ids(): printer.fieldid(item) if args.M: for item in dex.method_ids(): printer.methodid(item) if args.C: for item in dex.class_defs(): printer.classdef(item) if args.t: for item in dex.type_lists(): printer.typelist(item) if args.s: for item in dex.string_data_list(): printer.stringdata(item) if args.c: for item in dex.class_data_list(): printer.classdata(item) if args.b: for item in dex.code_list(): printer.codeitem(item) if args.d: for item in dex.debug_info_list(): printer.debuginfo(item) if args.i: for item in dex.encoded_arrays(): printer.encodedarray(item) if args.n: for item in dex.an_directories(): printer.annotationdirectoryitem(item) if args.l: for item in dex.an_set_ref_lists(): printer.annotationsetreflist(item) if args.e: for item in dex.an_set(): printer.annotationsetitem(item) if args.r: for item in dex.annotations(): printer.annotationitem(item)