Now work
Now work
using System.IO; using System.Net;
private void Button1_Click(object sender, EventArgs e) { fo.RestoreDirectory = true; fo.Multiselect = false; fo.Filter = "txt files (*.txt)|*.txt"; fo.FilterIndex = 1; fo.ShowDialog(); if (fo.FileName != null) { } }
private void Button1_Click(object sender, EventArgs e) { fo.RestoreDirectory = true; fo.Multiselect = false; fo.Filter = "txt files (*.txt)|*.txt"; fo.FilterIndex = 1; fo.ShowDialog(); if (fo.FileName != null) { { while (sr.Peek != -1) { proxies.Add(sr.ReadLine()); } } } }
private void Button1_Click(object sender, EventArgs e) { fo.RestoreDirectory = true; fo.Multiselect = false; fo.Filter = "txt files (*.txt)|*.txt"; fo.FilterIndex = 1; fo.ShowDialog(); if (fo.FileName != null) { { while (sr.Peek != -1) { proxies.Add(sr.ReadLine()); } } WebProxy myProxy = default(WebProxy); foreach (string proxy in proxies) { try { HttpWebRequest r = HttpWebRequest.Create("http://www.google.com"); r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"; r.Timeout = 3000; r.Proxy = myProxy; HttpWebResponse re = r.GetResponse(); ListBox1.Items.Add("Working Proxy: " + proxy); } catch (Exception) { ListBox1.Items.Add("Unresponsive Proxy: " + proxy); } } } }
private void Button2_Click(object sender, EventArgs e) { if (ListBox1.Items.Count > 0) { fs.RestoreDirectory = true; fs.Filter = "txt files (*.txt)|*.txt"; fs.FilterIndex = 1; fs.ShowDialog(); if (!(fs.FileName == null)) { { foreach (string line in ListBox1.Items) { sw.WriteLine(line); } } } } }
private void Button3_Click(object sender, EventArgs e) { if (ListBox1.Items.Count > 0) { fs.RestoreDirectory = true; fs.Filter = "txt files (*.txt)|*.txt"; fs.FilterIndex = 1; fs.ShowDialog(); if (!(fs.FileName == null)) { { foreach (string line in ListBox1.Items) { if (line.StartsWith("Working Proxy: ")) { sw.WriteLine(line); } } } } } }
using System.IO; using System.Net; public class Form1 { private void Button1_Click(object sender, EventArgs e) { fo.RestoreDirectory = true; fo.Multiselect = false; fo.Filter = "txt files (*.txt)|*.txt"; fo.FilterIndex = 1; fo.ShowDialog(); if (fo.FileName != null) { { while (sr.Peek() != -1) { proxies.Add(sr.ReadLine()); } } WebProxy myProxy = default(WebProxy); foreach (string proxy in proxies) { try { HttpWebRequest r = HttpWebRequest.Create("http://www.google.com"); r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36"; r.Timeout = 3000; r.Proxy = myProxy; HttpWebResponse re = r.GetResponse(); ListBox1.Items.Add("Working Proxy: " + proxy); } catch (Exception) { ListBox1.Items.Add("Unresponsive Proxy: " + proxy); } } } } private void Button2_Click(object sender, EventArgs e) { if (ListBox1.Items.Count > 0) { fs.RestoreDirectory = true; fs.Filter = "txt files (*.txt)|*.txt"; fs.FilterIndex = 1; fs.ShowDialog(); if (!(fs.FileName == null)) { { foreach (string line in ListBox1.Items) { sw.WriteLine(line); } } } } } private void Button3_Click(object sender, EventArgs e) { if (ListBox1.Items.Count > 0) { fs.RestoreDirectory = true; fs.Filter = "txt files (*.txt)|*.txt"; fs.FilterIndex = 1; fs.ShowDialog(); if (!(fs.FileName == null)) { { foreach (string line in ListBox1.Items) { if (line.StartsWith("Working Proxy: ")) { sw.WriteLine(line); } } } } } } }