Parcourir la source

Fixed maximum / minimum response times for mmbshpmgmt attack

leonboeck il y a 5 ans
Parent
commit
4b1683e433
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      code/Attack/MembersMgmtCommAttack.py

+ 2 - 1
code/Attack/MembersMgmtCommAttack.py

@@ -362,7 +362,8 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
                         # local communication
                         # local communication
                         dist = Lea.fromSeq(avg_delay_local)
                         dist = Lea.fromSeq(avg_delay_local)
                     delay = 0
                     delay = 0
-                    while delay < 1:
+                    
+                 while delay < 50 or (float(delay)*0.000001 > 5):
                         delay = dist.random()
                         delay = dist.random()
                     respns_msg.time = req_msg.time + float(delay) * 0.000001
                     respns_msg.time = req_msg.time + float(delay) * 0.000001