瀏覽代碼

add MS17 efficiency test

update DDoS efficiency test
FIXME: improve EternalBlue efficiency
remove completed TODOs
Jens Keim 6 年之前
父節點
當前提交
84255cbc90
共有 1 個文件被更改,包括 7 次插入4 次删除
  1. 7 4
      code/Test/efficiency_testing.py

+ 7 - 4
code/Test/efficiency_testing.py

@@ -33,7 +33,6 @@ class EfficiencyTests(Test.ID2TAttackTest):
                                       factor=1000)
 
     def test_SQLi(self):
-        # FIXME: sometimes it takes 15.34028493521018 instead of the normal 7.150923313737726 seconds
         self.temporal_efficiency_test([['SQLiAttack', 'ip.dst=192.168.0.1']], time_limit=1.5, factor=1000)
 
     def test_Joomla(self):
@@ -44,8 +43,12 @@ class EfficiencyTests(Test.ID2TAttackTest):
 
     @mock.patch('Attack.BaseAttack.BaseAttack.write_attack_pcap', side_effect=Lib.write_attack_pcap)
     def test_DDoS(self, mock_write_attack_pcap):
-        # TODO: update attack args, when DDoS gets refactored
         self.temporal_efficiency_test([['DDoSAttack', 'attackers.count=10', 'packets.per-second=95',
-                                        'attack.duration=15']], time_limit=1.5, factor=1000)
+                                        'attack.duration=10']], time_limit=1.5, factor=1000)
 
-        # TODO: add temporal efficiency test(s) for EternalBlue and MS17
+    def test_MS17(self):
+        self.temporal_efficiency_test([['MS17Scan', 'ip.src=192.168.178.1']], time_limit=1.5, factor=1000)
+
+    # FIXME: improve EternalBlue efficiency
+    #def test_EternalBlue(self):
+    #    self.temporal_efficiency_test([['EternalBlue']], time_limit=1.5, factor=1000)