示例#1
0
        public HWSettings GetHWSettings(string accountName)
        {
            EveAccount eA = Cache.Instance.EveAccountSerializeableSortableBindingList.List.FirstOrDefault(s => s.AccountName.Equals(accountName));

            if (eA.HWSettings != null)
            {
                return(eA.HWSettings);
            }
            return(null);
        }
示例#2
0
        void ShowWindowsToolStripMenuItemClick(object sender, EventArgs e)
        {
            var dgv = this.ActiveControl as DataGridView;

            if (dgv == null)
            {
                return;
            }
            int        index = (dgv.SelectedCells[0].OwningRow.Index);
            EveAccount eA    = Cache.Instance.EveAccountSerializeableSortableBindingList.List[index];

            eA.ShowWindows();
        }
示例#3
0
        void SelectProcessToProxyToolStripMenuItemClick(object sender, EventArgs e)
        {
            var dgv = this.ActiveControl as DataGridView;

            if (dgv == null)
            {
                return;
            }
            int        index = (dgv.SelectedCells[0].OwningRow.Index);
            EveAccount eA    = Cache.Instance.EveAccountSerializeableSortableBindingList.List[index];

            eA.StartExecuteable(String.Empty);
            return;
        }
示例#4
0
        void EditAdapteveHWProfileToolStripMenuItemClick(object sender, EventArgs e)
        {
            DataGridView dgv = this.ActiveControl as DataGridView;

            if (dgv == null)
            {
                return;
            }
            int        index = (dgv.SelectedCells[0].OwningRow.Index);
            EveAccount eA    = Cache.Instance.EveAccountSerializeableSortableBindingList.List[index];

            var hwPf = new HWProfileForm(eA);

            hwPf.Show();
        }
示例#5
0
        public HWProfileForm(EveAccount eA)
        {
            this.EA = eA;


            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            Text = string.Format("HWProfile [{0}]", EA.CharacterName);

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }
示例#6
0
 void StartInjectToolStripMenuItemClick(object sender, EventArgs e)
 {
     try
     {
         DataGridView dgv = this.ActiveControl as DataGridView;
         if (dgv == null)
         {
             return;
         }
         int        index = (dgv.SelectedCells[0].OwningRow.Index);
         EveAccount eA    = Cache.Instance.EveAccountSerializeableSortableBindingList.List[index];
         eA.StartEveInject();
         return;
     }
     catch (Exception ex)
     {
         Log("[StartInjectToolStripMenuItemClick] Exception [" + ex + "]");
     }
 }
示例#7
0
        private void CreateEverythingAndVerify2(string eveRegLink, string accountName, string password, string captchaResponse, string proxyPort, string proxyUserPassword)
        {
            string emailName = Get10MinuteEmailName(proxyPort, proxyUserPassword);

            Cache.Instance.Log("Email generated. Email: " + emailName);
            string eveacc = CreateEveAccount(eveRegLink, emailName, accountName, password, proxyPort, proxyUserPassword);

            Cache.Instance.Log(eveacc.Contains("transactionTotal") ? "Eve account created!" : "Eve account creation failed.");
            if (!eveacc.Contains("transactionTotal"))
            {
                return;
            }

            string inboxurl = "http://10minutemail.com/10MinuteMail/index.html";
            string tmp      = "";

            for (int i = 0; i < 9999; i++)
            {
                Cache.Instance.Log("checking email every 5 seconds.. i= " + i);
                tmp = CurlManager.Instance.GetPostPage(inboxurl, "", proxyPort, proxyUserPassword, false);
                Application.DoEvents();
                Thread.Sleep(2000);
                if (tmp.Contains("services.eveonline.com"))
                {
                    Cache.Instance.Log("Email found!");
                    break;
                }
            }
            if (tmp.Contains("services.eveonline.com"))
            {
                HtmlAgilityPack.HtmlDocument htmlDoc = new HtmlAgilityPack.HtmlDocument();
                htmlDoc = new HtmlAgilityPack.HtmlDocument();
                Cache.Instance.Log("Email found!");
                htmlDoc.LoadHtml(tmp);
                HtmlNode.ElementsFlags.Remove("form");
                string link = default(string);
                foreach (HtmlNode text in htmlDoc.DocumentNode.SelectNodes("//a[contains(@href, 'dataModelSelection')]"))
                {
                    if (text.OuterHtml.Contains("dataModelSelection"))
                    {
                        link = "http://10minutemail.com" + text.GetAttributeValue("href", "");
                    }
                }
                link = HttpUtility.HtmlDecode(link);
                Cache.Instance.Log("inbox link: " + link);
                if (link.Length > 1)
                {
                    Cache.Instance.Log("Email link found! Link: " + link);
                    tmp = CurlManager.Instance.GetPostPage(link, "", proxyPort, proxyUserPassword, false);
                    string veriLink = "";
                    htmlDoc.LoadHtml(tmp);
                    foreach (HtmlNode text in htmlDoc.DocumentNode.SelectNodes("//a[contains(@href, 'links.services.eveonline.com/ctt?kn=3')]"))
                    {
                        if (text.OuterHtml.Contains("links.services.eveonline.com"))
                        {
                            veriLink = text.GetAttributeValue("href", "");
                        }
                    }

                    veriLink = veriLink.Replace("amp;", "");
                    if (veriLink.Length > 1)
                    {
                        Cache.Instance.Log("Verfication link found! verink: " + veriLink);
                    }

                    tmp = CurlManager.Instance.GetPostPage(veriLink, "", proxyPort, proxyUserPassword, false);

                    if (tmp.ToLower().Contains(("for verifying").ToLower()))
                    {
                        Cache.Instance.Log("Email verification was successful! - Adding Account to Database");
                        lock (Cache.Instance.EveAccountSerializeableSortableBindingList.List){
                            EveAccount eA = new EveAccount(accountName, accountName, password, DateTime.UtcNow, DateTime.UtcNow, false, false, false);

                            var worker = new BackgroundWorker();
                            worker.DoWork += (sender, e) =>
                            {
                                // call the XYZ function
                                Cache.Instance.EveAccountSerializeableSortableBindingList.List.Add(eA);
                            };
                            worker.RunWorkerCompleted += (sender, e) =>
                            {
                                // use the result of the XYZ function:
                                var result = e.Result;
                                // Here you can safely manipulate the GUI controls
                            };
                            worker.RunWorkerAsync();

                            //Cache.Instance.EveAccountSerializeableSortableBindingList.List.Add(eA);

                            //WCFClient.Instance.GetPipeProxy.AddNewEveAccount(eA);
                        }
                    }
                }
            }
        }
