Esempio n. 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--;
        }
Esempio n. 2
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;
         }
     }
 }
Esempio n. 3
0
 private static string GetUser()
 {
     lock ("spamm")
     {
         string user = null;
         try
         {
             user = (from u in _list where !_sendedList.Contains(u) select u).FirstOrDefault();
         }
         catch { }
         if (user != null)
         {
             _sendedList.Add(user);
             _list.Remove(user);
         }
         return(user);
     }
 }
Esempio n. 4
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();
     }
 }
Esempio n. 5
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--; }
             }
         }
     }
 }
Esempio n. 6
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="dirA"></param>
        /// <param name="dirB"></param>
        public DirComparison(string dirA, string dirB)
        {
            this.DirA = dirA;
            this.DirB = dirB;
            ListA     = DirComparison.Parse(dirA);
            ListB     = DirComparison.Parse(dirB);

            DiffersInA = new List <DirItem>();
            foreach (DirItem item in ListA)
            {
                if (!ListB.Contains(item))
                {
                    DiffersInA.Add(item);
                }
            }
            DiffersInB = new List <DirItem>();
            foreach (DirItem item in ListB)
            {
                if (!ListA.Contains(item))
                {
                    DiffersInB.Add(item);
                }
            }
        }