def test_ResolveOxid(self): dce, rpctransport = self.connect() scm = dcomrt.IRemoteSCMActivator(dce) iInterface = scm.RemoteCreateInstance(comev.CLSID_EventSystem, comev.IID_IEventSystem) objExporter = dcomrt.IObjectExporter(dce) stringBindings = objExporter.ResolveOxid(iInterface.get_oxid(), (7, ))
def tes_vds(self): dce, rpctransport = self.connect() #objExporter = dcom.IObjectExporter(dce) #objExporter.ComplexPing() #objExporter.ComplexPing() scm = dcomrt.IRemoteSCMActivator(dce) iInterface = scm.RemoteCreateInstance( vds.CLSID_VirtualDiskService, vds.IID_IVdsServiceInitialization) serviceInitialization = vds.IVdsServiceInitialization(iInterface) serviceInitialization.Initialize() iInterface = serviceInitialization.RemQueryInterface( 1, (vds.IID_IVdsService, )) vdsService = vds.IVdsService(iInterface) resp = vdsService.IsServiceReady() while resp['ErrorCode'] == 1: print "Waiting.. " resp = vdsService.IsServiceReady() vdsService.WaitForServiceReady() vdsService.GetProperties() enumObject = vdsService.QueryProviders(1) interfaces = enumObject.Next(1) iii = interfaces[0].RemQueryInterface(1, (vds.IID_IVdsProvider, )) provider = vds.IVdsProvider(iii) resp = provider.GetProperties() resp.dump()
def tes_ie(self): dce, rpctransport = self.connect() scm = dcomrt.IRemoteSCMActivator(dce) #iInterface = scm.RemoteCreateInstance(string_to_bin('0002DF01-0000-0000-C000-000000000046'),ie.IID_WebBrowser) iInterface = scm.RemoteCreateInstance( string_to_bin('72C24DD5-D70A-438B-8A42-98424B88AFB8'), dcomrt.IID_IRemUnknown) iDispatch = ie.IWebBrowser(iInterface) resp = iDispatch.GetIDsOfNames(('Navigate', )) print resp #sys.exit(1) iTypeInfo = iDispatch.GetTypeInfo() resp = iTypeInfo.GetTypeAttr() #resp.dump() for i in range(0, resp['ppTypeAttr']['cFuncs']): resp = iTypeInfo.GetFuncDesc(i) #resp.dump() #resp2 = iTypeInfo.GetNames(resp['ppFuncDesc']['memid']) #print resp2['rgBstrNames'][0]['asData'] resp = iTypeInfo.GetDocumentation(resp['ppFuncDesc']['memid']) print resp['pBstrName']['asData'] #iEventSystem.get_EventObjectChangeEventClassID() print "ACA" iTypeInfo.RemRelease() iDispatch.RemRelease() sys.exit(1)
def test_RemoteGetClassObject(self): dce, rpctransport = self.connect() IID_IClassFactory = uuidtup_to_bin( ('00000001-0000-0000-C000-000000000046', '0.0')) scm = dcomrt.IRemoteSCMActivator(dce) iInterface = scm.RemoteGetClassObject(comev.CLSID_EventSystem, IID_IClassFactory) iInterface.RemRelease()
def test_ie(self): dce, rpctransport = self.connect() scm = dcomrt.IRemoteSCMActivator(dce) #iInterface = scm.RemoteCreateInstance(string_to_bin('0002DF01-0000-0000-C000-000000000046'), ie.IID_WebBrowser) iInterface = scm.RemoteCreateInstance( string_to_bin('72C24DD5-D70A-438B-8A42-98424B88AFB8'), dcomrt.IID_IRemUnknown)
def tes_oaut(self): dce, rpctransport = self.connect() IID_IDispatch = string_to_bin('00020400-0000-0000-C000-000000000046') scm = dcomrt.IRemoteSCMActivator(dce) iInterface = scm.RemoteCreateInstance(string_to_bin('4E14FBA2-2E22-11D1-9964-00C04FBBB345'), IID_IDispatch) iDispatch = oaut.IDispatch(iInterface) kk = iDispatch.GetTypeInfoCount() kk.dump() iTypeInfo = iDispatch.GetTypeInfo() iTypeInfo.GetTypeAttr()
def tes_scmp(self): dce, rpctransport = self.connect() scm = dcomrt.IRemoteSCMActivator(dce) iInterface = scm.RemoteCreateInstance(scmp.CLSID_ShadowCopyProvider, scmp.IID_IVssSnapshotMgmt) iVssSnapshotMgmt = scmp.IVssSnapshotMgmt(iInterface) #iVssSnapshotMgmt.RemRelease() iVssEnumMgmtObject = iVssSnapshotMgmt.QueryVolumesSupportedForSnapshots(scmp.IID_ShadowCopyProvider, 31) iVssEnumMgmtObject.Next(10)
def test_RemoteCreateInstance(self): dce, rpctransport = self.connect() scm = dcomrt.IRemoteSCMActivator(dce) iInterface = scm.RemoteCreateInstance(comev.CLSID_EventSystem, comev.IID_IEventSystem)