Пример #1
0
        private void AccountManager_Load(object sender, EventArgs e)
        {
            CommandValue = RbxJoinPath + " \"%1\"";

            if (!File.Exists(RbxJoinPath))
            {
                MessageBox.Show("Failed to find rbx-join executable", "Roblox Account Manager", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                Close();
            }

            RegistryKey MainKey    = Registry.ClassesRoot.OpenSubKey("rbx-join");
            RegistryKey CommandKey = Registry.ClassesRoot.OpenSubKey(@"rbx-join\shell\open\command");

            if (MainKey == null || CommandKey == null || (string)CommandKey.GetValue("") != CommandValue)
            {
                MessageBox.Show("The rbx-join protocol is not setup, run RegisterRbxJoinProtocol.exe to set it up", "rbx-join", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

            RegistryKey HandleKey = Registry.CurrentUser.OpenSubKey(@"Software\Sysinternals\Handle");

            if (HandleKey == null || HandleKey.GetValue("EulaAccepted") == null || (int)HandleKey.GetValue("EulaAccepted") != 1)
            {
                Process.Start("handle.exe");
            }

            ManagerKey = Registry.CurrentUser.OpenSubKey(ManagerKeyName);

            if (ManagerKey == null)
            {
                ManagerKey = Registry.CurrentUser.CreateSubKey(ManagerKeyName);
            }

            SetupNamedPipe();

            aaform         = new AccountAdder();
            ServerListForm = new ServerList();

#if DEBUG
#endif
            AccountsView.Items.Clear();

            RobloxProcessTimer.Start();

            apiclient             = new RestClient("https://api.roblox.com/");
            apiclient.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.BypassCache);

            client             = new RestClient("https://auth.roblox.com/");
            client.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.BypassCache);

            econclient             = new RestClient("https://economy.roblox.com/");
            econclient.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.BypassCache);

            WebClient WC          = new WebClient();
            string    VersionJSON = WC.DownloadString("https://clientsettings.roblox.com/v1/client-version/WindowsPlayer");
            JObject   j           = JObject.Parse(VersionJSON);
            if (j.TryGetValue("clientVersionUpload", out JToken token))
            {
                CurrentVersion = token.Value <string>();
            }
        }
Пример #2
0
        private void AccountManager_Load(object sender, EventArgs e)
        {
            if (Directory.GetParent(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)).FullName
                .Contains(Path.GetTempPath()))
            {
                int Stupid = 1337;
                MessageBox.Show("bro extract the files, don't run it in winrar");
                Environment.Exit(Stupid);
            }

            CommandValue = RbxJoinPath + " \"%1\"";

            if (!File.Exists(RbxJoinPath))
            {
                MessageBox.Show("Failed to find rbx-join executable", "Roblox Account Manager", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                Close();
            }

            if (!File.Exists("dev.mode"))
            {
                AccountsStrip.Items.Remove(getAuthenticationTicketToolStripMenuItem);
                AccountsStrip.Items.Remove(copyRbxplayerLinkToolStripMenuItem);
                AccountsStrip.Items.Remove(copySecurityTokenToolStripMenuItem);
            }

            if (File.Exists("AU.exe"))
            {
                if (File.Exists("Auto Update.exe"))
                {
                    File.Delete("Auto Update.exe");
                }

                File.Copy("AU.exe", "Auto Update.exe");
                File.Delete("AU.exe");
            }

            ArgumentsB.Visible = false; // has no use right now
            JoinServer.Size    = new Size(197, 23);

            RegistryKey MainKey    = Registry.ClassesRoot.OpenSubKey("rbx-join");
            RegistryKey CommandKey = Registry.ClassesRoot.OpenSubKey(@"rbx-join\shell\open\command");

            // if (MainKey == null || CommandKey == null || (string)CommandKey.GetValue("") != CommandValue)
            // MessageBox.Show("The rbx-join protocol is not setup, run RegisterRbxJoinProtocol.exe to set it up", "rbx-join", MessageBoxButtons.OK, MessageBoxIcon.Information); // kinda annoying ngl if you want rbx-join then yea u know how

            RegistryKey HandleKey = Registry.CurrentUser.OpenSubKey(@"Software\Sysinternals\Handle");

            if (HandleKey == null || HandleKey.GetValue("EulaAccepted") == null || (int)HandleKey.GetValue("EulaAccepted") != 1)
            {
                Process.Start("handle.exe");
            }

            ManagerKey = Registry.CurrentUser.OpenSubKey(ManagerKeyName, RegistryKeyPermissionCheck.ReadWriteSubTree);

            if (ManagerKey == null)
            {
                ManagerKey = Registry.CurrentUser.CreateSubKey(ManagerKeyName, RegistryKeyPermissionCheck.ReadWriteSubTree);
            }

            PlaceID.Text = ManagerKey.GetValue("SavedPlaceId", 3016661674).ToString();

            SetupNamedPipe();

            aaform         = new AccountAdder();
            afform         = new ArgumentsForm();
            ServerListForm = new ServerList();
            UtilsForm      = new AccountUtils();

            AccountsView.Items.Clear();

            // RobloxProcessTimer.Start();

            mainclient             = new RestClient("https://www.roblox.com/");
            mainclient.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.BypassCache);

            apiclient             = new RestClient("https://api.roblox.com/");
            apiclient.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.BypassCache);

            client             = new RestClient("https://auth.roblox.com/");
            client.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.BypassCache);

            econclient             = new RestClient("https://economy.roblox.com/");
            econclient.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.BypassCache);

            AccountClient             = new RestClient("https://accountsettings.roblox.com/");
            AccountClient.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.BypassCache);

            WebClient WC          = new WebClient();
            string    VersionJSON = WC.DownloadString("https://clientsettings.roblox.com/v1/client-version/WindowsPlayer");
            JObject   j           = JObject.Parse(VersionJSON);

            if (j.TryGetValue("clientVersionUpload", out JToken token))
            {
                CurrentVersion = token.Value <string>();
            }

            PlaceID_TextChanged(PlaceID, new EventArgs());

            Task.Run(() =>
            {
                try
                {
                    Assembly assembly        = Assembly.GetExecutingAssembly();
                    FileVersionInfo fvi      = FileVersionInfo.GetVersionInfo(assembly.Location);
                    string version           = fvi.FileVersion.Substring(0, 3);
                    WC.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36";
                    string Releases          = WC.DownloadString("https://api.github.com/repos/ic3w0lf22/Roblox-Account-Manager/releases/latest");
                    Match match = Regex.Match(Releases, @"""tag_name"":\s*""?([^""]+)");

                    if (match.Success && match.Groups[1].Value != version)
                    {
                        DialogResult result = MessageBox.Show("An update is available, click yes to run the auto updater or no to be redirected to the download page.", "Roblox Account Manager", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Information);

                        if (result == DialogResult.Yes)
                        {
                            string AFN = Path.Combine(Directory.GetCurrentDirectory(), "Auto Update.exe");

                            if (File.Exists(AFN))
                            {
                                Process.Start(AFN);
                                Environment.Exit(1);
                            }
                            else
                            {
                                MessageBox.Show("You do not have the auto updater downloaded, go to the github page and download the latest release.");
                                Process.Start("https://github.com/ic3w0lf22/Roblox-Account-Manager/releases");
                            }
                        }
                        else if (result == DialogResult.No)
                        {
                            Process.Start("https://github.com/ic3w0lf22/Roblox-Account-Manager/releases");
                        }
                    }
                }
                catch { }
            });
        }