forked from p15670423/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):
|
class WmiTools(object):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def impacket_user(func):
|
def impacket_user(func):
|
||||||
def _wrapper(*args, **kwarg):
|
def _wrapper(*args, **kwarg):
|
||||||
|
logger.debug("Waiting for impacket lock")
|
||||||
with lock:
|
with lock:
|
||||||
|
logger.debug("Acquired impacket lock")
|
||||||
return func(*args, **kwarg)
|
return func(*args, **kwarg)
|
||||||
|
|
||||||
return _wrapper
|
return _wrapper
|
||||||
|
@ -93,8 +94,10 @@ class WmiTools(object):
|
||||||
def dcom_wrap(func):
|
def dcom_wrap(func):
|
||||||
def _wrapper(*args, **kwarg):
|
def _wrapper(*args, **kwarg):
|
||||||
try:
|
try:
|
||||||
|
logger.debug("Running function from dcom_wrap")
|
||||||
return func(*args, **kwarg)
|
return func(*args, **kwarg)
|
||||||
finally:
|
finally:
|
||||||
|
logger.debug("Running dcom cleanup")
|
||||||
WmiTools.dcom_cleanup()
|
WmiTools.dcom_cleanup()
|
||||||
|
|
||||||
return _wrapper
|
return _wrapper
|
||||||
|
|
Loading…
Reference in New Issue