Esempio n. 1
0
def print_dump(args):
    printer = DexPrinter(args.meta)

    bs = ByteStream(args.dex_file)
    dex = dxlib.dx_parse(bs._bs).contents

    if args.H:
        printer.header(dex.header.contents)
    if args.X:
        printer.maplist(dex.map_list.contents)
    if args.S:
        for i in xrange(dex.header.contents.string_ids_size):
            printer.stringid(dex.string_ids[i].contents)
    if args.T:
        for i in xrange(dex.header.contents.type_ids_size):
            printer.typeid(dex.type_ids[i].contents)
    if args.P:
        for i in xrange(dex.header.contents.proto_ids_size):
            printer.protoid(dex.proto_ids[i].contents)
    if args.F:
        for i in xrange(dex.header.contents.field_ids_size):
            printer.fieldid(dex.field_ids[i].contents)
    if args.M:
        for i in xrange(dex.header.contents.method_ids_size):
            printer.methodid(dex.method_ids[i].contents)
    if args.C:
        for i in xrange(dex.header.contents.class_defs_size):
            printer.classdef(dex.class_defs[i].contents)
    if args.t:
        for i in xrange(dex.meta.type_lists_size):
            printer.typelist(dex.type_lists[i].contents)
    if args.s:
        for i in xrange(dex.header.contents.string_ids_size):
            printer.stringdata(dex.string_data_list[i].contents)
    if args.c:
        for i in xrange(dex.meta.class_data_size):
            printer.classdata(dex.class_data[i].contents)
    if args.b:
        for i in xrange(dex.meta.code_list_size):
            printer.codeitem(dex.code_list[i].contents)
    if args.d:
        for i in xrange(dex.meta.debug_info_list_size):
            printer.debuginfo(dex.debug_info_list[i].contents)
    if args.i:
        for i in xrange(dex.meta.encoded_arrays_size):
            printer.encodedarray(dex.encoded_arrays[i].contents)
    if args.n:
        for i in xrange(dex.meta.an_directories_size):
            printer.annotationdirectoryitem(dex.an_directories[i].contents)
    if args.l:
        for i in xrange(dex.meta.an_set_ref_lists_size):
            printer.annotationsetreflist(dex.an_set_ref_lists[i].contents)
    if args.e:
        for i in xrange(dex.meta.an_set_size):
            printer.annotationsetitem(dex.an_set[i].contents)
    if args.r:
        for i in xrange(dex.meta.annotations_size):
            printer.annotationitem(dex.annotations[i].contents)
Esempio n. 2
0
def print_dump(args):
    printer = DexPrinter(args.meta)

    bs = ByteStream(args.dex_file)
    dex = dxlib.dx_parse(bs._bs).contents

    if args.H:
        printer.header(dex.header.contents)
    if args.X:
        printer.maplist(dex.map_list.contents)   
    if args.S:
        for i in xrange(dex.header.contents.string_ids_size):
            printer.stringid(dex.string_ids[i].contents)
    if args.T:
        for i in xrange(dex.header.contents.type_ids_size):
            printer.typeid(dex.type_ids[i].contents)
    if args.P:
        for i in xrange(dex.header.contents.proto_ids_size):
            printer.protoid(dex.proto_ids[i].contents)
    if args.F:
        for i in xrange(dex.header.contents.field_ids_size):
            printer.fieldid(dex.field_ids[i].contents)
    if args.M:
        for i in xrange(dex.header.contents.method_ids_size):
            printer.methodid(dex.method_ids[i].contents)
    if args.C:
        for i in xrange(dex.header.contents.class_defs_size):
            printer.classdef(dex.class_defs[i].contents)
    if args.t:
        for i in xrange(dex.meta.type_lists_size):
            printer.typelist(dex.type_lists[i].contents)
    if args.s:
        for i in xrange(dex.header.contents.string_ids_size):
            printer.stringdata(dex.string_data_list[i].contents)
    if args.c:
        for i in xrange(dex.meta.class_data_size):
            printer.classdata(dex.class_data[i].contents)
    if args.b:
        for i in xrange(dex.meta.code_list_size):
            printer.codeitem(dex.code_list[i].contents)
    if args.d:
        for i in xrange(dex.meta.debug_info_list_size):
            printer.debuginfo(dex.debug_info_list[i].contents)
    if args.i:
        for i in xrange(dex.meta.encoded_arrays_size):
            printer.encodedarray(dex.encoded_arrays[i].contents)
    if args.n:
        for i in xrange(dex.meta.an_directories_size):
            printer.annotationdirectoryitem(dex.an_directories[i].contents)
    if args.l:
        for i in xrange(dex.meta.an_set_ref_lists_size):
            printer.annotationsetreflist(dex.an_set_ref_lists[i].contents)
    if args.e:
        for i in xrange(dex.meta.an_set_size):
            printer.annotationsetitem(dex.an_set[i].contents)
    if args.r:
        for i in xrange(dex.meta.annotations_size):
            printer.annotationitem(dex.annotations[i].contents)
Esempio n. 3
0
def print_dump(args):
    printer = DexPrinter(args.meta)

    dex = DexPy(args.dex_file)
    dex.parse()

    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.class_statics:
            printer.encodedarray(item)
    if args.n:
        for item in dex.class_annotations:
            printer.annotationdirectoryitem(item)
    if args.l:
        for item in dex.annotation_set_ref_lists:
            printer.annotationsetreflist(item)
    if args.e:
        for item in dex.annotation_sets:
            printer.annotationsetitem(item)
    if args.r:
        for item in dex.annotations:
            printer.annotationitem(item)