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()