def test_hNetrJobAdd_hNetrJobEnum_hNetrJobDel(self): dce, rpctransport = self.connect(self.stringBindingAtSvc, atsvc.MSRPC_UUID_ATSVC) atInfo = AT_INFO() atInfo['JobTime'] = NULL atInfo['DaysOfMonth'] = 0 atInfo['DaysOfWeek'] = 0 atInfo['Flags'] = 0 atInfo[ 'Command'] = '%%COMSPEC%% /C dir > %%SYSTEMROOT%%\\Temp\\BTO\x00' try: resp = atsvc.hNetrJobAdd(dce, NULL, atInfo) resp.dump() except Exception as e: if e.get_error_code() != ERROR_NOT_SUPPORTED: raise else: # OpNum not supported, aborting test return resp = atsvc.hNetrJobEnum(dce) resp.dump() for job in resp['pEnumContainer']['Buffer']: resp = atsvc.hNetrJobDel(dce, NULL, job['JobId'], job['JobId']) resp.dump()
def test_hNetrJobAdd_hNetrJobEnum_hNetrJobDel(self): dce, rpctransport = self.connect(self.stringBindingAtSvc, atsvc.MSRPC_UUID_ATSVC) atInfo = AT_INFO() atInfo['JobTime'] = NULL atInfo['DaysOfMonth'] = 0 atInfo['DaysOfWeek'] = 0 atInfo['Flags'] = 0 atInfo['Command'] = '%%COMSPEC%% /C dir > %%SYSTEMROOT%%\\Temp\\BTO\x00' try: resp = atsvc.hNetrJobAdd(dce, NULL, atInfo) resp.dump() except Exception as e: if e.get_error_code() != ERROR_NOT_SUPPORTED: raise else: # OpNum not supported, aborting test return resp = atsvc.hNetrJobEnum(dce) resp.dump() for job in resp['pEnumContainer']['Buffer']: resp = atsvc.hNetrJobDel(dce, NULL, job['JobId'], job['JobId'] ) resp.dump()
def test_hNetrJobEnum(self): dce, rpc_transport = self.connect() try: resp = atsvc.hNetrJobEnum(dce, NULL, NULL, 0xffffffff) resp.dump() except atsvc.DCERPCSessionError as e: if e.get_error_code() != ERROR_NOT_SUPPORTED: raise else: # OpNum not supported, aborting test return
def test_hNetrJobEnum(self): dce, rpctransport = self.connect(self.stringBindingAtSvc, atsvc.MSRPC_UUID_ATSVC) try: resp = atsvc.hNetrJobEnum(dce, NULL, NULL, 0xffffffff) resp.dump() except Exception as e: if e.get_error_code() != ERROR_NOT_SUPPORTED: raise else: # OpNum not supported, aborting test return
def test_hNetrJobAdd_hNetrJobEnum_hNetrJobDel(self): dce, rpctransport = self.connect(self.stringBindingAtSvc, atsvc.MSRPC_UUID_ATSVC) atInfo = AT_INFO() atInfo['JobTime'] = NULL atInfo['DaysOfMonth'] = 0 atInfo['DaysOfWeek'] = 0 atInfo['Flags'] = 0 atInfo['Command'] = '%%COMSPEC%% /C dir > %%SYSTEMROOT%%\\Temp\\BTO\x00' resp = atsvc.hNetrJobAdd(dce, NULL, atInfo) resp.dump() resp = atsvc.hNetrJobEnum(dce) resp.dump() for job in resp['pEnumContainer']['Buffer']: resp = atsvc.hNetrJobDel(dce, NULL, job['JobId'], job['JobId'] ) resp.dump()
def test_hNetrJobAdd_hNetrJobEnum_hNetrJobDel(self): dce, rpctransport = self.connect(self.stringBindingAtSvc, atsvc.MSRPC_UUID_ATSVC) atInfo = AT_INFO() atInfo['JobTime'] = NULL atInfo['DaysOfMonth'] = 0 atInfo['DaysOfWeek'] = 0 atInfo['Flags'] = 0 atInfo[ 'Command'] = '%%COMSPEC%% /C dir > %%SYSTEMROOT%%\\Temp\\BTO\x00' resp = atsvc.hNetrJobAdd(dce, NULL, atInfo) resp.dump() resp = atsvc.hNetrJobEnum(dce) resp.dump() for job in resp['pEnumContainer']['Buffer']: resp = atsvc.hNetrJobDel(dce, NULL, job['JobId'], job['JobId']) resp.dump()
def test_hNetrJobEnum(self): dce, rpctransport = self.connect(self.stringBindingAtSvc, atsvc.MSRPC_UUID_ATSVC) resp = atsvc.hNetrJobEnum(dce, NULL, NULL, 0xffffffff) resp.dump()