示例#1
0
        private static void Main(string[] args)
        {
            var processName = Process.GetCurrentProcess().ProcessName.ToLower();

            if (!processName.Contains("vshost") && (processName.Contains("bot") || processName.Contains("noob") || processName.Contains("tnb")))
            {
                MessageBox.Show(
                    "You must rename " + Process.GetCurrentProcess().ProcessName + ".exe to something else prior to launch." + Environment.NewLine +
                    "The new name should not contains the words: \"bot, noob, tnb\"", "Security Warning - Follow instructions to avoid automatic detections.");
                Process.GetCurrentProcess().Kill();
            }
            if (!processName.Contains("vshost"))
            {
                var account = Others.GetProcessOwner(Process.GetCurrentProcess().Id);
                Others.RemoveFileSecurity(Process.GetCurrentProcess().ProcessName + ".exe", account, FileSystemRights.ReadData, AccessControlType.Allow);
                Others.AddFileSecurity(Process.GetCurrentProcess().ProcessName + ".exe", account, FileSystemRights.ReadData, AccessControlType.Deny);
                DialogResult resulMb = MessageBox.Show(
                    "World of Warcraft 7.3 is able to detect any hacks or bots, including passives tools. (pixels bot, etc) " +
                    Environment.NewLine +
                    "At the moment, TheNoobBot does not seems to be a target." +
                    Environment.NewLine +
                    "Do you want to ignore this warning and run the bot anyway ?",
                    @"WARNING / ATTENTION / ARTUNG / внимание / 注意",
                    MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);

                if (resulMb != DialogResult.Yes)
                {
                    MessageBox.Show("You probably made the right decision. We'll notify you if we find a way to effectively protect the bot against detections.");
                    Process.GetCurrentProcess().Kill();
                }
            }
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            var loginForm = new Login();

            /* Begin AutoStart code */
            int sId = Others.ToInt32(ExtractArgs(args, "sessId"));

            if (sId > 0)
            {
                string productName       = ExtractArgs(args, "product");
                string profileName       = ExtractArgs(args, "profile");
                string battleNet         = Others.DecryptString(ExtractArgs(args, "account"));
                string wowEmail          = Others.DecryptString(ExtractArgs(args, "email"));
                string wowPassword       = Others.DecryptString(ExtractArgs(args, "password"));
                string realmName         = Others.DecryptString(ExtractArgs(args, "realm"));
                string character         = Others.DecryptString(ExtractArgs(args, "character"));
                bool   loginInfoProvided = false;
                Logging.Write("TheNoobBot started automatically. WoW Session Id = " + sId);
                if (!string.IsNullOrEmpty(battleNet) && !string.IsNullOrEmpty(wowEmail) && !string.IsNullOrEmpty(wowPassword) && !string.IsNullOrEmpty(realmName) &&
                    !string.IsNullOrEmpty(character))
                {
                    Logging.Write("The game will be connected automatically with player " + character + " if not yet connected.");

                    ScriptOnlineManager.LoadScript();
                    loginInfoProvided = true;
                }
                loginForm.AutoStart(sId, productName, profileName, battleNet, wowEmail, wowPassword, realmName, character, loginInfoProvided);
            }
            /* End AutoStart code */

            Usefuls.DisableFIPS();
            Application.Run(loginForm);
        }
