Avoid mutable default parameter.

This commit is contained in:
Daniel Goldberg 2019-11-27 13:56:37 +02:00
parent 1393c88277
commit c8e2de6224
1 changed files with 4 additions and 1 deletions

View File

@ -172,10 +172,13 @@ class ShellShockExploiter(HostExploiter):
LOG.info("File %s exists on remote host" % file_path)
return resp
def attempt_exploit(self, url, attacks=_attacks):
def attempt_exploit(self, url, attacks=None):
# Flag used to identify whether the exploit has successfully caused the
# server to return a useful response
if not attacks:
attacks = self._attacks
LOG.debug("Attack Flag is: %s" % self.success_flag)
LOG.debug("Trying exploit for %s" % url)