Created
December 22, 2018 15:41
-
-
Save dukesteen/3d7192b3189dd8c16e0f27615cf2be49 to your computer and use it in GitHub Desktop.
yeetus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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