Buongiorno,
volevo recuperare tutti gli alias dei siti web hostati su un medesimo ip o classe ip.
Come ragionamento simile a questo tool:
http://www.yougetsignal.com/tools/web-sites-on-web-server/
Ecco il codice che ho fatto ma per ora non mi estraee l'elenco dei siti..
string strHost;
Console.Write("Input host : "); //Iput web host name as string
IPHostEntry IPHost = Dns.Resolve(textBox1.Text); // though Dns to get IP host
Console.WriteLine(IPHost.HostName); // Output name of web host
IPAddress[] address = IPHost.AddressList; // get list of IP address
Console.WriteLine("List IP {0} :", IPHost.HostName);
for (int i = 0; i < address.Length; i++) // output list of IP address
label2.Text +=address[i];
//test
try
{
IPHostEntry iphe = Dns.Resolve("www.maiuscolo.net");
foreach (IPAddress addr in iphe.AddressList)
{
label3.Text += ("AddressFamily: " + addr.AddressFamily.ToString());
label4.Text += ("Address: " + addr.ToString());
}
}
Mi potete fornire un conisglio, grazie
Modificato da maltra il 03 marzo 2011 16.42 -