Message
Message
using System.IO;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using Microsoft.Win32;
using System.IO.Compression;
using System.Diagnostics;
class Program
{
static List<string> arquivosMovidos = new List<string>();
static string steamPath = GetSteamPath();
while (true)
{
Console.Clear();
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("NÃO PAGUE POR ISSO, É GRATUITO!");
Console.WriteLine(" ");
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine("MANIFEST DOWNLOADER BY WAY ( OWYM )");
Console.WriteLine(" ");
if (string.IsNullOrWhiteSpace(APPID))
{
Console.WriteLine("APPID não pode ser vazio!");
Thread.Sleep(1000);
continue;
}
await ProcessarAPPID(APPID);
}
}
try
{
Console.WriteLine("\nIniciando download...");
byte[] data = await client.GetByteArrayAsync(DOWNLOAD);
Console.WriteLine("\nExtraindo arquivos...");
if (Directory.Exists(PASTA_EXTRAIDA))
{
Directory.Delete(PASTA_EXTRAIDA, true);
}
Directory.CreateDirectory(PASTA_EXTRAIDA);
ZipFile.ExtractToDirectory(NOMEDOARQUIVO, PASTA_EXTRAIDA);
Console.WriteLine($"Extração completa em: {PASTA_EXTRAIDA}");
// Limpeza
File.Delete(NOMEDOARQUIVO);
Directory.Delete(PASTA_EXTRAIDA, true);
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("\nProcesso concluído com sucesso!");
Console.ResetColor();
Console.WriteLine("\nPressione qualquer tecla para continuar...");
foreach (var process in Process.GetProcessesByName("steam"))
{
process.Kill();
process.WaitForExit();
}
}
else
Console.ReadKey();
}
catch (Exception ex)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("\nErro durante o processamento:");
Console.WriteLine(ex.Message);
Console.ResetColor();
Console.WriteLine("\nPressione qualquer tecla para tentar
novamente...");
Console.ReadKey();
}
}
}
if (steamPathObj != null)
{
return steamPathObj.ToString().Replace('/', '\\');
}
return null;
}
catch
{
return null;
}
}
Directory.CreateDirectory(destinoLua);
Directory.CreateDirectory(destinoManifest);
if (File.Exists(destinoCompleto))
{
File.Delete(destinoCompleto);
}
File.Move(arquivo, destinoCompleto);
Console.WriteLine($"Movido: {nomeArquivo} → {destinoDir}");
}