Esempio n. 1
0
    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
Esempio n. 2
0
    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
Esempio n. 3
0
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)
Esempio n. 4
0
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)