Beispiel #1
0
 def service(self, name, login='******', password='******'):
     d = self.post('/bin/kerberos/authentication-service', username=login)
     key = openssl.decrypt(d['Client-TGS-session-key'], password)
     token = self.authenti(key, login)
     d = self.post('/bin/kerberos/ticket-granting-service', TGT=d['TGT'], service=name, authenticator=token)
     print(d)
     key = openssl.decrypt(d['Client-Server-session-key'], key)
     d = self.post('/service/' + name + '/hello', ticket=d['Client-Server-ticket'], authenticator=self.authenti(key))
     self.service_key = key
     return d
Beispiel #2
0
 def find_chap(self):
     login = '******'
     challenge = '55e87bc1e4fa43d18c9f98c5b42b083e'
     crypt = 'U2FsdGVkX18ccjJmQQyzx18f33Gr6VchVU1imE2pnhyvV/66P3+hdyD+tLfAV856\nPlHPfWbmZs7i0TJKTEah/Q==\n'
     pass_list = self.get('/share/words').split()
     for password in pass_list:
         if openssl.decrypt(crypt, password) == login + '-' + challenge:
             return password
     return 'cacamou'
Beispiel #3
0
def decrypt(data, salt):
    password = private_key = PRIVATE_KEY + salt
    return openssl.decrypt(data, password)