def getTypeInfo(): print "Initializing Data Structures" typedBlocks = [] nonTypedBlocks = [] (taintBlockMap,blockTaintDictionary,taintOffsetToBlock) = initDataStructures() for taint in taintBlockMap: isNonTypedBlock=True block=taintBlockMap[taint] if forwardTraceContainsBlock(taint, traceFile ) is False: # not Typed if list(set(blockTaintDictionary[block]) & set(typedBlockTaintList)) == []: #print "Non Typed Block",block # Non Typed Block nonTypedBlocks.append(block) else: #print "Typed Block", block, taint typedBlocks.append(block) typedBlockTaintList.append(taint) while block in nonTypedBlocks: nonTypedBlocks.remove(block) else: # print "FWD trace from ",taint,block," leading to another block" typedBlocks.append(block) typedBlockTaintList.append(taint) while block in nonTypedBlocks: nonTypedBlocks.remove(block) return (list(sorted(set(typedBlocks))), list(sorted(set(nonTypedBlocks))), taintBlockMap)
def getTypeInfo(): print "Initializing Data Structures" typedBlocks = [] nonTypedBlocks = [] (taintBlockMap, blockTaintDictionary, taintOffsetToBlock) = initDataStructures() for taint in taintBlockMap: isNonTypedBlock = True block = taintBlockMap[taint] if forwardTraceContainsBlock(taint, traceFile) is False: # not Typed if list( set(blockTaintDictionary[block]) & set(typedBlockTaintList)) == []: #print "Non Typed Block",block # Non Typed Block nonTypedBlocks.append(block) else: #print "Typed Block", block, taint typedBlocks.append(block) typedBlockTaintList.append(taint) while block in nonTypedBlocks: nonTypedBlocks.remove(block) else: # print "FWD trace from ",taint,block," leading to another block" typedBlocks.append(block) typedBlockTaintList.append(taint) while block in nonTypedBlocks: nonTypedBlocks.remove(block) return (list(sorted(set(typedBlocks))), list(sorted(set(nonTypedBlocks))), taintBlockMap)
def getTypeInfo(taintBlockMap,blockTaintDictionary): for taint in taintBlockMap: block=taintBlockMap[taint] if forwardTraceContainsBlock(taint,'/tmp/testfs.py') is False: # not Typed if list(set(blockTaintDictionary[block]) & set(typedBlockTaintList)) == []: nonTypedBlocks.append(block) else: typedBlocks.append(block) typedBlockTaintList.append(taint) while block in nonTypedBlocks: nonTypedBlocks.remove(block) else: typedBlocks.append(block) typedBlockTaintList.append(taint) while block in nonTypedBlocks: nonTypedBlocks.remove(block) return (typedBlocks,nonTypedBlocks)
def getTypeInfo(taintBlockMap, blockTaintDictionary): for taint in taintBlockMap: block = taintBlockMap[taint] if forwardTraceContainsBlock(taint, '/tmp/testfs.py') is False: # not Typed if list( set(blockTaintDictionary[block]) & set(typedBlockTaintList)) == []: nonTypedBlocks.append(block) else: typedBlocks.append(block) typedBlockTaintList.append(taint) while block in nonTypedBlocks: nonTypedBlocks.remove(block) else: typedBlocks.append(block) typedBlockTaintList.append(taint) while block in nonTypedBlocks: nonTypedBlocks.remove(block) return (typedBlocks, nonTypedBlocks)
def getTypeInfo(taintBlockMap,blockTaintDictionary): for taint in taintBlockMap: isNonTypedBlock=True block=taintBlockMap[taint] if forwardTraceContainsBlock(taint,'/tmp/testfs.py') is False: # not Typed #if forwardTraceReferencesSubelements(taint,'/tmp/testfs.py') is False: # not Typed if list(set(blockTaintDictionary[block]) & set(typedBlockTaintList)) == []: #print "Non Typed Block",block # Non Typed Block nonTypedBlocks.append(block) else: #print "Typed Block", block, taint typedBlocks.append(block) typedBlockTaintList.append(taint) while block in nonTypedBlocks: nonTypedBlocks.remove(block) else: typedBlocks.append(block) typedBlockTaintList.append(taint) while block in nonTypedBlocks: nonTypedBlocks.remove(block) return (typedBlocks,nonTypedBlocks)
def getTypeInfo(taintBlockMap, blockTaintDictionary): for taint in taintBlockMap: isNonTypedBlock = True block = taintBlockMap[taint] if forwardTraceContainsBlock(taint, '/tmp/testfs.py') is False: # not Typed #if forwardTraceReferencesSubelements(taint,'/tmp/testfs.py') is False: # not Typed if list( set(blockTaintDictionary[block]) & set(typedBlockTaintList)) == []: #print "Non Typed Block",block # Non Typed Block nonTypedBlocks.append(block) else: #print "Typed Block", block, taint typedBlocks.append(block) typedBlockTaintList.append(taint) while block in nonTypedBlocks: nonTypedBlocks.remove(block) else: typedBlocks.append(block) typedBlockTaintList.append(taint) while block in nonTypedBlocks: nonTypedBlocks.remove(block) return (typedBlocks, nonTypedBlocks)