예제 #1
0
        public Connection(string sso, MainFrm main, int id, string server = null, int port = 0)
        {
            _sso         = sso;
            _main        = main;
            Id           = id;
            _keyExchange = new HKeyExchange(Exponent, Modulus);
            _rand        = new Random();
            _tentativas  = 0;

            _proxyServer = server;
            _proxyPort   = port;
        }
예제 #2
0
        public static async void Start(string ssoList, MainFrm main)
        {
            var count = 0;

            string[] sso = { };
            try
            {
                sso = ssoList.Split('|');
            }
            catch
            {
                sso[0] = ssoList;
            }

            foreach (var s in sso)
            {
                _lastId++;
                Connection bot;

                if (main.IsUsingProxy)
                {
                    if (main.Proxies.Count is 0)
                    {
                        break;
                    }
                    count++;
                    bot = new Connection(s, main, _lastId, main.Proxies.First().Key, main.Proxies.First().Value);
                    if (count == main.BotsPerProxy)
                    {
                        main.Proxies.Remove(main.Proxies.First().Key);
                        count = 0;
                    }
                }
                else
                {
                    bot = new Connection(s, main, _lastId);
                }

                bot.Connect();

                main.AddBot(_lastId);
                Bots.Add(bot);
                await Task.Delay(1000);
            }
        }
예제 #3
0
 public Intercept(MainFrm main)
 {
     _main = main;
 }