userencode.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:SinaMicroblog_Creeper-Spider_VerificationCode 作者: somethingx64 项目源码 文件源码
def get_pwd(password, servertime, nonce, pubkey):
    rsaPublickey = int(pubkey, 16)
    key = rsa.PublicKey(rsaPublickey,65537)#create public key
    message = str(servertime) + '\t' + str(nonce) + '\n' + str(password)#create clear text
    passwd = rsa.encrypt(message, key)#cipher text
    passwd = binascii.b2a_hex(passwd)#convert the cipher text into hexadecimal
    return passwd
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号