【外挂研究】昨天在水区看到一个QQ农场外挂,很想仿着做一个,不知道怎样实现 本帖最后由 hyblusea 于 2009-09-30 11:39:31 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你首先要了解FLASH了。应该是登陆后把密码和账号绑定在COOKIET,SESSION了。发送数据应该都是用Request页面了。接收的话应该是Response了 http://code.google.com/p/kaixin/downloads/listhttp://code.google.com/p/kaixin001-helper/downloads/listhttp://www.webryan.cn/2009/04/about-kaixin001-game-helper/给楼主一些链接,这些都是用.net做的开心网的外挂做参考 数据包貌似都有加密?是的话那就大概只有直接操作FLASH了,但是貌似很难…… 参考http://topic.csdn.net/u/20090804/14/f74fdcbf-390c-4108-ad32-ecbe3cfff722_2.html 项目已经检出到本地了,但是运行报错,Utility.Login(loginEmail, loginPassword);这句话全部报错:非静态的字段、方法或属性“SNSHelper.Kaixin001.Utility.Login(string, string)”要求对象引用为什么没有对类实例化呢?-_- ???? 5 “SNSHelper.Kaixin001.GardenHelper”不包含采用“0”参数的构造函数 D:\MY Program\kaixin001-helper\SNSHelper_UnitTest\GardenHelperTest.cs 75 35 SNSHelper_UnitTest错误太多了。解决不完崩溃 WebRequest wrt;wrt = WebRequest.Create("http://xiaoyou.qq.com/index.html?ref=http%3A%2F%2Fxiaoyou.qq.com%2Findex.php%3Fmod%3Dhome");wrt.Credentials = CredentialCache.DefaultCredentials;WebResponse wrp;wrp = wrt.GetResponse();string html = new StreamReader(wrp.GetResponseStream(), Encoding.UTF8).ReadToEnd();string cookie = wrp.Headers.Get("Set-Cookie");return html;cookie 为 null,是怎么回事呢?应该怎样获取cookie? protected void cookieuse() { //写入cookie HttpCookie cookie = new HttpCookie("Info");//定义cookie对象以及名为Info的项 DateTime dt = DateTime.Now;//定义时间对象 TimeSpan ts=new TimeSpan(1,0,0,0);//cookie有效作用时间,具体查msdn cookie.Expires = dt.Add(ts);//添加作用时间 cookie.Values.Add("user","cxbkkk");//增加属性 cookie.Values.Add("userid","1203"); Response.AppendCookie(cookie);//确定写入cookie中 //读取cookie if(Request.Cookies["Info"]!=null) { string temp=Convert.ToString(Request.Cookies["Info"].Values["user"])+" "+Convert.ToString(Request.Cookies["Info"].Values["userid"]); //读全部就用Request.Cookies["Info"].Value) if(temp=="") { Response.Write("空"); } else Response.Write(temp); } else { Response.Write("error"); } //修改cookie Response.Cookies["Info"]["user"] = "2"; Response.Cookies["Info"].Expires = DateTime.Now.AddDays(1); //删除cookie下的属性 HttpCookie acookie=Request.Cookies["Info"]; acookie.Values.Remove("userid"); acookie.Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(acookie); //删除所有cookie,就是设置过期时间为现在就行了 int limit=Request.Cookies.Count - 1; for(int i=0;i<limit;i++) { acookie = Request.Cookies[i]; acookie.Expires = DateTime.Now.AddDays(-1); Response.Cookies.Add(acookie); } }我一般这样用 原来是我的登陆页面搞错了,应该是http://ui.ptlogin2.qq.com/cgi-bin/login?appid=15000102&hide_title_bar=1&qlogin_jumpname=xiaoyou_qlogin&s_url=http://xiaoyou.qq.com/index.php%3Fmod%3Dlogin&css=http://imgcache.qq.com/campus/login/login.css&self_regurl=http://xiaoyou.qq.com/emailreg.html 新问题又出现:public static byte[] GetHtmlByBytes(string server, string URL, byte[] byteRequest, string cookie, out string header) { long contentLength; HttpWebRequest httpWebRequest; HttpWebResponse webResponse; Stream getStream; httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(URL); CookieContainer co = new CookieContainer(); co.SetCookies(new Uri(server), cookie); httpWebRequest.CookieContainer = co; httpWebRequest.ContentType = "application/x-www-form-urlencoded"; httpWebRequest.Accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*"; httpWebRequest.Referer = server; httpWebRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)"; httpWebRequest.Method = "Post"; httpWebRequest.ContentLength = byteRequest.Length; Stream stream; stream = httpWebRequest.GetRequestStream(); stream.Write(byteRequest, 0, byteRequest.Length); stream.Close(); webResponse = (HttpWebResponse)httpWebRequest.GetResponse(); header = webResponse.Headers.ToString(); getStream = webResponse.GetResponseStream(); contentLength = webResponse.ContentLength; // 这里得到的是 -1 byte[] outBytes = new byte[contentLength]; // 导致这里报错 outBytes = ReadFully(getStream); getStream.Close(); return outBytes; }webResponse.ContentLength 值为 -1 ,高手们再帮帮忙啊!! C# WinForms中 如何实现 操作dos命令 C#调用c++ DLL传递结构体 日期相减 求解!!!! 问下,我们这专科生面试应该准备些什么? 如何用 MSNPSharp 实现向任意一个MSN用户发信息 请教高人。网络安全。加密揭密 的问题。 如何判断窗口是否处于活动状态? 急啊!如何像VAGAA一样 开始就创建2个程序(进程)一个用来承受另一个程序(进程)控件webBrowser的加载内存! winfrom操作access数据库用什么驱动? C#怎么连接MySql? C#传感器接受数据
http://topic.csdn.net/u/20090804/14/f74fdcbf-390c-4108-ad32-ecbe3cfff722_2.html
这句话全部报错:非静态的字段、方法或属性“SNSHelper.Kaixin001.Utility.Login(string, string)”要求对象引用为什么没有对类实例化呢?-_- ????
WebRequest wrt;
wrt = WebRequest.Create("http://xiaoyou.qq.com/index.html?ref=http%3A%2F%2Fxiaoyou.qq.com%2Findex.php%3Fmod%3Dhome");
wrt.Credentials = CredentialCache.DefaultCredentials;
WebResponse wrp;wrp = wrt.GetResponse();string html = new StreamReader(wrp.GetResponseStream(), Encoding.UTF8).ReadToEnd();
string cookie = wrp.Headers.Get("Set-Cookie");
return html;
cookie 为 null,是怎么回事呢?应该怎样获取cookie?
protected void cookieuse()
{
//写入cookie
HttpCookie cookie = new HttpCookie("Info");//定义cookie对象以及名为Info的项
DateTime dt = DateTime.Now;//定义时间对象
TimeSpan ts=new TimeSpan(1,0,0,0);//cookie有效作用时间,具体查msdn
cookie.Expires = dt.Add(ts);//添加作用时间
cookie.Values.Add("user","cxbkkk");//增加属性
cookie.Values.Add("userid","1203");
Response.AppendCookie(cookie);//确定写入cookie中
//读取cookie
if(Request.Cookies["Info"]!=null)
{
string temp=Convert.ToString(Request.Cookies["Info"].Values["user"])+" "+Convert.ToString(Request.Cookies["Info"].Values["userid"]);
//读全部就用Request.Cookies["Info"].Value)
if(temp=="")
{
Response.Write("空");
}
else
Response.Write(temp);
}
else
{
Response.Write("error");
}
//修改cookie
Response.Cookies["Info"]["user"] = "2";
Response.Cookies["Info"].Expires = DateTime.Now.AddDays(1); //删除cookie下的属性
HttpCookie acookie=Request.Cookies["Info"];
acookie.Values.Remove("userid");
acookie.Expires = DateTime.Now.AddDays(1);
Response.Cookies.Add(acookie); //删除所有cookie,就是设置过期时间为现在就行了
int limit=Request.Cookies.Count - 1;
for(int i=0;i<limit;i++)
{
acookie = Request.Cookies[i];
acookie.Expires = DateTime.Now.AddDays(-1);
Response.Cookies.Add(acookie);
}
}
我一般这样用
http://ui.ptlogin2.qq.com/cgi-bin/login?appid=15000102&hide_title_bar=1&qlogin_jumpname=xiaoyou_qlogin&s_url=http://xiaoyou.qq.com/index.php%3Fmod%3Dlogin&css=http://imgcache.qq.com/campus/login/login.css&self_regurl=http://xiaoyou.qq.com/emailreg.html
public static byte[] GetHtmlByBytes(string server, string URL, byte[] byteRequest, string cookie, out string header)
{
long contentLength;
HttpWebRequest httpWebRequest;
HttpWebResponse webResponse;
Stream getStream; httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(URL);
CookieContainer co = new CookieContainer();
co.SetCookies(new Uri(server), cookie); httpWebRequest.CookieContainer = co; httpWebRequest.ContentType = "application/x-www-form-urlencoded";
httpWebRequest.Accept =
"image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*";
httpWebRequest.Referer = server;
httpWebRequest.UserAgent =
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)";
httpWebRequest.Method = "Post";
httpWebRequest.ContentLength = byteRequest.Length;
Stream stream;
stream = httpWebRequest.GetRequestStream();
stream.Write(byteRequest, 0, byteRequest.Length);
stream.Close();
webResponse = (HttpWebResponse)httpWebRequest.GetResponse();
header = webResponse.Headers.ToString();
getStream = webResponse.GetResponseStream();
contentLength = webResponse.ContentLength; // 这里得到的是 -1 byte[] outBytes = new byte[contentLength]; // 导致这里报错
outBytes = ReadFully(getStream);
getStream.Close();
return outBytes;
}webResponse.ContentLength 值为 -1 ,高手们再帮帮忙啊!!