示例#1
0
        public void Send(object o)
        {
            i++;
            string s = (string)o;

            try
            {
                Socket _Socket = new TcpClient("192.84.196.226", 8080).Client;
                using (NetworkStream _NetworkStream = new NetworkStream(_Socket))
                {
                    _NetworkStream.Write(string.Format(Res.proxy, s));
                    string s2 = _NetworkStream.Cut("\r\n").ToStr();
                    s.Trace(s2.Trim());
                    if (s2 == _ok)
                    {
                        if (!_ListA.Contains(s))
                        {
                            _ListA.Add(s);
                        }
                        _ListA.Flush();
                        "success".Trace();
                    }
                    _Socket.Close();
                }
            }
            catch (IOException) { "err".Trace(); }
            catch (SocketException) { "connerr".Trace(); }
            i--;
        }
示例#2
0
        private void Populate()
        {
            Connect();
            int max = i.i + 50 * 60;

            for (; i.i < max; i.i += 60)
            {
                try
                {
                    byte[] _bytes = File.ReadAllBytes("1 Sended.html");
                    Helper.Replace(ref _bytes, "_st_", i.ToString(), 1);
                    _Socket.Send(_bytes);
                    string s = Http.ReadHttp(_Socket).ToStr().Save();

                    MatchCollection ms = Regex.Matches(s, @"(?:(?:user\d+.html)|(?:showuser=\d+))"">(.+?)</a></strong>");

                    foreach (Match m in ms)
                    {
                        _ListA.Add(HttpUtility.HtmlDecode(m.Groups[1].Value)).Trace();
                    }
                    "".Trace();
                    _ListA.Flush();
                }
                catch { Connect(); }
            }
        }
示例#3
0
 private void Spamm()
 {
     while (true)
     {
         StringBuilder sb = new StringBuilder();
         foreach (string s in _ListA)
         {
             if (!_ListA2.Contains(s))
             {
                 sb.Append(s + ";");
             }
         }
         byte[] _bytes = File.ReadAllBytes("1 Sended post.html");
         Helper.Replace(ref _bytes, "_users_", HttpUtility.UrlEncode(sb.ToString(0, sb.Length - 1), Encoding.Default), 1);
         string s2 = HttpUtility.UrlEncode(File.ReadAllText("../message.txt", Encoding.Default), Encoding.Default);
         Helper.Replace(ref _bytes, "_msg_", s2, 1);
         Http.Length(ref _bytes);
         _Socket.Send(_bytes.Save());
         string s3 = Http.ReadHttp(_Socket).ToStr().Save();
         Match  m  = Regex.Match(s3, "вить сообщение (.+?), поскольку он");
         if (m.Success)
         {
             _ListA2.Add(HttpUtility.HtmlDecode(m.Groups[1].Value).Trace());
             _ListA2.Flush();
         }
         else
         {
             foreach (string s in _ListA)
             {
                 if (!_ListA2.Contains(s))
                 {
                     _ListA2.Add(s);
                 }
             }
             _ListA2.Flush();
             break;
         }
     }
 }
示例#4
0
        public Program()
        {
            _sendedList = new ListA("postedlist.txt");
            for (int i = 0; i < 5; i++)
                new Client().StartSpammAsync();

            for (int i = 0; i < 1; i++)
                new Client().StartPopulateAsync();

            while (true)
            {
                Thread.Sleep(5000);
                _sendedList.Flush();
                Trace.WriteLine("flushed");
            }
        }
示例#5
0
        public Program()
        {
            _sendedList = new ListA("postedlist.txt");
            for (int i = 0; i < 5; i++)
            {
                new Client().StartSpammAsync();
            }

            for (int i = 0; i < 1; i++)
            {
                new Client().StartPopulateAsync();
            }

            while (true)
            {
                Thread.Sleep(5000);
                _sendedList.Flush();
                Trace.WriteLine("flushed");
            }
        }
示例#6
0
 private void Populate()
 {
     Connect();
     for (; i < 551; i += 1)
     {
         byte[] _bytes = File.ReadAllBytes("1 Sended.html");
         Helper.Replace(ref _bytes, "_page_", "/forum/memberlist.php?&order=asc&sort=username&page=" + i, 1);
         _Socket.Send(_bytes.Save());
         string          s  = Http.ReadHttp(_Socket).ToStr().Save();
         MatchCollection ms = Regex.Matches(s, @"<a href=""member.php\?u=\d+"">(.+?)</a>");
         ms.Count.Trace();
         foreach (Match m in ms)
         {
             string s2 = HttpUtility.HtmlDecode(m.Groups[1].Value);
             if ((!_ListA.Contains(s2)).Trace())
             {
                 _ListA.Add(s2);
             }
         }
         "".Trace();
         _ListA.Flush();
     }
 }
示例#7
0
 private void Populate()
 {
     while (true)
     {
         Socket _Socket = Connect();
         for (; ; i.i++)
         {
             Trace.WriteLine("i:" + i);
             //while (list.Count > 500) Thread.Sleep(100);
             lock ("spamm")
             {
                 try
                 {
                     string s2 = String.Format(Res._Get, i);
                     //Debugger.Break();
                     _Socket.Send(s2);
                     string          s  = Http.ReadHttp(_Socket).ToStr().Save("populate");
                     MatchCollection ms = Regex.Matches(s, @"u=\d+"">([\[\]{}() <>\- .^!a-zA-Z\dа-яА-Я_@$]+?)</a>", RegexOptions.IgnoreCase);
                     int             i2 = 0;
                     foreach (Match m in ms)
                     {
                         string s3 = HttpUtility.HtmlDecode(m.Groups[1].Value);
                         if (!list.Contains(s3) && !posted.Contains(s3))
                         {
                             i2++;
                             list.Add(s3);
                             posted.Add(s3);
                         }
                     }
                     posted.Flush();
                     Trace.WriteLine("populated:" + i2);
                 }
                 catch (IOException) { _Socket = Connect(); i.i--; }
             }
         }
     }
 }