示例#8
0
        private void EveManagerThread()
        {
            lock (thisLock){
                while (true)
                {
                    #region every 24 hours
                    if (Cache.Instance.EveSettings.Last24HourTS.AddHours(24) < DateTime.UtcNow)
                    {
                        Cache.Instance.EveSettings.Last24HourTS = DateTime.UtcNow;
                        // empty for now
                    }
                    #endregion

                    #region every hour
                    if (Cache.Instance.EveSettings.LastHourTS.AddHours(1) < DateTime.UtcNow)
                    {
                        Cache.Instance.EveSettings.LastHourTS = DateTime.UtcNow;

                        foreach (EveAccount eA in Cache.Instance.EveAccountSerializeableSortableBindingList.List)
                        {
                            if (eA.EndTime < DateTime.UtcNow && eA.StartTime.AddHours(20) < DateTime.UtcNow)
                            {
                                Cache.Instance.Log("[EveManagerThread] Generating new START/END for [" + eA.AccountName + "]");
                                eA.StartsPast24H = 0;
                                eA.GenerateNewBeginEnd();
                            }
                        }
                    }
                    #endregion

                    for (int i = 0; i < Cache.Instance.EveAccountSerializeableSortableBindingList.List.Count; i++)
                    {
                        EveAccount eA = Cache.Instance.EveAccountSerializeableSortableBindingList.List[i];

                        if (EveServerStatus.Instance.IsEveServerOnline)
                        {
                            if (eA.EveProcessExists())
                            {
                                Process p = Process.GetProcessById(eA.Pid);
                                if (((p.PrivateMemorySize64 / 1024) / 1000) > 1500)
                                {
                                    Cache.Instance.Log("[EveManagerThread] Private working set is too big (> 1500), quitting this instance " + eA.AccountName + " Memorysize " + ((p.PrivateMemorySize64 / 1024) / 1000).ToString());
                                    eA.KillEveProcess();
                                }

                                if (!eA.IsProcessAlive())
                                {
                                    Cache.Instance.Log("[EveManagerThread] Killing process because it's not responding anymore. Accountname: " + eA.AccountName);
                                    eA.KillEveProcess();
                                }
                            }

                            if (!eA.EveProcessExists() && eA.StartsPast24H <= 20 && eA.ShouldBeRunning && DateTime.UtcNow >= nextEveStart)
                            {
                                if (eA.IsActive)
                                {
                                    Cache.Instance.Log("[EveManagerThread] Starting new Eve Instance - AccountName: " + eA.AccountName);
                                    nextEveStart = DateTime.UtcNow.AddSeconds(rnd.Next(25, 35));
                                    eA.StartEveInject();
                                }
                            }

                            if (!eA.ShouldBeRunning && eA.EveProcessExists())
                            {
                                Cache.Instance.Log("[EveManagerThread] Stopping Eve Instance - AccountName: " + eA.AccountName);
                                eA.KillEveProcess();
                            }
                        }
                        else
                        {
                            eA.KillEveProcess();
                        }
                    }



                    Thread.Sleep(5000);
                }
            }
        }
 public HWProfileForm(EveAccount eA)
 {
     this.EA = eA;
     InitializeComponent();
     Text = string.Format("HWProfile [{0}]", EA.CharacterName);
 }