test_MS17ScanAttack.py 1.0 KB

123456789101112131415161718192021222324
  1. import Test.ID2TAttackTest as Test
  2. import ID2TLib.TestLibrary as Lib
  3. sha_default = '7251523bec9294756ac7ced1ad8b3c53625fdad8648b86915c8a4699300ce46a'
  4. sha_ips_not_in_pcap = '6d150cf267fba423b5dabe44b36bee37b0d626c15041131a1f01a81f36ea3dfd'
  5. sha_multiple_params = '765f71390a75827fc362d55c07a2d46d74c6b918b767ae1da2706247adb60919'
  6. class UnitTestMS17Scan(Test.ID2TAttackTest):
  7. def test_MS17Scan_default(self):
  8. self.checksum_test([['MS17ScanAttack']], sha_default)
  9. def test_MS17Scan_ips_not_in_pcap(self):
  10. self.checksum_test([['MS17ScanAttack', 'ip.src=1.1.1.1', 'ip.dst=2.2.2.2']], sha_ips_not_in_pcap)
  11. def test_MS17Scan_multiple_params(self):
  12. ip_src = 'ip.src='+Lib.test_pcap_ips[0]
  13. ip_dst = 'ip.dst='+Lib.test_pcap_ips[1]
  14. self.checksum_test([['MS17ScanAttack', ip_src, ip_dst, 'mac.src=00:0C:21:1C:60:61',
  15. 'mac.dst=04:0C:32:2C:63:62', 'port.src=1337', 'port.dst=42']], sha_multiple_params)
  16. def test_MS17Scan_order(self):
  17. self.order_test([['MS17ScanAttack']])