Skip to content

Instantly share code, notes, and snippets.

@dukesteen
Created December 22, 2018 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dukesteen/3d7192b3189dd8c16e0f27615cf2be49 to your computer and use it in GitHub Desktop.
Save dukesteen/3d7192b3189dd8c16e0f27615cf2be49 to your computer and use it in GitHub Desktop.
yeetus
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using System.IO;
namespace TheAlteningChecker
{
class Program
{
static void Main(string[] args)
{
Start:
Console.Write("Enter your API-Key: ");
string api_key = Console.ReadLine();
Console.Write("Enter your limit: ");
string limit = Console.ReadLine();
Console.Write("Enter desired level: ");
string desiredlevel = Console.ReadLine();
Console.Write("Enter desired path to save accounts: ");
string path = Console.ReadLine();
Console.Write("Enter desired path to save failed accounts: ");
string path2 = Console.ReadLine();
Console.Clear();
for (int i = 0; i < Convert.ToInt32(limit); i++) {
string json = "";
using (WebClient client = new WebClient())
{
try
{
json = client.DownloadString("https://api.thealtening.com/v1/generate?token=" + api_key + "&info=true");
}
catch(WebException)
{
Console.WriteLine("API ERROR, TRY AGAIN (Possible fix: Generate a new API key)");
goto Start;
}
}
var dataObject = JsonConvert.DeserializeObject<dynamic>(json);
string account = dataObject.token.ToString();
int hypixellevel = 0;
string hypixelrank = "";
string mineplexrank = "";
if (dataObject.info.ContainsKey("hypixel.lvl"))
{
mineplexrank = dataObject.info["mineplex.rank"];
}
else
{
mineplexrank = "NORMAL";
}
if (dataObject.info.ContainsKey("hypixel.lvl"))
{
hypixellevel = dataObject.info["hypixel.lvl"];
}
else
{
hypixellevel = 0;
}
if (dataObject.info.ContainsKey("hypixel.rank"))
{
hypixelrank = dataObject.info["hypixel.rank"];
}
else
{
hypixelrank = "DEFAULT";
}
if (dataObject.limit == false)
{
if (hypixellevel >= Convert.ToInt32(desiredlevel) || dataObject.info.ContainsKey("mineplex.rank") || dataObject.ContainsKey("hypixel.rank"))
{
Console.ForegroundColor = ConsoleColor.Green;
Console.Write("[SUCCESS] ");
Console.ResetColor();
var message = $"{account} [{hypixelrank}] [{mineplexrank}] | hypixel level: {hypixellevel}";
Console.Write(message);
Console.WriteLine();
using (StreamWriter sw = new StreamWriter(@path, true))
{
sw.WriteLine($"{account}:password");
}
}
else
{
using (StreamWriter sw = new StreamWriter(@path2, true))
{
sw.WriteLine($"[FAILED] {account} [{hypixelrank}] [{mineplexrank}] | hypixel level: {hypixellevel}");
}
/*
Console.ForegroundColor = ConsoleColor.Red;
Console.Write("[FAILED] ");
Console.ResetColor();
Console.Write(account + $" [{hypixelrank}]" + $" | hypixel level: {hypixellevel}");
Console.WriteLine();
*/
}
}
else
{
Console.ForegroundColor = ConsoleColor.Red;
Console.Write("[API] ");
Console.ResetColor();
Console.Write(account + $"LIMIT REACHED");
Console.WriteLine();
goto End;
}
}
End:
Console.Write("Would you like to generate more accounts? (Y/N)");
var yesOrNo = Console.ReadLine();
if (yesOrNo == "Y")
{
goto Start;
}
else
{
Environment.Exit(0);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment