• 大小: 46KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-06
  • 语言: C#
  • 标签: C#  刷流量  多线程  

资源简介

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个文件信息

评论

共有 条评论