Ejemplo n.º 1
0
    def __init__(self, kind):
        self.kind = kind  # This node's kind
        self.tainted = False  # assuming its good until an entry point is found
        self.visited = False  # has this node been visited already?
        self.knowledge = KindKnowledge()

        # Increment this node's ID
        self.id = Node.id
        Node.id += 1
Ejemplo n.º 2
0
    def is_tainted(self, knowledge):

        self.knowledge = KindKnowledge.union(self.knowledge, knowledge)

        # Handle the body instructions (like a ChildfulNode)
        return_knowledge = ChildfulNode.is_tainted(self, self.knowledge)

        self.knowledge = KindKnowledge(
        )  # Empty its knowledge so that the next call doesn't have values (yet)

        return return_knowledge