Advertisement
Guest User

Example Bruter

a guest
May 22nd, 2016
959
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.87 KB | None | 0 0
  1. static void Main(string[] args)
  2.         {
  3.             Console.WriteLine("Start Bruting...");
  4.  
  5.             String key = "11111111";
  6.  
  7.             while (true)
  8.             {
  9.                 while (!checkLicense(key))
  10.                 {
  11.                     int intKey = int.Parse(key);
  12.  
  13.                     if (intKey % 100 == 0)
  14.                         Console.WriteLine("We are at key: " + key);
  15.  
  16.                     intKey += 1;
  17.                     key = intKey.ToString();
  18.                 }
  19.  
  20.                 Console.WriteLine("\n[*] Found Working: " + key);
  21.                 Console.Write("\nWanna search another one? [Y/n] ");
  22.  
  23.                 if (Console.ReadLine().ToLower() == "n")
  24.                     break;
  25.  
  26.                 int intKey2 = int.Parse(key);
  27.                 intKey2 += 1;
  28.                 key = intKey2.ToString();
  29.             }
  30.         }
  31.  
  32.         private static bool checkLicense(String key)
  33.         {
  34.             if (key.Length != 8)
  35.                 return false;
  36.  
  37.             int bigNum;
  38.             try
  39.             {
  40.                 bigNum = int.Parse(key);
  41.             }
  42.             catch
  43.             {
  44.                 return false;
  45.             }
  46.  
  47.             if (bigNum % getInt(key, 0) != 0)
  48.             {
  49.                 return false;
  50.             }
  51.  
  52.             if (getInt(key, 2) + getInt(key, 5) != getInt(key, 1))
  53.             {
  54.                 return false;
  55.             }
  56.  
  57.             if ((getInt(key, 3) * getInt(key, 7)) % 2 != 0)
  58.             {
  59.                 return false;
  60.             }
  61.  
  62.             if (getInt(key, 6) - getInt(key, 5) != getInt(System.Environment.Version.ToString(), 0))
  63.             {
  64.                 return false;
  65.             }
  66.  
  67.             return true;
  68.         }
  69.  
  70.         private static int getInt(String str, int pos)
  71.         {
  72.             return int.Parse(str.Substring(pos, 1));
  73.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement