test_JoomlaRegPrivExploit.py 1.1 KB

1234567891011121314151617181920212223242526
  1. import ID2TLib.TestLibrary as Lib
  2. import Test.ID2TAttackTest as Test
  3. sha_default = '3063eaf16f7344034e4ecb9b5a0cf6da8e160cb75f268dd3dfd3ad40b7c373a0'
  4. sha_ips_not_in_pcap = '69089b1832b62dfa4bdbc93a47db570e5c88fd78aad06cb440df9be312a4ee93'
  5. sha_multiple_params = '83addb1f0ef39bf74454dd88c14114cd5016f28538450b58ab6b545669427c87'
  6. # TODO: improve coverage
  7. class UnitTestJoomla(Test.ID2TAttackTest):
  8. def test_joomla_default(self):
  9. self.checksum_test([['JoomlaRegPrivExploit']], sha_default)
  10. def test_joomla_ips_not_in_pcap(self):
  11. self.checksum_test([['JoomlaRegPrivExploit', 'ip.src=1.1.1.1', 'ip.dst=2.2.2.2']], sha_ips_not_in_pcap)
  12. def test_joomla_multiple_params(self):
  13. ip_src = 'ip.src=' + Lib.test_pcap_ips[0]
  14. ip_dst = 'ip.dst=' + Lib.test_pcap_ips[1]
  15. self.checksum_test([['JoomlaRegPrivExploit', ip_src, ip_dst, 'mac.src=00:0C:21:1C:60:61',
  16. 'mac.dst=04:0C:32:2C:63:62', 'port.dst=42',
  17. 'target.host=www.ihopethisisnotarealwebsite.com']], sha_multiple_params)
  18. def test_joomla_order(self):
  19. self.order_test([['JoomlaRegPrivExploit']])