Пример #1
0
        public ExploitScreen()
        {
            Cef.EnableHighDPISupport();
            var settings = new CefSettings();

            settings.SetOffScreenRenderingBestPerformanceArgs();
            Cef.Initialize(settings);

            var SLib = Globals.SxLib;

            SLib.SetWindow(this);
            SLib.AttachEvent += async(SEvent, Param) =>
            {
                switch (SEvent)
                {
                case SxLibBase.SynAttachEvents.CHECKING:
                {
                    showStatusLabel();
                    headerStatusLabel.Content = "Checking...";
                    break;
                }

                case SxLibBase.SynAttachEvents.INJECTING:
                {
                    headerStatusLabel.Content = "Injecting...";
                    break;
                }

                case SxLibBase.SynAttachEvents.CHECKING_WHITELIST:
                {
                    headerStatusLabel.Content = "Checking Whitelist...";
                    break;
                }

                case SxLibBase.SynAttachEvents.SCANNING:
                {
                    showStatusLabel();
                    headerStatusLabel.Content = "Scanning...";
                    break;
                }

                case SxLibBase.SynAttachEvents.READY:
                {
                    headerStatusLabel.Content = "Ready!";

                    attachNotify.Stop();
                    designMethods.ButtonColor(attachButton, brushConverter.ConvertToString(attachButton.Background), "#FF3C3C3C");
                    await Task.Delay(1000);

                    hideStatusLabel();
                    break;
                }

                case SxLibBase.SynAttachEvents.ALREADY_INJECTED:
                {
                    error("Already injected!");
                    await Task.Delay(1000);

                    hideStatusLabel();
                    break;
                }

                case SxLibBase.SynAttachEvents.FAILED_TO_ATTACH:
                {
                    error("Failed to attach!");
                    await Task.Delay(1000);

                    hideStatusLabel();
                    break;
                }

                case SxLibBase.SynAttachEvents.FAILED_TO_FIND:
                {
                    error("Failed to find Roblox!");
                    await Task.Delay(1000);

                    hideStatusLabel();
                    break;
                }

                case SxLibBase.SynAttachEvents.NOT_RUNNING_LATEST_VER_UPDATING:
                {
                    headerStatusLabel.Content = "Not running latest version, updating...";
                    break;
                }

                case SxLibBase.SynAttachEvents.UPDATING_DLLS:
                {
                    headerStatusLabel.Content = "Updating DLLs...";
                    break;
                }

                case SxLibBase.SynAttachEvents.NOT_UPDATED:
                {
                    error("Not updated! Please try again in a little while.");
                    await Task.Delay(1000);

                    hideStatusLabel();
                    break;
                }

                case SxLibBase.SynAttachEvents.FAILED_TO_UPDATE:
                {
                    error("Auto-update failed! Please restart Synapse X.");
                    await Task.Delay(1000);

                    hideStatusLabel();
                    break;
                }

                case SxLibBase.SynAttachEvents.REINJECTING:
                {
                    headerStatusLabel.Content = "Update complete, reinjecting...";
                    break;
                }

                case SxLibBase.SynAttachEvents.NOT_INJECTED:
                {
                    error("Not injected!");
                    await Task.Delay(1000);

                    hideStatusLabel();
                    break;
                }

                case SxLibBase.SynAttachEvents.PROC_CREATION:
                {
                    attachNotify.Start();
                    break;
                }

                case SxLibBase.SynAttachEvents.PROC_DELETION:
                {
                    attachNotify.Stop();
                    designMethods.ButtonColor(attachButton, brushConverter.ConvertToString(attachButton.Background), "#FF3C3C3C");
                    await Task.Delay(1000);

                    break;
                }
                }
            };

            SLib.ScriptHubEvent += Entries =>
            {
                scriptHubButton.Content = "Script Hub";
                ScriptHubScreen scriptHub = new ScriptHubScreen(exploitScreen, Entries);
                scriptHub.Show();
                Focus();
            };

            InitializeComponent();

            Title = Globals.RandomString(Globals.Rnd.Next(10, 32));

            designMethods = new InterfaceDesign();
            new Random();
            brushConverter = new BrushConverter();
            openFileDialog = new OpenFileDialog {
                Title = "Load Script from File", Filter = "Script files|*.lua;*.txt"
            };
            attachNotify = new DispatcherTimer {
                Interval = TimeSpan.FromSeconds(1)
            };
            attachNotify.Tick += AttachNotify_Tick;

            if (Process.GetProcessesByName("RobloxPlayerBeta").Length != 0)
            {
                attachNotify.Start();
            }

            scriptsDirectory = Path.Combine(Path.Combine(Directory.GetParent(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)).FullName), "scripts");

            foreach (var FilePath in Directory.GetFiles(scriptsDirectory))
            {
                synScripts.Items.Add(Path.GetFileName(FilePath));
            }
        }