예제 #1
0
파일: task.py 프로젝트: ASkyeye/lsassy
 def clean(self):
     resp = tsch.hSchRpcEnumInstances(self._dce, '\\%s' % self._taskname)
     if len(resp['pGuids']) != 0:
         tsch.hSchRpcStopInstance(self._dce, resp['pGuids'][0])
     tsch.hSchRpcDelete(self._dce, '\\%s' % self._taskname)
     self._dce.disconnect()
     logging.debug("Task %s has been removed" % self._taskname)
예제 #2
0
 def test_hSchRpcEnumInstances(self):
     dce, rpc_transport = self.connect()
     try:
         resp = tsch.hSchRpcEnumInstances(dce, '\\')
         resp.dump()
     except tsch.DCERPCSessionError as e:
         if e.get_error_code() != 0x80070002:
             raise
예제 #3
0
    def test_hSchRpcEnumInstances(self):
        dce, rpctransport = self.connect(self.stringBindingAtSvc, tsch.MSRPC_UUID_TSCHS)

        try:
            resp = tsch.hSchRpcEnumInstances(dce, '\\')
            resp.dump()
        except Exception, e:
            if e.get_error_code() != 0x80070002:
                raise
예제 #4
0
    def test_hSchRpcEnumInstances(self):
        dce, rpctransport = self.connect(self.stringBindingAtSvc, tsch.MSRPC_UUID_TSCHS)

        try:
            resp = tsch.hSchRpcEnumInstances(dce, '\\')
            resp.dump()
        except Exception, e:
            if e.get_error_code() != 0x80070002:
                raise
예제 #5
0
 def cleanup_task(self, dce, taskname):
     resp = tsch.hSchRpcEnumInstances(dce, '\\%s' % taskname)
     if len(resp['pGuids']) != 0:
         tsch.hSchRpcStopInstance(dce, resp['pGuids'][0])
     tsch.hSchRpcDelete(dce, '\\%s' % taskname)