static void Watermark() { EzConsole.WriteLine(" ████████╗██████╗ ██╗███╗ ██╗██╗████████╗██╗ ██╗ ██████╗ ██████╗ ██████╗ ██████╗ ", ConsoleColor.Green, false); EzConsole.WriteLine(" ╚══██╔══╝██╔══██╗██║████╗ ██║██║╚══██╔══╝╚██╗ ██╔╝██╔════╝██╔═══██╗██╔══██╗██╔══██╗", ConsoleColor.Green, false); EzConsole.WriteLine(" ██║ ██████╔╝██║██╔██╗ ██║██║ ██║ ╚████╔╝ ██║ ██║ ██║██████╔╝██║ ██║", ConsoleColor.Green, false); EzConsole.WriteLine(" ██║ ██╔══██╗██║██║╚██╗██║██║ ██║ ╚██╔╝ ██║ ██║ ██║██╔══██╗██║ ██║", ConsoleColor.Green, false); EzConsole.WriteLine(" ██║ ██║ ██║██║██║ ╚████║██║ ██║ ██║ ╚██████╗╚██████╔╝██║ ██║██████╔╝", ConsoleColor.Green, false); EzConsole.WriteLine(" ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝ ", ConsoleColor.Green, false); EzConsole.WriteLine(" ", ConsoleColor.Green, false); }
static void Main(string[] args) { Console.Title = "TrinityCord | Tokens: 0 | Proxies: 0 | Checked Proxies: 0 | Working Tokens: 0 | Invalid Tokens: 0"; Watermark(); #region File Manager if (!File.Exists("proxies.txt") && !File.Exists("tokens.txt")) { File.Create("proxies.txt"); File.Create("tokens.txt"); EzConsole.WriteLine(" [!] Files `tokens.txt` and `proxies.txt` have been created for you, please fill them in!", ConsoleColor.Red, true); } if (!File.Exists("proxies.txt")) { File.Create("proxies.txt"); EzConsole.WriteLine(" [!] Please put your proxies into the 'proxies.txt' file!", ConsoleColor.Red, true); } if (!File.Exists("tokens.txt")) { File.Create("tokens.txt"); EzConsole.WriteLine(" [!] Please put the Discord tokens into the 'tokens.txt' file!", ConsoleColor.Red, true); } #endregion #region Loader int tokens = 0; int proxies = 0; foreach (string token in File.ReadAllLines("tokens.txt")) { tokens++; Variables.Tokens.Add(token); } foreach (string proxy in File.ReadAllLines("proxies.txt")) { proxies++; Variables.Proxies.Add(proxy); } if (tokens <= 0) { EzConsole.WriteLine($" [+] `tokens.txt` is empty, please input Discord token(s)", ConsoleColor.Red, true); } if (proxies <= 0) { EzConsole.WriteLine($" [+] No proxies found in `proxies.txt`!", ConsoleColor.Red, true); } Console.Title = $"TrinityCord | Tokens: {tokens} | Proxies: {proxies} | Checked Proxies: 0 | Working Tokens: 0 | Invalid Tokens: 0"; EzConsole.WriteLine($" [+] Successfully loaded {tokens} tokens and {proxies} proxies!", ConsoleColor.Green, false); #endregion #region Proxy Checking EzConsole.Write($"\n [+] Would you like to check proxies before continuing? (y/n): ", ConsoleColor.Green, false); switch (Console.ReadLine()) { case "n": goto Start; case "N": goto Start; } string ip = string.Empty; foreach (string proxy in Variables.Proxies) { ip = proxy.Split(':')[0]; var ping = new Ping(); var reply = ping.Send(ip); if (reply.Status == IPStatus.Success) { Variables.WorkingProxies.Add(proxy); Variables.CheckedProxies++; EzConsole.WriteLine($" [+] {ip} - ({reply.RoundtripTime}ms)", ConsoleColor.Green, false); Console.Title = $"TrinityCord | Tokens: {tokens} | Proxies: {proxies} | Checked Proxies: {Variables.CheckedProxies}/{Variables.Proxies.Count} | Working Tokens: 0 | Invalid Tokens: 0"; } else { Variables.NonWorkingProxies++; Variables.CheckedProxies++; EzConsole.WriteLine($" [-] {ip}", ConsoleColor.Red, false); Console.Title = $"TrinityCord | Tokens: {tokens} | Proxies: {proxies} | Checked Proxies: {Variables.CheckedProxies}/{Variables.Proxies.Count} | Working Tokens: 0 | Invalid Tokens: 0"; } } Variables.ProxiesChecked = true; EzConsole.WriteLine($" [+] Successfully loaded {Variables.WorkingProxies.Count} working proxies and removed {Variables.NonWorkingProxies} dead proxies!", ConsoleColor.Green, false); #endregion Start: StartChecker(); Console.Read(); }
public void CheckTokens() { EzConsole.WriteLine("\n Starting...\n", ConsoleColor.Green, false); foreach (string token in Variables.Tokens) { try { using (var wc = new WebClient()) { if (!Variables.ProxiesChecked) { foreach (string proxy in Variables.Proxies) { WebProxy wp = new WebProxy(proxy); wc.Proxy = wp; } } else { foreach (string proxy in Variables.WorkingProxies) { WebProxy wp = new WebProxy(proxy); wc.Proxy = wp; } } wc.Headers.Add("Content-Type", "application/json"); wc.Headers.Add(HttpRequestHeader.Authorization, token); wc.DownloadString("https://discordapp.com/api/v7/users/@me/guilds"); Variables.WorkingTokens.Add(token); Console.Title = $"TrinityCord | Tokens: {Variables.Tokens.Count} | Proxies: {Variables.Proxies.Count} | Checked Proxies: {Variables.CheckedProxies}/{Variables.Proxies.Count} | Working Tokens: {Variables.WorkingTokens.Count} | Invalid Tokens: {Variables.NonWorkingTokens.Count}"; EzConsole.WriteLine($" [+] Working token found - {token}", ConsoleColor.Green, false); } } catch (WebException e) { HttpWebResponse response = (HttpWebResponse)e.Response; if (response.StatusCode == HttpStatusCode.Unauthorized) // 401 Token Invalid { Variables.NonWorkingTokens.Add(token); Console.Title = $"TrinityCord | Tokens: {Variables.Tokens.Count} | Proxies: {Variables.Proxies.Count} | Checked Proxies: {Variables.CheckedProxies}/{Variables.Proxies.Count} | Working Tokens: {Variables.WorkingTokens.Count} | Invalid Tokens: {Variables.NonWorkingTokens.Count}"; EzConsole.WriteLine(" [X] Invalid token!", ConsoleColor.Red, false); } else { EzConsole.WriteLine(" [X] Proxy rate limited! Switching proxy...", ConsoleColor.Red, false); } } } string date = DateTime.Now.ToString("dd MMM HH-mm-ss"); if (!Directory.Exists("Logs")) { Directory.CreateDirectory("Logs"); } if (!Directory.Exists($"Logs\\{date}")) { Directory.CreateDirectory($"Logs\\{date}"); } File.WriteAllLines($"Logs\\{date}\\Tokens.txt", Variables.WorkingTokens); if (!Variables.ProxiesChecked) { File.WriteAllLines($"Logs\\{date}\\Proxies.txt", Variables.Proxies); } else { File.WriteAllLines($"Logs\\{date}\\WorkingProxies.txt", Variables.WorkingProxies); } EzConsole.WriteLine($"\n [+] Successfully checked all tokens! Saved to {Directory.GetCurrentDirectory()}\\Logs\\{date}", ConsoleColor.Cyan, false); }