资源简介
C# 多线程 刷流量这个程序现在只是刷yahoo NCP的流量不过稍微改动就可以用来刷别的网站了

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Web;
using System.Net;
using System.Runtime.InteropServices;
using System.Threading;
using System.IO;
namespace autoUp
{
public partial class Form1 : Form
{
static int thread_num = 300;
static int t_id = 0;
Thread[] t;
List iplist = new List();
StreamWriter sw;
Encoding encoding = Encoding.UTF8;
Int32 counter = 0;
int count_all = 0;
bool iscontinue = true;
public Form1()
{
InitializeComponent();
set_url.Text = “http://quicker.zhan.cn.yahoo.com“;
t_num.Text = ““ + thread_num;
}
private void button1_Click(object sender EventArgs e)
{
iscontinue = true;
try
{
int num = Convert.ToInt32(t_num.Text);
t = new Thread[num];
}
catch
{
t = new Thread[thread_num];
}
(new Thread(new ThreadStart(ThreadStart))).Start();
start.Enabled = false;
}
private void button2_Click(object sender EventArgs e)
{
iscontinue = false;
}
public String visit(String url WebProxy wp Encoding encoding)
{
HttpWebRequest hwr = (HttpWebRequest)WebRequest.Create(url);
hwr.Method = “GET“;
hwr.Proxy = wp;
hwr.Timeout = 5000;
try
{
HttpWebResponse resp = (HttpWebResponse)hwr.GetResponse();
StreamReader sr = new StreamReader(resp.GetResponseStream() encoding);
String result = sr.ReadToEnd();
sr.Close();
resp.Close();
if (resp.StatusCode == HttpStatusCode.OK) return “success“;
else return “failed“;
}
catch (Exception ex)
{
return ex.ToString().Substring(0 50);
}
}
void ThreadStart()
{
FileStream fs = new FileStream(“C:\\ip.txt“ FileMode.Open);
StreamReader sr = new StreamReader(fs);
String ip = sr.ReadToEnd();
fs.Close();
sr.Close();
String[] sa = ip.Split(‘\n‘);
foreach (String i in sa)
{
i.Trim();
int index = i.IndexOf(“HTTP“);
if (index > 0)
{
String ip_parsed = i.Substring(0 index).Trim();
iplist.Add(ip_parsed);
}
}
for (int i = 0; i < thread_num; i++)
{
t[i] = new Thread(ne
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3758 2008-06-16 21:51 autoUp\autoUp\autoUp.csproj
文件 14336 2008-06-22 19:22 autoUp\autoUp\bin\Debug\autoUp.exe
文件 30208 2008-06-22 19:22 autoUp\autoUp\bin\Debug\autoUp.pdb
文件 14328 2008-06-22 22:21 autoUp\autoUp\bin\Debug\autoUp.vshost.exe
文件 490 2007-07-21 01:33 autoUp\autoUp\bin\Debug\autoUp.vshost.exe.manifest
文件 8369 2008-06-22 19:22 autoUp\autoUp\Form1.cs
文件 5582 2008-06-22 19:16 autoUp\autoUp\Form1.Designer.cs
文件 5814 2008-06-22 19:16 autoUp\autoUp\Form1.resx
文件 461 2008-06-22 22:21 autoUp\autoUp\obj\Debug\autoUp.csproj.FileListAbsolute.txt
文件 847 2008-06-22 19:16 autoUp\autoUp\obj\Debug\autoUp.csproj.GenerateResource.Cache
文件 14336 2008-06-22 19:22 autoUp\autoUp\obj\Debug\autoUp.exe
文件 180 2008-06-22 19:16 autoUp\autoUp\obj\Debug\autoUp.Form1.resources
文件 30208 2008-06-22 19:22 autoUp\autoUp\obj\Debug\autoUp.pdb
文件 180 2008-06-16 21:51 autoUp\autoUp\obj\Debug\autoUp.Properties.Resources.resources
文件 498 2008-06-16 21:48 autoUp\autoUp\Program.cs
文件 1472 2008-06-16 21:48 autoUp\autoUp\Properties\AssemblyInfo.cs
文件 2841 2008-06-16 21:48 autoUp\autoUp\Properties\Resources.Designer.cs
文件 5612 2008-06-16 21:48 autoUp\autoUp\Properties\Resources.resx
文件 1091 2008-06-16 21:48 autoUp\autoUp\Properties\Settings.Designer.cs
文件 249 2008-06-16 21:48 autoUp\autoUp\Properties\Settings.settings
文件 908 2008-06-16 21:48 autoUp\autoUp.sln
..A..H. 13312 2008-06-22 19:49 autoUp\autoUp.suo
目录 0 2008-06-22 22:24 autoUp\autoUp\obj\Debug\Refactor
目录 0 2008-06-22 22:24 autoUp\autoUp\obj\Debug\TempPE
目录 0 2008-06-22 22:24 autoUp\autoUp\bin\Debug
目录 0 2008-06-22 22:24 autoUp\autoUp\obj\Debug
目录 0 2008-06-22 22:24 autoUp\autoUp\bin
目录 0 2008-06-22 22:24 autoUp\autoUp\obj
目录 0 2008-06-22 22:24 autoUp\autoUp\Properties
目录 0 2008-06-22 22:24 autoUp\autoUp
............此处省略4个文件信息
相关资源
- C#解析HL7消息的库135797
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
评论
共有 条评论