Minor fixes.

This commit is contained in:
pablo 2021-01-03 20:05:34 +01:00
parent e34a34acaf
commit 007f458cd5
3 changed files with 140 additions and 39 deletions

View file

@ -95,7 +95,10 @@ class UrlAttack:
except Exception as e:
self.success = False
if random.randrange(0, 100) < UrlAttack.identity_change_probability:
if (
not self.success
or random.randrange(0, 100) < UrlAttack.identity_change_probability
):
self._change_identity()
def _change_identity(self) -> None: