예제 #1
0
 def test_loginHashes(self):
     lmhash, nthash = self.hashes.split(':')
     smb = self.create_connection()
     smb.login(self.username, '', self.domain, lmhash, nthash)
     credentials = smb.getCredentials()
     self.assertTrue( credentials == (self.username, '', self.domain, unhexlify(lmhash), unhexlify(nthash), '', None, None) )
     smb.logoff()
예제 #2
0
 def test_connection(self):
     smb = self.create_connection()
     smb.login(self.username, self.password, self.domain)
     credentials = smb.getCredentials()
     self.assertTrue( credentials == (self.username, self.password, self.domain, '','','', None, None))
     smb.logoff()
     del(smb)
예제 #3
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()
예제 #4
0
 def test_connection(self):
     smb = self.create_connection()
     smb.login(self.username, self.password, self.domain)
     credentials = smb.getCredentials()
     self.assertTrue(credentials == (self.username, self.password,
                                     self.domain, '', '', '', None, None))
     smb.logoff()
     del (smb)
예제 #5
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()
예제 #6
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()
예제 #7
0
 def test_loginHashes(self):
     lmhash, nthash = self.hashes.split(':')
     smb = self.create_connection()
     smb.login(self.username, '', self.domain, lmhash, nthash)
     credentials = smb.getCredentials()
     self.assertTrue(credentials == (self.username, '', self.domain,
                                     unhexlify(lmhash), unhexlify(nthash),
                                     '', None, None))
     smb.logoff()
예제 #8
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()