概览:编写一个刷投票外挂的代码容易吗?
今天写一篇关于编写刷投票外的代码,因为近期有很多的网友们都在问这样的问题,毕竟现在的投票活动实在是火爆的不得了,你但凡想要...

编写一个刷投票外挂的代码容易吗?
今天写一篇关于编写刷投票外的代码,因为近期有很多的网友们都在问这样的问题,毕竟现在的投票活动实在是火爆的不得了,你但凡想要取得冠军或者是理想的名次,几乎都是需要借助刷票的力量来帮助自己才有可能实现的,那么下面我来给大家说下刷投票外挂的代码吧

刷投票外挂截图:
编写一个刷投票外挂的代码容易吗?
一、生成验证码图片并显示代码
由于C#代码难度不大,这里就不再细讲了,仅贴出代码,最后给出源码,大家可以参考;
private void button1_Click(object sender, EventArgs e)
{
System.Net.ServicePointManager.Expect100Continue = false;
Uri uri = new Uri(“http://edu.sqzycc.com/inc/checkcode.asp”);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream resStream = response.GetResponseStream();//得到验证码数据流
Bitmap sourcebm = new Bitmap(resStream);//初始化Bitmap图片
//sourcebm.Save(@”C:\test.gif”, ImageFormat.Gif);//可以保存到本地
this.pictureBox1.Image = sourcebm;
}
二、向服务器处理程序POST数据
private void button2_Click(object sender, EventArgs e)
{
System.Net.ServicePointManager.Expect100Continue = false;
//string strsubmit = “YES”;
ASCIIEncoding encoding = new ASCIIEncoding();
string data2 = this.textBox1.Text;
string postData = “pr_id=1&hxr=26&hxr=30&hxr=33&hxr=39&hxr=53&hxr=54&hxr=66&hxr=69&hxr=70&hxr=81&code=” + data2 + “&cid=411402198807885982&x=9&y=5”;
this.label1.Text = postData;
byte[] data = encoding.GetBytes(postData);
// Prepare web request…
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(“http://edu.sqzycc.com/do.asp?action=post”);
myRequest.Method = “POST”;
myRequest.ContentType = “application/x-www-form-urlencoded”;
myRequest.UserAgent = “Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)”;
myRequest.ContentLength = data.Length;
Stream newStream = null;
try
{
newStream = myRequest.GetRequestStream();
}
catch (Exception ex)
{
this.label2.Text = ex.Message;
return;
}
// Send the data.
newStream.Write(data, 0, data.Length);
newStream.Close();
// Get response
HttpWebResponse httpWebResponse = null;
try
{
httpWebResponse = (HttpWebResponse)myRequest.GetResponse();
}
catch (Exception ex)
{
this.label2.Text = ex.Message;
return;
}
Stream responseStream = httpWebResponse.GetResponseStream();
//这段用来获取返回信息的编码方式,以防乱码
Encoding MyEncoding = Encoding.Default;
// 如果要下载的页面经过压缩,则先解压
if (httpWebResponse.ContentEncoding.ToLower().IndexOf(“gzip”) >= 0)
{
responseStream = new GZipStream(responseStream, CompressionMode.Decompress);
}
if (MyEncoding == null)
{
MyEncoding = Encoding.Default;
}
StreamReader reader = new StreamReader(responseStream, MyEncoding);
string content = reader.ReadToEnd();
this.label2.Text = content;
}
写于最后,至于如何得知后台处理程序的地址的,可以在IE中使用HttpWatch抓包实现,也可以在chrome中使用“开发者工具”下的Network标签
当选中“preserve log”时,该程序就会持序记录网络行为。(源码在最后)
三、关于验证码自动识别
关于验证码自动识别的问题,昨天我稍微研究了一下,主要用到Tesseract-OCR,这个东东就可以做到图片自动识别,但我试了下,一般而言,识别率不太高;如果针对特定网站做验证识别的话,可能要对Tesseract进行数据训练,以提高准确率。