Beispiel #1
0
    def _load_key(self):
        if not self.key:
            resp = self.get_rsa_key(self.username)

            self.key = rsa_publickey(intBase(resp['publickey_mod'], 16),
                                     intBase(resp['publickey_exp'], 16),
                                     )
            self.timestamp = resp['timestamp']
Beispiel #2
0
    def _load_key(self):
        if not self.key:
            resp = self.get_rsa_key(self.username)

            self.key = rsa_publickey(intBase(resp['publickey_mod'], 16),
                                     intBase(resp['publickey_exp'], 16),
                                     )
            self.timestamp = resp['timestamp']
Beispiel #3
0
 def cli_login_in(self, password):
     self.webclient = WebAuth()
     rsa = WebAuth.get_rsa(self.username)
     key = rsa_publickey(int(rsa['publickey_mod'], 16),
                         int(rsa['publickey_exp'], 16))
     self.webclient.login_raw(
         self.username,
         b64encode(pkcs1v15_encrypt(key, password.encode('ascii'))),
         rsa['timestamp'])