def test_hNetrJobAdd_hNetrJobGetInfo_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 resp2 = atsvc.hNetrJobGetInfo(dce, NULL, resp['pJobId']) resp2.dump() resp = atsvc.hNetrJobDel(dce, NULL, resp['pJobId'], resp['pJobId']) resp.dump()
def test_hNetrJobAdd_hNetrJobGetInfo_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 resp2 = atsvc.hNetrJobGetInfo(dce, NULL, resp['pJobId']) resp2.dump() resp = atsvc.hNetrJobDel(dce, NULL, resp['pJobId'], resp['pJobId']) resp.dump()
def test_hNetrJobAdd_hNetrJobGetInfo_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() resp2 = atsvc.hNetrJobGetInfo(dce, NULL, resp['pJobId']) resp2.dump() resp = atsvc.hNetrJobDel(dce, NULL, resp['pJobId'], resp['pJobId']) resp.dump()
def test_hNetrJobAdd_hNetrJobGetInfo_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() resp2 = atsvc.hNetrJobGetInfo(dce, NULL, resp['pJobId']) resp2.dump() resp = atsvc.hNetrJobDel(dce, NULL, resp['pJobId'], resp['pJobId']) resp.dump()