示例#1
0
 def nls_logon(self):
     self.srp = srp.SRP(self.bot.connfig['login']['username'],
                        self.bot.connfig['login']['password'])
     
     self.bot.status['ckA'] = srp.big_num_to_str(self.srp.get_A())
     self.bot.events.call('hashing', 'recv', 'nls_logon')
     return False
示例#2
0
    def nls_logon_proof(self):
        self.srp.B = srp.str_to_big_num(self.bot.status['ckB'])

        self.srp.get_v(self.bot.status['salt'])
        self.srp.get_u(self.bot.status['ckB'])
        self.srp.get_S(self.bot.status['salt'],
                       self.srp.B)
        self.srp.get_K(srp.big_num_to_str(self.srp.S))
        self.srp.get_M1(self.bot.status['salt'],
                        self.bot.status['ckB'])

        self.bot.status['M1'] = self.srp.M1
        self.bot.events.call('hashing', 'recv', 'nls_logon_proof')

        del self.srp
        return False
示例#3
0
 def nls_create(self):
     v = srp.big_num_to_str(self.srp.get_v(self.bot.status['salt']))
     self.bot.status['new_wc3_account'] = self.bot.status['salt'] +\
                                          v
     self.bot.events.call('hashing', 'recv', 'nls_create')
     return False