示例#2
0
文件: Login.cs 项目: zneel/TheNoobBot
        private bool AttachProcess()
        {
            try
            {
                // Fight against cracked version, use sneaky strings name. Constant UpdateCheck equal "TNBAuth".
                Process[] Updater = Process.GetProcesses();
                for (int i = 0; i < Updater.Length; i++)
                {
                    Application.DoEvents();
                    Process AbortUpdate = Updater[i];
                    if (AbortUpdate.MainWindowTitle != Others.DecryptString(UpdateCheck) && AbortUpdate.ProcessName != Others.DecryptString(UpdateCheck))
                    {
                        continue;
                    }
                    AbortUpdate.Kill();
                    break;
                }

                if (SessionList.SelectedIndex < 0)
                {
                    MessageBox.Show(
                        nManager.Translate.Get(nManager.Translate.Id.Please_select_game_Process_and_connect_to_the_game) +
                        ".", nManager.Translate.Get(nManager.Translate.Id.Stop),
                        MessageBoxButtons.OK, MessageBoxIcon.Stop);
                }

                Pulsator.Dispose();

                if (SessionList.SelectedIndex >= 0)
                {
                    string[] idStringArray =
                        SessionList.SelectedItem.ToString().Replace(" ", "").Split('-');

                    int idProcess = Others.ToInt32(idStringArray[0]);

                    if (!Hook.IsInGame(idProcess) && !nManagerSetting.AutoStartLoggingInfoProvided)
                    {
                        MessageBox.Show(nManager.Translate.Get(nManager.Translate.Id.Please_connect_to_the_game) + ".",
                                        nManager.Translate.Get(nManager.Translate.Id.Stop), MessageBoxButtons.OK,
                                        MessageBoxIcon.Stop);
                        return(false);
                    }
                    if (Hook.WowIsUsed(idProcess) && !nManagerSetting.AutoStartLoggingInfoProvided)
                    {
                        DialogResult resulMb =
                            MessageBox.Show(
                                nManager.Translate.Get(
                                    nManager.Translate.Id.The_Game_is_currently_used_by_TheNoobBot_or_contains_traces) +
                                "\n\n" +
                                nManager.Translate.Get(
                                    nManager.Translate.Id.If_no_others_session_of_TheNoobBot_is_currently_active),
                                nManager.Translate.Get(nManager.Translate.Id.Use_this_Game) + "?" + @" - " +
                                Hook.PlayerName(idProcess), MessageBoxButtons.YesNo,
                                MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                        if (resulMb == DialogResult.No)
                        {
                            return(false);
                        }
                    }

                    Pulsator.Pulse(idProcess, KeyNManager);
                    Logging.Write("Select game process: " + SessionList.SelectedItem);
                    if (Pulsator.IsActive)
                    {
                        if (Usefuls.InGame && !Usefuls.IsLoading)
                        {
                            return(true);
                        }
                        if (nManagerSetting.AutoStartLoggingInfoProvided)
                        {
                            Others.LoginToWoW();
                            if (Usefuls.InGame && !Usefuls.IsLoading)
                            {
                                return(true);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Logging.WriteError("AttachProcess(): " + ex);
            }
            return(false);
        }
示例#3
0
文件: Login.cs 项目: zneel/TheNoobBot
        private void MainFormOnLoad(object sender, EventArgs e)
        {
            try
            {
                if (Others.ExistFile(Application.StartupPath + "\\Settings\\.login"))
                {
                    var strReader = new StreamReader(Application.StartupPath + "\\Settings\\.login", Encoding.Default);
                    try
                    {
                        string   text  = Others.DecryptString(strReader.ReadLine());
                        string[] text2 = text.Split('#');
                        Identifier.Text      = text2[0];
                        Password.Text        = text2[1];
                        Identifier.ForeColor = Color.FromArgb(118, 118, 118);
                        Password.ForeColor   = Color.FromArgb(118, 118, 118);
                        if (Identifier.Text != "")
                        {
                            Remember.Checked = true;
                            if (Password.Text == "Password")
                            {
                                UseKey.Checked = true;
                                Password.Hide();
                            }
                        }
                    }
                    catch
                    {
                        Identifier.Text  = "";
                        Password.Text    = "";
                        Remember.Checked = false;
                    }
                    strReader.Close();
                }

                LoginButton.Enabled   = false;
                RefreshButton.Enabled = false;
                LoginServer.CheckServerIsOnline();
                while (!LoginServer.IsOnlineserver)
                {
                    Thread.Sleep(10);
                    Application.DoEvents();
                    Thread.Sleep(50);
                }
                LoginServer.CheckUpdate();
                LoginButton.Enabled   = true;
                RefreshButton.Enabled = true;

                RefreshProcessList();

                /* Begin AutoStart code */
                bool sIdFound = false;
                if (_autoStarted > 0)
                {
                    for (int i = 0; i < SessionList.Items.Count; i++)
                    {
                        object item = SessionList.Items[i];
                        if (item.ToString().Contains(_autoStarted + " -"))
                        {
                            SessionList.SelectedIndex = i;
                            sIdFound = true;
                            break;
                        }
                    }
                    if (sIdFound)
                    {
                        nManagerSetting.ActivateProductTipOff = false;
                        LoginButton_Click(new object(), new EventArgs());
                    }
                }
                /* End AutoStart code */
            }
            catch (Exception ex)
            {
                Logging.WriteError("MainFormOnLoad(object sender, EventArgs e): " + ex);
            }
        }
示例#4
0
文件: Login.cs 项目: zneel/TheNoobBot
        private void MainFormOnLoad(object sender, EventArgs e)
        {
            try
            {
                if (Others.ExistFile(Application.StartupPath + "\\Settings\\.login"))
                {
                    var strReader = new StreamReader(Application.StartupPath + "\\Settings\\.login", Encoding.Default);
                    try
                    {
                        string   text  = Others.DecryptString(strReader.ReadLine());
                        string[] text2 = text.Split('#');
                        Identifier.Text      = text2[0];
                        Password.Text        = text2[1];
                        Identifier.ForeColor = Color.FromArgb(118, 118, 118);
                        Password.ForeColor   = Color.FromArgb(118, 118, 118);
                        if (Identifier.Text != "")
                        {
                            Remember.Checked = true;
                            if (Password.Text == "Password")
                            {
                                UseKey.Checked = true;
                                Password.Hide();
                            }
                        }
                    }
                    catch
                    {
                        Identifier.Text  = "";
                        Password.Text    = "";
                        Remember.Checked = false;
                    }
                    strReader.Close();
                }

                LoginButton.Enabled   = false;
                RefreshButton.Enabled = false;
                LoginServer.CheckServerIsOnline();
                while (!LoginServer.IsOnlineserver)
                {
                    Thread.Sleep(30);
                    Application.DoEvents();
                }
                LoginServer.CheckUpdate();
                LoginButton.Enabled   = true;
                RefreshButton.Enabled = true;

                RefreshProcessList();

                /* Begin AutoStart code */
                bool sIdFound = false;
                if (_autoStarted > 0)
                {
                    for (int i = 0; i < SessionList.Items.Count; i++)
                    {
                        Application.DoEvents();
                        object item = SessionList.Items[i];
                        if (item.ToString().Contains(_autoStarted + " -"))
                        {
                            SessionList.SelectedIndex = i;
                            sIdFound = true;
                            break;
                        }
                    }
                    if (sIdFound)
                    {
                        nManagerSetting.ActivateProductTipOff = false;
                        LoginButton_Click(new object(), new EventArgs());
                    }
                }
                /*Process.Start("https://goo.gl/TtMsEh");*/
                //else
                //    MessageBox.Show(@"Blizzard is currently very active in the Anti-Bot fight and it may not be wise to use the bot at that very moment in time.", @"WARNING / ATTENTION / ARTUNG / внимание / 注意");
                /* End AutoStart code */
            }
            catch (Exception ex)
            {
                Logging.WriteError("MainFormOnLoad(object sender, EventArgs e): " + ex);
            }
        }