求助
HA1 = hex_md5(username+ ":" + Authrealm + ":" + passwd);HA2 = hex_md5("GET" + ":" + "/cgi/protected.cgi");
rand = Math.floor(Math.random()*100001)
date = new Date().getTime();
salt = rand+""+date;
tmp = hex_md5(salt);
AuthCnonce = tmp.substring(0,16);
DigestRes = hex_md5(HA1 + ":" + nonce + ":" + "00000001" + ":" + AuthCnonce + ":" + AuthQop + ":" + HA2);
url = window.location.protocol + "//" + window.location.host + "/login.cgi?Action=Digest&username="+username+"&realm="+Authrealm+"&nonce="+nonce+"&response="+DigestRes+"&qop="+AuthQop+"&cnonce="+AuthCnonce + "&temp=asr";
if(login_done(authentication(url))) {
strResponse = "Digest username=\"" + username + "\", realm=\"" + Authrealm + "\", nonce=\"" + nonce + "\", uri=\"" + "/cgi/protected.cgi" + "\", response=\"" + DigestRes + "\", qop=" + AuthQop + ", nc=00000001" + ", cnonce=\"" + AuthCnonce + "\"" ;
有必要弄出来DigestRes 的值嘛,我随便弄一个发现也行,但是不知道会不会长久 没必要,AuthCnonce是随机的,hex_md5如果是标准md5的话,随机生成md5即可 T4DNA 发表于 2023-11-29 00:25
没必要,AuthCnonce是随机的,hex_md5如果是标准md5的话,随机生成md5即可
是吧,我也觉得
页:
[1]