瀏覽代碼

Bug fix 1/2

Denis Waßmann 6 年之前
父節點
當前提交
7da7958b30
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      code/Attack/MembersMgmtCommAttack.py

+ 1 - 1
code/Attack/MembersMgmtCommAttack.py

@@ -127,7 +127,7 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
 
         # PARAMETERS: initialize with default values
         # (values are overwritten if user specifies them)
-        self.add_param_value(Param.INJECT_AFTER_PACKET, randint(1, int(self.statistics.get_packet_count()/5)))
+        self.add_param_value(Param.INJECT_AFTER_PACKET, 1 + randint(0, self.statistics.get_packet_count() // 5))
 
         self.add_param_value(Param.PACKETS_PER_SECOND, 0)
         self.add_param_value(Param.FILE_XML, self.DEFAULT_XML_PATH)