Advertisement
Guest User

Untitled

a guest
May 30th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.74 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace Database_Get_02
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.  
  15.  
  16.  
  17.             string[] cache = new string[800000];
  18.             string[] cat = new string[499];
  19.             string[] user = new string[800000];
  20.             string[] mail = new string[800000];
  21.             string[] pass = new string[800000];
  22.             string[] salt = new string[800000];
  23.             int count = 0;
  24.  
  25.             using (StreamReader sr = new StreamReader(@"C:\Users\mikkr\Downloads\bh.txt"))
  26.             {
  27.                 while (sr.Peek() >= 0)
  28.                 {
  29.                     Console.Clear();
  30.                     Console.SetCursorPosition(0, 1);
  31.                     cache[count] = sr.ReadLine();
  32.                     Console.WriteLine(count);
  33.                     count++;
  34.                 }
  35.                 cat = CatArray(cache[0]);
  36.                 salt = LoadCat(CatGet("password", cat), cache);
  37.                 Console.WriteLine("Done!");
  38.  
  39.             }
  40.         }
  41.  
  42.  
  43.  
  44.         static string[] CatArray(string cache)
  45.         {
  46.             int manager = 0;
  47.             int count = 0;
  48.             int encap = 0;
  49.             string localCache = "";
  50.             string[] output = new string[400];
  51.             string separator = ",";
  52.             string encapsulator = "`";
  53.             string starter = "(";
  54.             string ender = ")";
  55.  
  56.             for (int x = 0; x <= cache.Length; x++)
  57.             {
  58.                 string temp = cache.Substring(x, 1);
  59.                 if (temp == ender) { break; }
  60.                 if (manager == 1)
  61.                 {
  62.                     if (temp == encapsulator)
  63.                     {
  64.                         encap++;
  65.                         temp = "";
  66.                     }
  67.                     else if (temp != encapsulator && temp != separator && temp != " ")
  68.                     {
  69.                         localCache += temp;
  70.                     }
  71.                 }
  72.                 if (encap == 2)
  73.                 {
  74.                     output[count] = localCache;
  75.                     localCache = "";
  76.                     count++;
  77.                     encap = 0;
  78.                 }
  79.                 if (temp == starter) { manager = 1; }
  80.  
  81.  
  82.             }
  83.  
  84.             return output;
  85.         }
  86.  
  87.         static int CatGet(string category, string[] categories)
  88.         {
  89.             int cat = 0;
  90.  
  91.             for (int x = 0; x <= categories.Length; x++)
  92.             {
  93.                 Console.WriteLine(x + " : " + categories[x]);
  94.                 if (categories[x] == category) { cat = x; break; }
  95.             }
  96.  
  97.  
  98.  
  99.             Console.WriteLine(cat + " : " + categories[cat]);
  100.             Console.ReadLine();
  101.             return cat;
  102.         }
  103.  
  104.  
  105.  
  106.         static string[] LoadCat(int cat, string[] cache)
  107.         {
  108.             string[] output = new string[800000];
  109.             int count = 0;
  110.             string temp = "";
  111.             string separator = ",";
  112.             string encapsulator = "`";
  113.             string starter = "(";
  114.             string ender = ")";
  115.  
  116.             for (int x = 1; x <= cache.Length - 1; x++)
  117.             {
  118.                 string tempCache = cache[x];
  119.  
  120.                 for(int y = 0; y <= tempCache.Length; y++)
  121.                 {
  122.                     if (tempCache.Substring(y, 1) == ender) { x++; break; }
  123.  
  124.                     temp += tempCache.Substring(y, 1);
  125.  
  126.  
  127.  
  128.  
  129.                 }
  130.                 Console.WriteLine(count);
  131.                 count++;
  132.                 temp = "";
  133.                 Console.Clear();
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.             }
  141.  
  142.  
  143.             return output;
  144.         }
  145.  
  146.     }
  147. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement