Denis Waßmann %!s(int64=6) %!d(string=hai) anos
pai
achega
7da7958b30
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)