예제 #1
0
	async def wrapper(*args, **kwargs):
		this = args[0]
		try:
			if 'RRP' in this.privtable:
				if this.privtable['RRP'] == False:
					raise SMBMachineException('RRP failed to open. Probably permission issues.')
			if this.rrp is None:
				await rr(this.connect_rpc('RRP'))
			x = await funct(*args, **kwargs)
			return x
		except Exception as e:
			raise e
예제 #2
0
	async def wrapper(*args, **kwargs):
		this = args[0]
		try:
			if 'SERVICEMGR' in this.privtable:
				if this.privtable['SERVICEMGR'] == False:
					raise SMBMachineException('SERVICEMGR failed to open. Probably permission issues.')
			if this.servicemanager is None:
				await rr(this.connect_servicemanager())
			x = await funct(*args, **kwargs)
			return x
		except Exception as e:
			raise e
예제 #3
0
	async def wrapper(*args, **kwargs):
		this = args[0]
		try:
			if 'LSAD' in this.privtable:
				if this.privtable['LSAD'] == False:
					raise SMBMachineException('LSAD failed to open. Probably permission issues.')
			if this.lsad is None:
				await rr(this.connect_rpc('LSAD'))
			async for x in  funct(*args, **kwargs):
				if x[-1] is not None:
					raise x[-1]
				yield x
		except Exception as e:
			raise e