def __getitem__(self, item): ## If the item refers to another object we return a new ## dissector object. Otherwise we just return the value itself result = _dissect.get_field(self.d, item) try: name=_dissect.get_name(result) return base_dissector(name,result) except: return result
def __getitem__(self, item): ## If the item refers to another object we return a new ## dissector object. Otherwise we just return the value itself result = _dissect.get_field(self.d, item) try: name = _dissect.get_name(result) return base_dissector(name, result) except: return result
def print_leaf(name, node): try: fields = _dissect.list_fields(node) print "Node %s" % name for field in fields: print field print_leaf("%s.%s" % (_dissect.get_name(node), field), _dissect.get_field(node, field)) except: print "%s = %r" % (name, node)
def print_leaf(name,node): try: fields = _dissect.list_fields(node) print "Node %s" % name for field in fields: print field print_leaf("%s.%s" % (_dissect.get_name(node),field), _dissect.get_field(node, field)) except: print "%s = %r" % (name,node)