Beispiel #1
0
 def test_initKEXHash(self):
     netPackets = pcapReader.openPCAPFile(pcapPath)
     ikePackets = pcapReader.getISAKMPPackets(netPackets)
     initSAPacket = ikeParser.getIniatorSAPacket(ikePackets)
     initKEX = ikeParser.getPayloadFromISAKMP(initSAPacket,ikeParser.ISAKMP_KEX_NAME)
     initKEXHash  = sha256(initKEX).hexdigest()
     self.assertEqual(initKEXHash, TestStringMethods.initKEXHash)
Beispiel #2
0
 def test_SAPayloadHash(self):
     netPackets = pcapReader.openPCAPFile(pcapPath)
     ikePackets = pcapReader.getISAKMPPackets(netPackets)
     initSAPacket = ikeParser.getIniatorSAPacket(ikePackets)
     SAPayload = ikeParser.getSAPayloadFromInitPacket(initSAPacket)
     SAPayloadHash = sha256(SAPayload).hexdigest()
     self.assertEqual(SAPayloadHash, TestStringMethods.SAPayloadHash)
Beispiel #3
0
 def test_initCookieHash(self):
     netPackets = pcapReader.openPCAPFile(pcapPath)
     ikePackets = pcapReader.getISAKMPPackets(netPackets)
     initSAPacket = ikeParser.getIniatorSAPacket(ikePackets)
     initCookie = ikeParser.getCookieFromISAKMP(respSAPacket,False)
     initCookieHash  = sha256(initCookie).hexdigest()
     self.assertEqual(initCookieHash, TestStringMethods.initCookieHash)
Beispiel #4
0
 def test_initSAPacket(self):
     netPackets = pcapReader.openPCAPFile(pcapPath)
     ikePackets = pcapReader.getISAKMPPackets(netPackets)
     initSAPacket = ikeParser.getIniatorSAPacket(ikePackets)
     initHash = sha256(raw(initSAPacket)).hexdigest()
     self.assertEqual(initHash, TestStringMethods.initSAPacketHash)