Advertisement
Guest User

Untitled

a guest
Feb 5th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.59 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Diagnostics;
  6. using System.Drawing;
  7. using System.IO;
  8. using System.Linq;
  9. using System.Security.Policy;
  10. using System.Text;
  11. using System.Threading;
  12. using System.Threading.Tasks;
  13. using System.Windows.Forms;
  14.  
  15. namespace WindowsFormsApp1
  16. {
  17. public partial class Form1 : Form
  18. {
  19. private Uri geturl;
  20. private string str;
  21.  
  22. public string Url { get; private set; }
  23.  
  24. public Form1()
  25. {
  26. InitializeComponent();
  27. }
  28.  
  29. private void button1_Click(object sender, EventArgs e)
  30. {
  31. if (openFileDialog1.ShowDialog() == DialogResult.OK);
  32. {
  33. StreamReader streamreader = new StreamReader(openFileDialog1.FileName);
  34. listBox1.Items.Clear();
  35. while (!streamreader.EndOfStream)
  36. {
  37. listBox1.Items.Add(streamreader.ReadLine());
  38. }
  39. label1.Text = "Акаунтов:" + listBox1.Items.Count;
  40. }
  41. }
  42.  
  43. string GetLine(string fileName, int line)
  44. {
  45. using (var sr = new StreamReader(fileName))
  46. {
  47. for (int i = 1; i < line; i++)
  48. sr.ReadLine();
  49. return sr.ReadLine();
  50. }
  51. }
  52. private void button2_Click(object sender, EventArgs e)
  53. {
  54. for (int i = 0; i < listBox1.Items.Count; i++) {
  55. String data = listBox1.Items[i].ToString();
  56. String[] mass = data.Split(';');
  57. String user = mass[0];
  58. String pass = mass[1];
  59.  
  60.  
  61. webBrowser1.ScriptErrorsSuppressed = true;
  62. webBrowser1.Url = new Uri("https://steamcommunity.com/login/home/?goto=");
  63. }
  64. }
  65.  
  66. private void button4_Click(object sender, EventArgs e)
  67. {
  68. webBrowser1.Document.GetElementById("steamAccountName").InnerText = "HYISOS";
  69. webBrowser1.Document.GetElementById("steamPassword").InnerText = "HYISOS";
  70. System.Threading.Thread.Sleep(1000);
  71. foreach (HtmlElement el in webBrowser1.Document.GetElementsByTagName("input"))
  72. {
  73. if (el.GetAttribute("value") == "Войти")
  74. {
  75. el.InvokeMember("Click");
  76. }
  77. }
  78. System.Threading.Thread.Sleep(1000);
  79. webBrowser1.Url = new Uri("https://csgokingdom.com/cases");
  80. }
  81. }
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement