using System.Net;
using System.Text.RegularExpressions;
....
Html-Source auslesen
public static string ReadSourceCode()
{
WebClient wClient = new WebClient();
string strSource = wClient.DownloadString("http://www.proxy-listen.de/Proxy/Proxyliste.html");
return strSource;
}
IP's raus phishen
public static string SearchIPs(string strSource)
{
string pattern = @"\d\d?\d?\.\d\d?\d?\.\d\d?\d?\.\d\d?\d?\:\d\d?\d?\d?";
Regex regex = new Regex(pattern);
Match match = regex.Match(strSource);
string trololo = Convert.ToString(match);
return trololo;
}
Ausgeben.
private void button1_Click(object sender, EventArgs e)
{
string sSource = ReadSource.ReadSourceCode();
textBox1.Text = SearchIP.SearchIPs(sSource);
}