forked from p15670423/monkey
Agent: Add @wraps to WmiTools decorators
This commit is contained in:
parent
720768e25d
commit
27e3cc6b4c
|
@ -1,5 +1,6 @@
|
|||
import logging
|
||||
import threading
|
||||
from functools import wraps
|
||||
|
||||
from impacket.dcerpc.v5.dcom import wmi
|
||||
from impacket.dcerpc.v5.dcom.wmi import DCERPCSessionError
|
||||
|
@ -26,6 +27,7 @@ class AccessDeniedException(Exception):
|
|||
class WmiTools(object):
|
||||
@staticmethod
|
||||
def impacket_user(func):
|
||||
@wraps(func)
|
||||
def _wrapper(*args, **kwarg):
|
||||
logger.debug("Waiting for impacket lock")
|
||||
with lock:
|
||||
|
@ -92,6 +94,7 @@ class WmiTools(object):
|
|||
|
||||
@staticmethod
|
||||
def dcom_wrap(func):
|
||||
@wraps(func)
|
||||
def _wrapper(*args, **kwarg):
|
||||
try:
|
||||
logger.debug("Running function from dcom_wrap")
|
||||
|
|
Loading…
Reference in New Issue