def post_login(cookie, tokens, username, password, rsakey, verifycode='<STR_LIT>',<EOL>codestring='<STR_LIT>'):
url = const.PASSPORT_LOGIN<EOL>data = '<STR_LIT>'.join([<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', tokens['<STR_LIT>'],<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', util.timestamp(),<EOL>'<STR_LIT>', codestring,<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', encoder.encode_uri_component(username),<EOL>'<STR_LIT>', encoder.encode_uri_component(password),<EOL>'<STR_LIT>', verifycode,<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', rsakey,<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',get_ppui_logintime(),<EOL>'<STR_LIT>',<EOL>])<EOL>headers={<EOL>'<STR_LIT>': const.ACCEPT_HTML,<EOL>'<STR_LIT>': cookie.sub_output('<STR_LIT>','<STR_LIT>', '<STR_LIT>'),<EOL>'<STR_LIT>': const.REFERER,<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>}<EOL>req = net.urlopen(url, headers=headers, data=data.encode())<EOL>if req:<EOL><INDENT>content= req.data.decode()<EOL>match = re.search('<STR_LIT>', content)<EOL>if not match:<EOL><INDENT>return (-<NUM_LIT:1>, None)<EOL><DEDENT>query = dict(urllib.parse.parse_qsl(match.group(<NUM_LIT:1>)))<EOL>query['<STR_LIT>'] = int(query['<STR_LIT>'])<EOL>err_no = query['<STR_LIT>']<EOL>auth_cookie = req.headers.get_all('<STR_LIT>')<EOL>if err_no == <NUM_LIT:0>:<EOL><INDENT>return (<NUM_LIT:0>, auth_cookie)<EOL><DEDENT>elif err_no == <NUM_LIT>:<EOL><INDENT>return (<NUM_LIT:0>, auth_cookie)<EOL><DEDENT>elif err_no == <NUM_LIT>:<EOL><INDENT>return (err_no, query)<EOL><DEDENT>elif err_no == <NUM_LIT>:<EOL><INDENT>return (err_no, query)<EOL><DEDENT>else:<EOL><INDENT>return (err_no, None)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return (-<NUM_LIT:1>, None)<EOL><DEDENT>return (-<NUM_LIT:1>, None)<EOL>
登录验证.
    password   - 使用RSA加密后的base64字符串
    rsakey     - 与public_key相匹配的rsakey
    verifycode - 验证码, 默认为空

    @return (status, info). 其中, status表示返回的状态:
      0 - 正常, 这里, info里面存放的是auth_cookie
     -1 - 未知异常
      4 - 密码错误
    257 - 需要输入验证码, 此时info里面存放着(vcodetype, codeString))