clslgrnc / tbrop

Consider removing the commented out code block PY-W0069
Anti-pattern
Major
10 months ago10 months old
Consider removing the commented out code block
454
455        totalcost = costMat + costChainCond + costDeref + costLength
456
457        #        if totalcost > self.max_cost:458        #            print(str(costMat), str(costChainCond), str(costDeref), str(costLength))
459
460        return totalcost
Consider removing the commented out code block
340
341        self.gadgetMatrix = GadgetMatrix(arch)
342
343        #        self.gadgetMatrix.matrix = sparse.identity(arch.size, dtype=bool).tocsr()344
345        for i in range(len(self.instList) - 1, -1, -1):
346            self.gadgetMatrix.addInst(self.instList[i])
Consider removing the commented out code block
219        if self.inst == None:
220            self.inst = chainInst
221        self.matrix = sparse.identity(self.arch.size, dtype=bool).tocsr()
222        # groups = chainInst.groups223        self.chainCond = sparse.lil_matrix((1, self.arch.size), dtype=bool)
224        len_chainInst_operands = len(chainInst.operands)
225        if capstone.CS_GRP_RET in chainInst.groups:
Consider removing the commented out code block
116            return self.arch.stackOverWrite
117        else:
118            pass
119            # if "stack_" in name:120
121            # index = index - self.arch.stackTop
122            # if index < 0:
Consider removing the commented out code block
 78            self.gadgets.append(gadget)
 79
 80    def defaultCallback(self, gadget, context):
 81        #        print(str(gadget.max_cost)) 82        if gadget.cost() > gadget.max_cost:
 83            return False
 84        else: