资源简介
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# 从Excel导入数据到DataGridView、SqlSe
- C#播放mp3的程
- asp.net上传大文件显示进度条百分比
- C#开发的QQ机器人,适用于任意版本
- C# socket 通信 允许发送图片,文字,文
- C# 网络编程ftpvs2012
- 使用C#开发的基于WCF和PNRP的P2P文件共
- C#引用Visa读取示波器数据
- 连锁店管理系统c#含数据库
- 104电力规约的c#部分功能实现
- c#二维码生成
- 迷宫自动生成.zip
-
C# winfrom操作xm
l_读写修改xm l及写入 - C# 角点检测
- C# 西门子PLC ppi通讯程序
- C#自动出题判分小程序
- C#实现的 路由 距离矢量算法
- C# 将照片存储到MySQL数据库
- ASP.NET 动态网站开发基础教程(C#篇)
- C# 简单反射实现winform左侧树形导航,
- WPF封装动画类,使用方便气泡动画、
- C#WinForm基于BS构架实现CS及源代码
- C#实现局域网文件传送
- c# 截取指定窗口图 根据指定坐标
- 传智播客24期最全视频
- C#控制IE浏览器
- C#对DataGridView进行添加、修改、删除数
- FTP上传、、创建目录、重命名、删除
- c# 游戏手柄控制 Joystick
- c# 调用百度地图API
评论
共有 条评论