Achieve Results1) This auxiliary class is mainly used to facilitate the implementation of QQ password encryption operation.
2) In many of the QQ simulation Web Capture data, need to enter the user account number, password, where the password is required to encrypt operations, the general use of JS script implementation, here to translate it into C # code operation, in fact, the password and verification code through 3 times MD5 encryption implementation. <summary>
QQ encrypts data according to password and verification code
</summary>
<param name= "password" > original password </param>
<param name= "Verifycode" > Verification Code </param>
<returns></returns> public static string Encodepasswordwithverifycode (string password, string verify Code)
private bool Checklogin ()
{
Httphelper httphelper = new Httphelper ();
String Refurl = "http://ui.ptlogin2.qq.com/cgi-bin/login?appid=3000801&s_url=http%3A%2F%2Fqun.qq.com%2Fgod% 2fsucc.htm&f_url=loginerroralert&lang=2052&bgcolor=ffffff&style=1&low_login=1&link_ Target=blank&target=self&hide_title_bar=1&dummy=1 ";
string verifycode = This.txtVerify.Text;
String postdata = String. Format ("u={0}&p={1}&verifycode={2}&aid=3000801&u1=http%3a%2f%2fqun.qq.com%2fgod%2fsucc.htm &h=1&ptredirect=0&ptlang=2052&from_ui=1&dumy=&fp=loginerroralert ",
This.txtUsername.Text, Qqencryptutil.encodepasswordwithverifycode (This.txtPassword.Text, Verifycode), Verifycode) ;
string result = Httphelper.gethtml ("Http://ptlogin2.qq.com/login" + postdata, Portal.gc.cookieQun, Refurl);
string errortxt = result;
BOOL IsLogin = result. Contains ("Login Successful! ");
return islogin;
}
、、、、、
QQ Password Encryption Operation Auxiliary class Qqencryptutil