Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Threading;
- using System.Windows.Forms;
- using System.Net;
- using System.IO;
- using System.Diagnostics;
- using OpenQA.Selenium;
- using OpenQA.Selenium.Chrome;
- using OpenQA.Selenium.Firefox;
- namespace VkReg
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- string url = "https://x-autostyle.com/check.php";
- var webClient = new WebClient();
- var response = webClient.DownloadString(url);
- if (response == "17032017")
- {
- }
- else
- {
- System.Windows.Forms.Application.Exit();
- }
- }
- private void register()
- {
- Connect();
- System.Threading.Thread.Sleep(5000);
- var internet = CheckForInternetConnection();
- while (internet == false)
- {
- System.Threading.Thread.Sleep(1000);
- internet = CheckForInternetConnection();
- }
- ChromeOptions options = new ChromeOptions();
- options.AddArguments("start-maximized");
- IWebDriver chrome = new ChromeDriver(options);
- bool IsElementPresent(By by)
- {
- try
- {
- chrome.FindElement(by);
- return true;
- }
- catch (NoSuchElementException)
- {
- return false;
- }
- }
- string url = "http://bysim.ru/api?api_key=eff08d0873abe7e01a5fd2511fd80315&action=getNumber&service=OTH";
- var webClient = new WebClient();
- var response = webClient.DownloadString(url);
- var number = response.Split(':')[2];
- richTextBox1.AppendText(response);
- string[] lastnames = {
- "Ковалёва",
- "Ильина",
- "Гусева",
- "Титова",
- "Кузьмина",
- "Кудрявцева",
- "Баранова",
- "Куликова",
- "Алексеева",
- "Степанова",
- "Яковалева",
- "Сорокина",
- "Сергеева",
- "Романова",
- "Захарова",
- "Борисова",
- "Королева",
- "Герасимова",
- "Пономарева",
- "Григорьева",
- "Лазарева",
- "Медведева",
- "Ершова",
- "Никитина",
- "Соболева",
- "Рябова",
- "Полякова",
- "Цветкова",
- "Данилова",
- "Жукова",
- "Фролова",
- "Журавлева",
- "Николаева",
- "Путина",
- "Молчанова",
- "Крылова",
- "Максимова",
- "Сидорова",
- "Осипова",
- "Белоусова",
- "Федотова",
- "Дорофеева",
- "Егорова",
- "Панина",
- "Матвеева",
- "Боброва",
- "Дмитриева",
- "Калинина",
- "Анисимова",
- "Петухова",
- "Пугачева",
- "Антонова",
- "Тимофеева",
- "Никифорова",
- "Веселова",
- "Филиппова",
- "Романова",
- "Маркова",
- "Большакова",
- "Суханова",
- "Миронова",
- "Александрова",
- "Коновалова",
- "Шестакова",
- "Казакова",
- "Ефимова",
- "Денисова",
- "Громова",
- "Фомина",
- "Андреева",
- "Давыдова",
- "Мельникова",
- "Щербакова",
- "Блинова",
- "Колесникова",
- "Иванова",
- "Смирнова",
- "Кузнецова",
- "Попова",
- "Соколова",
- "Лебедева",
- "Козлова",
- "Новикова",
- "Морозова",
- "Петрова",
- "Волкова",
- "Соловаьева",
- "Васильева",
- "Зайцева",
- "Павлова",
- "Семенова",
- "Голубева",
- "Виноградова",
- "Богданова",
- "Воробьева",
- "Федорова",
- "Михайлова",
- "Беляева",
- "Тарасова",
- "Белова",
- "Комарова",
- "Орлова",
- "Киселева",
- "Макарова",
- "Андреева"};
- string[] firstnames = {
- "Александра",
- "Саша",
- "Сашенька",
- "Юлия",
- "Юля",
- "Юльчик",
- "Анна",
- "Аня",
- "Анечка",
- "Мария",
- "Маша",
- "Машенька",
- "Эля",
- "Сюзанна",
- "Сюзи",
- "Ирина",
- "Ира",
- "Ирочка",
- "Василиса",
- "Виолетта",
- "Настя",
- "Анастасия",
- "Настенька",
- "Наташа",
- "Наталья",
- "Ната",
- "Полина",
- "Поля",
- "Полиночка",
- "Таисия",
- "Тая",
- "Ольга",
- "Оля",
- "Афина",
- "Алина",
- "Дарья",
- "Даша",
- "Варвара",
- "Татьяна",
- "Таня",
- "Вера",
- "Лиза",
- "Елизавета",
- "Алина",
- "Зоя",
- "Кристина",
- "Диана"};
- string[] month = { "Января", "Февраля", "Марта", "Апреля", "Мая", "Июня", "Июля", "Августа", "Сентября", "Октября", "Ноября", "Декабря" };
- var firstlast = firstnames[new Random().Next(0, firstnames.Length)] + " " + lastnames[new Random().Next(0, lastnames.Length)];
- //var username = Transliteration.Front(firstlast.Replace(' ', '_'));
- System.Drawing.Size size = new System.Drawing.Size(SystemInformation.WorkingArea.Width, SystemInformation.WorkingArea.Height);
- //chrome.Manage().Window.Size = size;
- chrome.Url = "http://vk.com";
- chrome.Manage();
- var password = new Random().Next(100000000, 999999999);
- // username = username.ToLower() + new Random().Next(1980, 1999);
- chrome.FindElement(By.Id("ij_first_name")).SendKeys(firstnames[new Random().Next(0, firstnames.Length)]);
- chrome.FindElement(By.Id("ij_last_name")).SendKeys(lastnames[new Random().Next(0, lastnames.Length)]);
- chrome.FindElement(By.Id("dropdown1")).Click();
- chrome.FindElement(By.XPath("//ul[contains(@id, 'list_options_container_1')]/li[text() =" + new Random().Next(1, 30) + "]")).Click();
- chrome.FindElement(By.Id("dropdown2")).Click();
- chrome.FindElement(By.XPath("//ul[contains(@id, 'list_options_container_2')]/li[text() = '" + month[new Random().Next(0, month.Length)] + "']")).Click();
- chrome.FindElement(By.Id("dropdown3")).Click();
- chrome.FindElement(By.XPath("//ul[contains(@id, 'list_options_container_3')]/li[text() = " + new Random().Next(1987, 1998) + "]")).Click();
- System.Threading.Thread.Sleep(500);
- chrome.FindElement(By.Id("ij_submit")).Click();
- while (chrome.Url != "https://vk.com/join?act=finish")
- {
- System.Threading.Thread.Sleep(100);
- }
- System.Threading.Thread.Sleep(1000);
- chrome.FindElement(By.Id("join_phone")).Click();
- number = number.Replace("+7", "");
- chrome.FindElement(By.Id("join_phone")).SendKeys(number);
- System.Threading.Thread.Sleep(500);
- chrome.FindElement(By.Id("join_send_phone")).Click();
- System.Threading.Thread.Sleep(2500);
- if (IsElementPresent(By.ClassName("error")))
- {
- chrome.Dispose();
- register();
- }
- else
- {
- //do if does not exists
- }
- var code = "NO";
- while (code == "NO")
- {
- code = GetCode(response.Split(':')[1]);
- System.Threading.Thread.Sleep(2500);
- }
- chrome.FindElement(By.Id("join_code")).SendKeys(code);
- chrome.FindElement(By.Id("join_send_code")).Click();
- System.Threading.Thread.Sleep(3000);
- chrome.FindElement(By.Id("join_pass")).SendKeys(password.ToString());
- chrome.FindElement(By.Id("join_send_pass")).Click();
- richTextBox1.AppendText(number + ":" + password.ToString());
- while (chrome.Url != "https://vk.com/feed")
- {
- System.Threading.Thread.Sleep(100);
- }
- System.Threading.Thread.Sleep(1000);
- chrome.Navigate().GoToUrl("https://vk.com/id0");
- System.Threading.Thread.Sleep(3000);
- string id = chrome.Url.ToString();
- id = id.Replace("https://vk.com/id", "");
- Save("+7" + number + ":" + password + ";" + id);
- // chrome.FindElement(By.Name("fullName")).SendKeys(firstlast);
- // chrome.FindElement(By.Name("password")).SendKeys(password.ToString());
- System.Threading.Thread.Sleep(15000);
- chrome.Quit();
- System.Threading.Thread.Sleep(3000);
- register();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- Thread myThread2 = new Thread(register);
- myThread2.Start(); //запускаем поток
- }
- private void richTextBox1_TextChanged(object sender, EventArgs e)
- {
- }
- public string GetCode(string order)
- {
- string url = "http://bysim.ru/api?api_key=eff08d0873abe7e01a5fd2511fd80315&action=getStatus&id=" + order;
- var webClient = new WebClient();
- webClient.DownloadString(url);
- var response = webClient.DownloadString(url);
- if (response == "STATUS_WAIT_CODE")
- {
- return "NO";
- }
- else
- {
- if (response.Split(':')[1] == "VK")
- {
- var number = response.Split(':')[2];
- return number;
- }
- else
- {
- var number = response.Split(':')[1];
- return number;
- }
- }
- }
- private static void Save(string data)
- {
- var path = "C:/Instagram/2.txt";
- StreamWriter writer = new StreamWriter(path, true, Encoding.GetEncoding("windows-1251"));
- writer.Write(data + Environment.NewLine);
- writer.Close();
- }
- public static bool CheckForInternetConnection()
- {
- try
- {
- using (var client = new WebClient())
- {
- using (client.OpenRead("http://clients3.google.com/generate_204"))
- {
- return true;
- }
- }
- }
- catch
- {
- return false;
- }
- }
- private void Connect()
- {
- const string strCmdText = "/C rasdial /d&&ping -n 3 127.0.0.1 > nul&&rasdial \"MTS-Internet\" /callback:*99#";
- Process.Start("CMD.exe", strCmdText);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement