def _detect(self):
     callGraph = CallGraph(
         self.slither
     )  # 得到.sol文件的call_graph(internalcall 和 externalcall糅杂在一起)
     dangerFunctionList = set()
     for c in self.contracts:
         self.detect_reentrancy(c, callGraph, dangerFunctionList)
     return []
    def _detect(self):
        #icfg = ICFG(self.slither)
        #icfg.build_ICFG()
        ethNodeList, taintNodeList, cfgEndNodeList = self.getAllEthNode_AllTaintNode()
        callGraph = CallGraph(self.slither)


        for c in self.contracts:
            self.detect_reentrancy(c, ethNodeList, taintNodeList, callGraph)
        return []
Example #3
0
 def _detect(self):
     icfg = ICFG(self.slither)
     icfg.build_ICFG()
     eth_node_list, taint_node_list, cfg_end_node_list = self.getAllEthNode_AllTaintNode(
     )
     call_graph = CallGraph(self.slither)
     for c in self.contracts:
         self.detect_reentrancy(c, eth_node_list, taint_node_list, icfg,
                                call_graph, cfg_end_node_list)
     return []
Example #4
0
 def _detect(self):
     callGraph = CallGraph(self.slither)
     for function in self.slither.functions:
         callGraph.test(function)
     return []