forked from p34709852/monkey
Agent: Add debug logging to decorators in WmiTools
This commit is contained in:
parent
2c8aef6d80
commit
720768e25d
|
@ -24,11 +24,12 @@ class AccessDeniedException(Exception):
|
|||
|
||||
|
||||
class WmiTools(object):
|
||||
|
||||
@staticmethod
|
||||
def impacket_user(func):
|
||||
def _wrapper(*args, **kwarg):
|
||||
logger.debug("Waiting for impacket lock")
|
||||
with lock:
|
||||
logger.debug("Acquired impacket lock")
|
||||
return func(*args, **kwarg)
|
||||
|
||||
return _wrapper
|
||||
|
@ -93,8 +94,10 @@ class WmiTools(object):
|
|||
def dcom_wrap(func):
|
||||
def _wrapper(*args, **kwarg):
|
||||
try:
|
||||
logger.debug("Running function from dcom_wrap")
|
||||
return func(*args, **kwarg)
|
||||
finally:
|
||||
logger.debug("Running dcom cleanup")
|
||||
WmiTools.dcom_cleanup()
|
||||
|
||||
return _wrapper
|
||||
|
|
Loading…
Reference in New Issue