Beispiel #1
0
 def test_SchRpcScheduledRuntimes(self):
     dce, rpctransport = self.connect(self.stringBindingAtSvc, tsch.MSRPC_UUID_TSCHS)
     request = tsch.SchRpcScheduledRuntimes()
     #request['path'] = '\\BBB\\Beto Task\x00'
     request['path'] = '\\Microsoft\\Windows\\Defrag\\ScheduledDefrag\x00'
     request['start'] = NULL
     request['end'] = NULL
     request['flags'] = 0
     request['cRequested'] = 10
     try:
         resp = dce.request(request)
         resp.dump()
     except Exception, e:
         # It is actually S_FALSE
         if str(e).find('ERROR_INVALID_FUNCTIO') <= 0 and str(e).find('SCHED_S_TASK_NOT_SCHEDULED') < 0:
             raise
         e.get_packet().dump()
         pass
Beispiel #2
0
 def test_SchRpcScheduledRuntimes(self):
     dce, rpc_transport = self.connect()
     request = tsch.SchRpcScheduledRuntimes()
     request['path'] = '\\Microsoft\\Windows\\Defrag\\ScheduledDefrag\x00'
     request['start'] = NULL
     request['end'] = NULL
     request['flags'] = 0
     request['cRequested'] = 10
     try:
         resp = dce.request(request)
         resp.dump()
     except tsch.DCERPCSessionError as e:
         # It is actually S_FALSE
         if str(e).find('ERROR_INVALID_FUNCTIO') <= 0 and str(e).find(
                 'SCHED_S_TASK_NOT_SCHEDULED') < 0:
             raise
         e.get_packet().dump()
         pass