@@ -0,0 +1,1828 @@
+#!/usr/bin/env python3%0A'''%0Asome documentation%0A%0Aauthor: Willi Ballenthin%0Aemail: willi.ballenthin@gmail.com%0A'''%0Aimport sys%0Aimport logging%0A%0Aimport hexdump%0Aimport argparse%0A%0Aimport idb%0Aimport idb.netnode%0A%0A%0Alogger = logging.getLogger(__name__)%0A%0A%0Adef main(argv=None):%0A    if argv is None:%0A        argv = sys.argv%5B1:%5D%0A%0A    parser = argparse.ArgumentParser(description=%22Dump an IDB B-tree to a textual representation.%22)%0A    parser.add_argument(%22idbpath%22, type=str,%0A                        help=%22Path to input idb file%22)%0A    parser.add_argument(%22-v%22, %22--verbose%22, action=%22store_true%22,%0A                        help=%22Enable debug logging%22)%0A    parser.add_argument(%22-q%22, %22--quiet%22, action=%22store_true%22,%0A                        help=%22Disable all output but errors%22)%0A    args = parser.parse_args(args=argv)%0A%0A    if args.verbose:%0A        logging.basicConfig(level=logging.DEBUG)%0A        logging.getLogger().setLevel(logging.DEBUG)%0A    elif args.quiet:%0A        logging.basicConfig(level=logging.ERROR)%0A        logging.getLogger().setLevel(logging.ERROR)%0A    else:%0A        logging.basicConfig(level=logging.INFO)%0A        logging.getLogger().setLevel(logging.INFO)%0A%0A    with idb.from_file(args.idbpath) as db:%0A        cursor = db.id0.get_min()%0A        while True:%0A            if cursor.key%5B0%5D == 0x2E:%0A                k = idb.netnode.parse_key(cursor.key)%0A                print('nodeid: %25x tag: %25s index: %25s' %25 (%0A                      k.nodeid,%0A                      k.tag,%0A                      hex(k.index) if k.index is not None else 'None'))%0A            else:%0A                hexdump.hexdump(cursor.key)%0A%0A            hexdump.hexdump(bytes(cursor.value))%0A            print('--')%0A%0A            try:%0A                cursor.next()%0A            except IndexError:%0A                break%0A%0A    return 0%0A%0A%0Aif __name__ == %22__main__%22:%0A    sys.exit(main())%0A

add script for dumping all netnode values