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.Diagnostics;
- using System.Drawing;
- using System.IO;
- using System.Linq;
- using System.Security.Policy;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsApp1
- {
- public partial class Form1 : Form
- {
- private Uri geturl;
- private string str;
- public string Url { get; private set; }
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- if (openFileDialog1.ShowDialog() == DialogResult.OK);
- {
- StreamReader streamreader = new StreamReader(openFileDialog1.FileName);
- listBox1.Items.Clear();
- while (!streamreader.EndOfStream)
- {
- listBox1.Items.Add(streamreader.ReadLine());
- }
- label1.Text = "Акаунтов:" + listBox1.Items.Count;
- }
- }
- string GetLine(string fileName, int line)
- {
- using (var sr = new StreamReader(fileName))
- {
- for (int i = 1; i < line; i++)
- sr.ReadLine();
- return sr.ReadLine();
- }
- }
- private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- }
- private void button2_Click(object sender, EventArgs e)
- {
- for (int i = 0; i < listBox1.Items.Count; i++) {
- String data = listBox1.Items[i].ToString();
- String[] mass = data.Split(';');
- String user = mass[0];
- String pass = mass[1];
- webBrowser1.ScriptErrorsSuppressed = true;
- webBrowser1.Url = new Uri("https://steamcommunity.com/openid/login?openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=checkid_setup&openid.return_to=http%3A%2F%2Fcsgo-login.pl%2Fsteamlogin.php&openid.realm=http%3A%2F%2Fcsgo-login.pl&openid.ns_sreg=http%3A%2F%2Fopenid.net%2Fextensions%2Fsreg%2F1.1&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select");
- HtmlElement us = webBrowser1.Document.GetElementById("steamAccountName");
- HtmlElement ps = webBrowser1.Document.GetElementById("steamPassword");
- us.SetAttribute("value", user);
- ps.SetAttribute("value", pass);
- webBrowser1.Document.GetElementById("login_btn_signin").InvokeMember("Click");
- webBrowser1.Url = new System.Uri("https://csgokingdom.com/open/daily", System.UriKind.Absolute);
- System.Threading.Thread.Sleep(3000);
- HtmlElementCollection classButton = webBrowser1.Document.All;
- foreach (HtmlElement element in classButton)
- {
- if (element.GetAttribute("className") == "style__controlButton___3pncb")
- {
- element.InvokeMember("click");
- break;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement