Exemplo n.º 1
0
 def test_DsrGetForestTrustInformation(self):
     dce, rpctransport = self.connect()
     request = nrpc.DsrGetForestTrustInformation()
     request['ServerName'] = NULL
     request['TrustedDomainName'] = self.domain + '\x00'
     request['Flags'] = 0
     try:
         resp = dce.request(request)
         resp.dump()
     except Exception as e:
         if str(e).find('ERROR_NO_SUCH_DOMAIN') < 0 and str(e).find('rpc_s_access_denied') < 0:
             raise
Exemplo n.º 2
0
    def test_DsrGetForestTrustInformation(self):
        dce, rpctransport = self.connect()
        request = nrpc.DsrGetForestTrustInformation()
        request['ServerName'] = self.serverName + '\x00'
        request['TrustedDomainName'] = self.domain + '\x00'
        request['Flags'] = 0

        try:
            dce.request(request)
        except DCERPCException as e:
            # The client doesn't have sufficient privilege with the Access Request mask set to NETLOGON_FTINFO_ACCESS?
            if str(e).find('ERROR_NO_SUCH_DOMAIN') < 0 and str(e).find(
                    'rpc_s_access_denied') < 0:
                raise