def __init__(self, con, password=None, **attrs): profile = con.roster.self_buddy values = find_attrs(profile, dict(name='You', private=PrivateNumber.YES, birthdate='1990-01-01', gender=Gender.MALE), **attrs) self.values = values if not password: password = con.password pin = encode_password(con.client_id, password) StandardMessage.__init__(self, con, Client.PROFILE, [[pin, str(values['name']), values['private'].id, str(values['birthdate']), values['gender'].id, '']], wait=True, multiple=False)
def mxit_send_login(self): pay = mxit_mkargu([['ms',[encode_password(self.clientid, self.password),'E-5.2.1-1.1',1,'',client_id(self.clientid),'255','27','en']],['cr','']]) hdr = mxit_mkhdr(len(pay),M_login,0,self.session) pkt = hdr + pay return pkt
def __init__(self, con): StandardMessage.__init__(self, con, Client.LOGIN, [[encode_password(con.client_id, con.password), con.java_env, 1, con.features, client_id(con.client_id), 255, con.country_code, con.language], ["cr=%s" % con.splash]], wait=True)