有谁会直接通过。net登入QQ 使用SendInput可以实现登录qq。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 是要实现QQ自动登陆吧?之前见别人用VC++写过,2008之前的版本可以用 调用腾讯的WEBSERVICE吧,然后里面有方法的。以前做过,现在忘记了。可以直接登QQ,MSN qq2009、qq2010都可以用SendInput登录,qq2008可用命令登录,lz自己找资料啊。http://topic.csdn.net/u/20101007/22/3659d864-8ca7-4f5b-bcb7-e8583e7c2c8c.html如果密码有特殊字符,目前还实现不了。 http://www.cnblogs.com/aautoquicker/archive/2010/10/14/1851638.html这个没试过,不知道行不行。 有个开源项目LumaQQ。net版本,学习一下 MD5算法我这还有个 public class QQPassword { private static string binl2hex(byte[] buffer) { StringBuilder builder = new StringBuilder(); for (int i = 0; i < buffer.Length; i++) { builder.Append(buffer[i].ToString("x2")); } return builder.ToString(); } /// <summary> /// 加密用户输入的秘密以保存在配置文件中 /// </summary> /// <param name="input"></param> /// <returns></returns> public static string md5_3(string input) { MD5 md = MD5.Create(); byte[] buffer = md.ComputeHash(Encoding.Default.GetBytes(input)); buffer = md.ComputeHash(buffer); buffer = md.ComputeHash(buffer); return binl2hex(buffer).ToUpper(); } public static string md5(string input) { byte[] buffer = MD5.Create().ComputeHash(Encoding.Default.GetBytes(input)); return binl2hex(buffer); } /// <summary> /// 从用户输入的密码 获取TX服务器需要的密码 /// </summary> /// <param name="password"></param> /// <param name="verifycode"></param> /// <returns></returns> public static string getPassword(string password, string verifycode) { return getPassword_1(md5_3(password), verifycode); } /// <summary> /// 从配置保存的密码 获取TX服务器需要的密码 /// </summary> /// <param name="password"></param> /// <param name="verifycode"></param> /// <returns></returns> public static string getPassword_1(string password, string verifycode) { return md5(password + verifycode.ToUpper()).ToUpper(); } public static System.Net.CookieContainer ACookies(string CookiesString) { CookieContainer cl = new CookieContainer(); //string ss = null; foreach (string ss in CookiesString.Split(';')) { if (ss != "") { if (ss.IndexOf(",") == -1) { cl.Add(new Cookie(ss.Split('=')[0].Trim(), ss.Split('=')[1].Trim(), "/", ".qq.com")); } } } return cl; } public static string GetCookie(CookieContainer myCookieContainer, string url) { CookieCollection c = myCookieContainer.GetCookies(new Uri(url)); string str = ""; for (int i = 0; i < c.Count; i++) { if (str == "") { str += c[i].Name + "=" + c[i].Value; } else { str += ";" + c[i].Name + "=" + c[i].Value; } } return str; } public static string GetCookie(CookieContainer _Cookie) { return GetCookie(_Cookie, "http://www.qq.com"); } } 多线程窗体,如何访问? C#如何更新MySQL的BLOB字段 如何将VS2008的界面操作习惯从VB.net改成C#.net? 控件拖上去总提示:呈现控件时出错,以下是原代码,高手帮忙看看哪里出问题了 在线等,急,一个急手的问题 HashTable 关于key的问题 求教 网站做QQ联合登陆js获取qq昵称的疑问 反序列化问题,求指教 C# 面向对象设计 实现一个小功能 为什么kill不掉进程 DevExpress中的TreeList如何实现逐级展开节点 学习
之前见别人用VC++写过,2008之前的版本可以用
可以直接登QQ,MSN
我这还有个
public class QQPassword
{
private static string binl2hex(byte[] buffer)
{
StringBuilder builder = new StringBuilder();
for (int i = 0; i < buffer.Length; i++)
{
builder.Append(buffer[i].ToString("x2"));
}
return builder.ToString();
}
/// <summary>
/// 加密用户输入的秘密以保存在配置文件中
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public static string md5_3(string input)
{
MD5 md = MD5.Create();
byte[] buffer = md.ComputeHash(Encoding.Default.GetBytes(input));
buffer = md.ComputeHash(buffer);
buffer = md.ComputeHash(buffer);
return binl2hex(buffer).ToUpper();
} public static string md5(string input)
{
byte[] buffer = MD5.Create().ComputeHash(Encoding.Default.GetBytes(input));
return binl2hex(buffer);
}
/// <summary>
/// 从用户输入的密码 获取TX服务器需要的密码
/// </summary>
/// <param name="password"></param>
/// <param name="verifycode"></param>
/// <returns></returns>
public static string getPassword(string password, string verifycode)
{
return getPassword_1(md5_3(password), verifycode);
}
/// <summary>
/// 从配置保存的密码 获取TX服务器需要的密码
/// </summary>
/// <param name="password"></param>
/// <param name="verifycode"></param>
/// <returns></returns>
public static string getPassword_1(string password, string verifycode)
{
return md5(password + verifycode.ToUpper()).ToUpper();
} public static System.Net.CookieContainer ACookies(string CookiesString)
{
CookieContainer cl = new CookieContainer();
//string ss = null;
foreach (string ss in CookiesString.Split(';'))
{
if (ss != "")
{
if (ss.IndexOf(",") == -1)
{
cl.Add(new Cookie(ss.Split('=')[0].Trim(), ss.Split('=')[1].Trim(), "/", ".qq.com"));
}
}
}
return cl;
} public static string GetCookie(CookieContainer myCookieContainer, string url)
{
CookieCollection c = myCookieContainer.GetCookies(new Uri(url));
string str = "";
for (int i = 0; i < c.Count; i++)
{
if (str == "")
{
str += c[i].Name + "=" + c[i].Value;
}
else
{
str += ";" + c[i].Name + "=" + c[i].Value;
}
}
return str; } public static string GetCookie(CookieContainer _Cookie)
{
return GetCookie(_Cookie, "http://www.qq.com");
}
}