def testScanBenign(self): "Tests the msseccli scanner's scan method." malicious, sigInfo = msseccli.scan(self.benignfile) self.assertFalse(malicious) expected = (self.scannervv, self.version, self.sigdate) actual = (sigInfo.scannervv, sigInfo.sigversion, sigInfo.sigdate) self.assertEquals(expected, actual)
def testScanMalicious(self): "Tests the msseccli scanner's scan method with an evil file." malicious, sigInfo = msseccli.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 msseccli not like that? # TODO: find a file that is malicious that msseccli 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)