Exemple #1
0
 def test_loginKerberosAES(self):
     smb = self.create_connection()
     smb.kerberosLogin(self.username, '', self.domain, '', '', self.aesKey)
     credentials = smb.getCredentials()
     self.assertTrue( credentials == (self.username, '', self.domain, '','',self.aesKey, None, None) )
     UNC = '\\\\%s\\%s' % (self.machine, self.share)
     tid = smb.connectTree(UNC)
     smb.logoff()
Exemple #2
0
 def test_loginKerberosAES(self):
     smb = self.create_connection()
     smb.kerberosLogin(self.username, '', self.domain, '', '', self.aesKey)
     credentials = smb.getCredentials()
     self.assertTrue(credentials == (self.username, '', self.domain, '', '',
                                     self.aesKey, None, None))
     UNC = '\\\\%s\\%s' % (self.machine, self.share)
     tid = smb.connectTree(UNC)
     smb.logoff()
Exemple #3
0
 def test_loginKerberosHashes(self):
     lmhash, nthash = self.hashes.split(':')
     smb = self.create_connection()
     smb.kerberosLogin(self.username, '', self.domain, lmhash, nthash, '')
     credentials = smb.getCredentials()
     self.assertTrue( credentials == (self.username, '', self.domain, unhexlify(lmhash), unhexlify(nthash), '', None, None) )
     UNC = '\\\\%s\\%s' % (self.machine, self.share)
     tid = smb.connectTree(UNC)
     smb.logoff()
Exemple #4
0
 def test_loginKerberosHashes(self):
     lmhash, nthash = self.hashes.split(':')
     smb = self.create_connection()
     smb.kerberosLogin(self.username, '', self.domain, lmhash, nthash, '')
     credentials = smb.getCredentials()
     self.assertTrue(credentials == (self.username, '', self.domain,
                                     unhexlify(lmhash), unhexlify(nthash),
                                     '', None, None))
     UNC = '\\\\%s\\%s' % (self.machine, self.share)
     tid = smb.connectTree(UNC)
     smb.logoff()