Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Group info
Members: 37
Language: Chinese (Simplified)
Group categories:
Computers > Software
Computers > Internet
Region: Asia > China
More group info »
Recent pages and files
请教challenge密码的加密过程    
请教用户密码的加密过程。           
 //读取md5 challenge,存储于m_digiMd5中
            memmove(m_digiMd5,pkt_data+0x18,16);
            //计算md5值
            MD5_CTX md5;
            md5.MD5Update(pkt_data+0x13,1);
            md5.MD5Update(m_password,strlen((const char*)m_password));
            md5.MD5Update(m_digiMd5,16);
            md5.MD5Final(m_digiMd5);
            //结果保留在m_digiMd5中

我想用python做一个客户端,不知它的具体的md5 challenge response 中的返回md5是如何得出的。
能否用上面的代码,结合一个例子说明一下?
 

以下是python代码,注意有
def sendpass(x):
 t1=chr(2)
 t2=password
 l=re.findall('..',x)
 temp=''
 for i in l:
   temp+=str(chr(int(i,16)))
 pw=t1+t2+temp
 y=md5.new(pw).hexdigest()
 s=dmac+smac+'888e'+'0100'+'00'+len3+'020200'+len4+'0410'+y+auser+'00'
 ss=s+sip+smask+sgate+'00000000'+puser+version
 s2=binascii.unhexlify(ss)
 sendpkt.sendpacket(s2,device)
 print 'password sended'
Version: 
Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google