Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////
- ///Proxy Scraper in c# made by Bo\\\
- ////////////////////////////////////
- //This code is for getting the proxies:
- WebClient downloader = new WebClient;
- downloader.Encoding = Encoding.UTF8;
- string mystring = downloader.DownloadString("" + TextBox1.Text);
- string myregex = "\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b:\\d{2,5}";
- string source = mystring;
- MatchCollection findme = Regex.Matches(source, myregex);
- foreach (Match mymatch in findme)
- {
- ListBox1.Items.Add(mymatch);
- }
- MsgBox("You scraped total of " + ListBox1.Items.Count.ToString + " proxies!");
- }
- //this code is to save the proxies
- SaveFileDialog SetSave = new SaveFileDialog;
- int i;
- SetSave.Title = "Save SET.txt";
- SetSave.Filter = "SET.txt File (*.txt)|*.txt";
- if (SetSave.ShowDialog == Windows.Forms.DialogResult.OK)
- {
- IO.StreamWriter s = new IO.StreamWriter(SetSave.FileName, true);
- for (i = 0; i <= ListBox1.Items.Count - 1; i++)
- {
- s.WriteLine(ListBox1.Items.Item(i));
- }
- s.Close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement