Exemplo n.º 1
0
 def test_loginHashes(self):
     lmhash, nthash = self.hashes.split(':')
     smb = SMBConnection('*SMBSERVER', self.machine, preferredDialect = self.dialects)    
     smb.login(self.username, '', self.domain, lmhash, nthash)
     credentials = smb.getCredentials()
     self.assertTrue( credentials == (self.username, '', self.domain, lmhash.decode('hex'), nthash.decode('hex')) )
     smb.logoff()
Exemplo n.º 2
0
 def test_connection(self):
     smb = SMBConnection('*SMBSERVER', self.machine, preferredDialect = self.dialects)
     smb.login(self.username, self.password, self.domain)
     credentials = smb.getCredentials()
     self.assertTrue( credentials == (self.username, self.password, self.domain, '',''))
     smb.logoff()
     del(smb)
Exemplo n.º 3
0
 def test_loginHashes(self):
     lmhash, nthash = self.hashes.split(':')
     smb = SMBConnection('*SMBSERVER', self.machine, preferredDialect = self.dialects)    
     smb.login(self.username, '', self.domain, lmhash, nthash)
     credentials = smb.getCredentials()
     self.assertTrue( credentials == (self.username, '', self.domain, lmhash.decode('hex'), nthash.decode('hex'), '', None, None) )
     smb.logoff()
Exemplo n.º 4
0
 def test_connection(self):
     smb = SMBConnection('*SMBSERVER', self.machine, preferredDialect = self.dialects)
     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)
Exemplo n.º 5
0
 def test_loginKerberosAES(self):
     lmhash, nthash = self.hashes.split(':')
     smb = SMBConnection('*SMBSERVER', self.machine, preferredDialect = self.dialects)    
     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()