Random PEP8 cleanups

This commit is contained in:
Daniel Goldberg 2019-11-27 13:39:47 +02:00
parent 401def5eb2
commit e92665a427
3 changed files with 8 additions and 3 deletions

View File

@ -27,10 +27,11 @@ class MonkeyIslandRequests(object):
@classmethod @classmethod
def refresh_jwt_token(cls, request_function): def refresh_jwt_token(cls, request_function):
@functools.wraps(request_function) @functools.wraps(request_function)
def request_function_wrapper(self, *args,**kwargs): def request_function_wrapper(self, *args, **kwargs):
self.token = self.try_get_jwt_from_server() self.token = self.try_get_jwt_from_server()
# noinspection PyArgumentList # noinspection PyArgumentList
return request_function(self, *args, **kwargs) return request_function(self, *args, **kwargs)
return request_function_wrapper return request_function_wrapper
def get_jwt_from_server(self): def get_jwt_from_server(self):

View File

@ -308,4 +308,4 @@ def get_interface_to_target(dst):
return None return None
paths.sort() paths.sort()
ret = paths[-1][1] ret = paths[-1][1]
return ret[1] return ret[1]

View File

@ -3,11 +3,15 @@ import logging
import sys import sys
sys.coinit_flags = 0 # needed for proper destruction of the wmi python module sys.coinit_flags = 0 # needed for proper destruction of the wmi python module
# noinspection PyPep8
import infection_monkey.config import infection_monkey.config
# noinspection PyPep8
from infection_monkey.system_info.mimikatz_collector import MimikatzCollector from infection_monkey.system_info.mimikatz_collector import MimikatzCollector
# noinspection PyPep8
from infection_monkey.system_info import InfoCollector from infection_monkey.system_info import InfoCollector
# noinspection PyPep8
from infection_monkey.system_info.wmi_consts import WMI_CLASSES from infection_monkey.system_info.wmi_consts import WMI_CLASSES
# noinspection PyPep8
from common.utils.wmi_utils import WMIUtils from common.utils.wmi_utils import WMIUtils
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)