Ejemplo n.º 1
0
 def testScanBenign(self):
     "Tests the mcafee scanner's scan method."
     malicious, sigInfo = mcafee.scan(self.benignfile)
     self.assertFalse(malicious)
     expected = (self.scannervv, self.version, self.sigdate)
     actual = (sigInfo.scannervv, sigInfo.sigversion, sigInfo.sigdate)
     self.assertEquals(expected, actual)
Ejemplo n.º 2
0
 def runScanner(self):
     "Profiles the mcafee scanhandler."
     for malware in self.malwares:
         print 'file:%s' % malware
         sys.stdout.flush()
         malicious, sigInfo = mcafee.scan(malware)
         print 'malicious:%s\nsigInfo:%s' % (malicious, str(sigInfo))
         sys.stdout.flush()
Ejemplo n.º 3
0
 def testScanMalicious(self):
     "Tests the mcafee scanner's scan method with an evil file."
     malicious, sigInfo = mcafee.scan(self.maliciousfile)
     expected = (self.scannervv, self.version, self.sigdate)
     actual = (sigInfo.scannervv, sigInfo.sigversion, sigInfo.sigdate)
     self.assertEquals(expected, actual)
     # TODO: embed the data of a malicious file?  or will mcafee not like that?
     # TODO: find a file that is malicious that mcafee thinks is malicious.
     # TODO: maybe a tracking cookie?
     # For now put this assertion at the end so the other can succeed if it will.
     self.assertTrue(malicious)