def test_NetrUseAdd_NetrUseDel_NetrUseGetInfo_NetrUseEnum(self): dce, rpctransport = self.connect() req = wkst.NetrUseAdd() req['ServerName'] = '\x00' * 10 req['Level'] = 1 req['InfoStruct']['tag'] = 1 req['InfoStruct']['UseInfo1']['ui1_local'] = 'Z:\x00' req['InfoStruct']['UseInfo1']['ui1_remote'] = '\\\\127.0.0.1\\c$\x00' req['InfoStruct']['UseInfo1']['ui1_password'] = NULL try: resp2 = dce.request(req) resp2.dump() except Exception as e: if str(e).find('rpc_s_access_denied') >= 0: # This could happen in newer OSes pass # We're not testing this call with NDR64, it fails and I can't see the contents if self.ts == ('71710533-BEBA-4937-8319-B5DBEF9CCC36', '1.0'): return req = wkst.NetrUseEnum() req['ServerName'] = NULL req['InfoStruct']['Level'] = 2 req['InfoStruct']['UseInfo']['tag'] = 2 req['InfoStruct']['UseInfo']['Level2']['Buffer'] = NULL req['PreferredMaximumLength'] = 0xffffffff req['ResumeHandle'] = NULL try: resp2 = dce.request(req) resp2.dump() except Exception as e: if str(e).find('rpc_s_access_denied') >= 0: # This could happen in newer OSes pass req = wkst.NetrUseGetInfo() req['ServerName'] = '\x00' * 10 req['UseName'] = 'Z:\x00' req['Level'] = 3 try: resp2 = dce.request(req) resp2.dump() except Exception as e: if str(e).find('rpc_s_access_denied') >= 0: # This could happen in newer OSes pass req = wkst.NetrUseDel() req['ServerName'] = '\x00' * 10 req['UseName'] = 'Z:\x00' req['ForceLevel'] = wkst.USE_LOTS_OF_FORCE try: resp2 = dce.request(req) resp2.dump() except Exception as e: if str(e).find('rpc_s_access_denied') >= 0: # This could happen in newer OSes pass
def test_NetrUseAdd_NetrUseDel_NetrUseGetInfo_NetrUseEnum(self): dce, rpctransport = self.connect() req = wkst.NetrUseAdd() req['ServerName'] = '\x00' * 10 req['Level'] = 1 req['InfoStruct']['tag'] = 1 req['InfoStruct']['UseInfo1']['ui1_local'] = 'Z:\x00' req['InfoStruct']['UseInfo1']['ui1_remote'] = '\\\\127.0.0.1\\c$\x00' req['InfoStruct']['UseInfo1']['ui1_password'] = NULL try: resp2 = dce.request(req) resp2.dump() except Exception, e: if str(e).find('rpc_s_access_denied') >= 0: # This could happen in newer OSes pass