Connecting Tech Pros Worldwide Forums | Help | Site Map

how to get the IP address of a website without using DNS anything?

econobeing
Guest
 
Posts: n/a
#1: Nov 16 '05
a guy in my class made a program in VB6 where he could use the internet
because he used the IP address of a site instead of the DNS address.

i want to make my own browser now that can do that, but i dont know how to
get the IP address of a site. i found a little snippet of code that will get
a list of all the IPs of a site, but that doesn't work at my school. it used
System.Net.Dns.Resolve()

i dont know how he wrote his, but he can use links and everything.

is there a way i can get the IP address of a site without using DNS? cause
DNS is disabled at my school(i dont like saying college).

Nick Malik [Microsoft]
Guest
 
Posts: n/a
#2: Nov 16 '05

re: how to get the IP address of a website without using DNS anything?


if you open a browser and type http://www.google.com and you get the google
site, then DNS is most definitely not disabled on your network.

If you just want some IP addresses for the sake of testing, open a command
line and type: Ping www.google.com (or any other dns address). You will
get back the IP address of the site.

For the most part, you don't need to look up the ip address of a site. Just
use HTTPWebRequest to issue a request against a web site using the domain
name.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"econobeing" <econobeing@discussions.microsoft.com> wrote in message
news:6BB4B490-0C43-4BBB-AA50-4A5E4D396131@microsoft.com...[color=blue]
> a guy in my class made a program in VB6 where he could use the internet
> because he used the IP address of a site instead of the DNS address.
>
> i want to make my own browser now that can do that, but i dont know how to
> get the IP address of a site. i found a little snippet of code that will[/color]
get[color=blue]
> a list of all the IPs of a site, but that doesn't work at my school. it[/color]
used[color=blue]
> System.Net.Dns.Resolve()
>
> i dont know how he wrote his, but he can use links and everything.
>
> is there a way i can get the IP address of a site without using DNS? cause
> DNS is disabled at my school(i dont like saying college).[/color]


econobeing
Guest
 
Posts: n/a
#3: Nov 16 '05

re: how to get the IP address of a website without using DNS anything?


well i took a look at his source today, and from what i can understand. he
uses the Ping thing at DNSstuff.com, which he has the IP address to it
hardcoded into his program. i saw that it took the []'s off of the IP address
it gets back, but how it gets the IP address of of the web page is beyond me.
or how it automatically goes there and uses that function too.

"Nick Malik [Microsoft]" wrote:
[color=blue]
> if you open a browser and type http://www.google.com and you get the google
> site, then DNS is most definitely not disabled on your network.
>
> If you just want some IP addresses for the sake of testing, open a command
> line and type: Ping www.google.com (or any other dns address). You will
> get back the IP address of the site.
>
> For the most part, you don't need to look up the ip address of a site. Just
> use HTTPWebRequest to issue a request against a web site using the domain
> name.
>
> --
> --- Nick Malik [Microsoft]
> MCSD, CFPS, Certified Scrummaster
> http://blogs.msdn.com/nickmalik
>
> Disclaimer: Opinions expressed in this forum are my own, and not
> representative of my employer.
> I do not answer questions on behalf of my employer. I'm just a
> programmer helping programmers.[/color]
Nick Malik [Microsoft]
Guest
 
Posts: n/a
#4: Nov 16 '05

re: how to get the IP address of a website without using DNS anything?


so he takes the name of the web site, calls Ping at DNSstuff.com, gets the
IP address, and then simply sends a web request to
http://64.233.161.147

this is the exact same thing as typing http://www.google.com into your
browser.

The web site itself normally doesn't care what the DNS name for the site it.
It would only see it if it looked for it, and that would normally not be
good practice anyway, since the owner of the web site may want to change the
name without changing the web programming... so simply typing
http://aaa.bbb.ccc.ddd is usually sufficient to find your way around the
web. That said, any links OFF of that web site will be broken, so you won't
be able to use search engines at all.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"econobeing" <econobeing@discussions.microsoft.com> wrote in message
news:BB5465BA-DF66-41BA-9D9C-1576555EA7E9@microsoft.com...[color=blue]
> well i took a look at his source today, and from what i can understand. he
> uses the Ping thing at DNSstuff.com, which he has the IP address to it
> hardcoded into his program. i saw that it took the []'s off of the IP[/color]
address[color=blue]
> it gets back, but how it gets the IP address of of the web page is beyond[/color]
me.[color=blue]
> or how it automatically goes there and uses that function too.
>
> "Nick Malik [Microsoft]" wrote:
>[color=green]
> > if you open a browser and type http://www.google.com and you get the[/color][/color]
google[color=blue][color=green]
> > site, then DNS is most definitely not disabled on your network.
> >
> > If you just want some IP addresses for the sake of testing, open a[/color][/color]
command[color=blue][color=green]
> > line and type: Ping www.google.com (or any other dns address). You[/color][/color]
will[color=blue][color=green]
> > get back the IP address of the site.
> >
> > For the most part, you don't need to look up the ip address of a site.[/color][/color]
Just[color=blue][color=green]
> > use HTTPWebRequest to issue a request against a web site using the[/color][/color]
domain[color=blue][color=green]
> > name.
> >
> > --
> > --- Nick Malik [Microsoft]
> > MCSD, CFPS, Certified Scrummaster
> > http://blogs.msdn.com/nickmalik
> >
> > Disclaimer: Opinions expressed in this forum are my own, and not
> > representative of my employer.
> > I do not answer questions on behalf of my employer. I'm just a
> > programmer helping programmers.[/color][/color]


econobeing
Guest
 
Posts: n/a
#5: Nov 16 '05

re: how to get the IP address of a website without using DNS anything?


well he can use search engines in his.

i'm no good with VB, but heres the link to it, it has all the source code
and everything to it:

http://www.planet-source-code.com/vb...57949&lngWId=1

i couln't understand it, but i've seen it in action and it works the way i
want mine to.

"Nick Malik [Microsoft]" wrote:
[color=blue]
> so he takes the name of the web site, calls Ping at DNSstuff.com, gets the
> IP address, and then simply sends a web request to
> http://64.233.161.147
>
> this is the exact same thing as typing http://www.google.com into your
> browser.
>
> The web site itself normally doesn't care what the DNS name for the site it.
> It would only see it if it looked for it, and that would normally not be
> good practice anyway, since the owner of the web site may want to change the
> name without changing the web programming... so simply typing
> http://aaa.bbb.ccc.ddd is usually sufficient to find your way around the
> web. That said, any links OFF of that web site will be broken, so you won't
> be able to use search engines at all.
>
> --
> --- Nick Malik [Microsoft]
> MCSD, CFPS, Certified Scrummaster
> http://blogs.msdn.com/nickmalik
>
> Disclaimer: Opinions expressed in this forum are my own, and not
> representative of my employer.
> I do not answer questions on behalf of my employer. I'm just a
> programmer helping programmers.
> --
> "econobeing" <econobeing@discussions.microsoft.com> wrote in message
> news:BB5465BA-DF66-41BA-9D9C-1576555EA7E9@microsoft.com...[color=green]
> > well i took a look at his source today, and from what i can understand. he
> > uses the Ping thing at DNSstuff.com, which he has the IP address to it
> > hardcoded into his program. i saw that it took the []'s off of the IP[/color]
> address[color=green]
> > it gets back, but how it gets the IP address of of the web page is beyond[/color]
> me.[color=green]
> > or how it automatically goes there and uses that function too.
> >
> > "Nick Malik [Microsoft]" wrote:
> >[color=darkred]
> > > if you open a browser and type http://www.google.com and you get the[/color][/color]
> google[color=green][color=darkred]
> > > site, then DNS is most definitely not disabled on your network.
> > >
> > > If you just want some IP addresses for the sake of testing, open a[/color][/color]
> command[color=green][color=darkred]
> > > line and type: Ping www.google.com (or any other dns address). You[/color][/color]
> will[color=green][color=darkred]
> > > get back the IP address of the site.
> > >
> > > For the most part, you don't need to look up the ip address of a site.[/color][/color]
> Just[color=green][color=darkred]
> > > use HTTPWebRequest to issue a request against a web site using the[/color][/color]
> domain[color=green][color=darkred]
> > > name.
> > >
> > > --
> > > --- Nick Malik [Microsoft]
> > > MCSD, CFPS, Certified Scrummaster
> > > http://blogs.msdn.com/nickmalik
> > >
> > > Disclaimer: Opinions expressed in this forum are my own, and not
> > > representative of my employer.
> > > I do not answer questions on behalf of my employer. I'm just a
> > > programmer helping programmers.[/color][/color]
>
>
>[/color]
Nick Malik [Microsoft]
Guest
 
Posts: n/a
#6: Nov 16 '05

re: how to get the IP address of a website without using DNS anything?


Dude. You're wasting my time.

You want to "do the same thing" as code that has been released into open
source. DOWNLOAD IT

What do you want me to do, read it and explain it to you?

If you have a question about a snippet of code, post it on the web and we
can help you with it.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"econobeing" <econobeing@discussions.microsoft.com> wrote in message
news:E4B0A52B-99CD-43D1-A55E-2BD38B10790A@microsoft.com...[color=blue]
> well he can use search engines in his.
>
> i'm no good with VB, but heres the link to it, it has all the source code
> and everything to it:
>
>[/color]
http://www.planet-source-code.com/vb...57949&lngWId=1[color=blue]
>
> i couln't understand it, but i've seen it in action and it works the way i
> want mine to.
>
> "Nick Malik [Microsoft]" wrote:
>[color=green]
> > so he takes the name of the web site, calls Ping at DNSstuff.com, gets[/color][/color]
the[color=blue][color=green]
> > IP address, and then simply sends a web request to
> > http://64.233.161.147
> >
> > this is the exact same thing as typing http://www.google.com into your
> > browser.
> >
> > The web site itself normally doesn't care what the DNS name for the site[/color][/color]
it.[color=blue][color=green]
> > It would only see it if it looked for it, and that would normally not be
> > good practice anyway, since the owner of the web site may want to change[/color][/color]
the[color=blue][color=green]
> > name without changing the web programming... so simply typing
> > http://aaa.bbb.ccc.ddd is usually sufficient to find your way around the
> > web. That said, any links OFF of that web site will be broken, so you[/color][/color]
won't[color=blue][color=green]
> > be able to use search engines at all.
> >
> > --
> > --- Nick Malik [Microsoft]
> > MCSD, CFPS, Certified Scrummaster
> > http://blogs.msdn.com/nickmalik
> >
> > Disclaimer: Opinions expressed in this forum are my own, and not
> > representative of my employer.
> > I do not answer questions on behalf of my employer. I'm just a
> > programmer helping programmers.
> > --
> > "econobeing" <econobeing@discussions.microsoft.com> wrote in message
> > news:BB5465BA-DF66-41BA-9D9C-1576555EA7E9@microsoft.com...[color=darkred]
> > > well i took a look at his source today, and from what i can[/color][/color][/color]
understand. he[color=blue][color=green][color=darkred]
> > > uses the Ping thing at DNSstuff.com, which he has the IP address to it
> > > hardcoded into his program. i saw that it took the []'s off of the IP[/color]
> > address[color=darkred]
> > > it gets back, but how it gets the IP address of of the web page is[/color][/color][/color]
beyond[color=blue][color=green]
> > me.[color=darkred]
> > > or how it automatically goes there and uses that function too.
> > >
> > > "Nick Malik [Microsoft]" wrote:
> > >
> > > > if you open a browser and type http://www.google.com and you get the[/color]
> > google[color=darkred]
> > > > site, then DNS is most definitely not disabled on your network.
> > > >
> > > > If you just want some IP addresses for the sake of testing, open a[/color]
> > command[color=darkred]
> > > > line and type: Ping www.google.com (or any other dns address). You[/color]
> > will[color=darkred]
> > > > get back the IP address of the site.
> > > >
> > > > For the most part, you don't need to look up the ip address of a[/color][/color][/color]
site.[color=blue][color=green]
> > Just[color=darkred]
> > > > use HTTPWebRequest to issue a request against a web site using the[/color]
> > domain[color=darkred]
> > > > name.
> > > >
> > > > --
> > > > --- Nick Malik [Microsoft]
> > > > MCSD, CFPS, Certified Scrummaster
> > > > http://blogs.msdn.com/nickmalik
> > > >
> > > > Disclaimer: Opinions expressed in this forum are my own, and not
> > > > representative of my employer.
> > > > I do not answer questions on behalf of my employer. I'm just a
> > > > programmer helping programmers.[/color]
> >
> >
> >[/color][/color]


Joerg Jooss
Guest
 
Posts: n/a
#7: Nov 16 '05

re: how to get the IP address of a website without using DNS anything?


econobeing wrote:
[color=blue]
> a guy in my class made a program in VB6 where he could use the
> internet because he used the IP address of a site instead of the DNS
> address.
>
> i want to make my own browser now that can do that, but i dont know
> how to get the IP address of a site. i found a little snippet of code
> that will get a list of all the IPs of a site, but that doesn't work
> at my school. it used System.Net.Dns.Resolve()
>
> i dont know how he wrote his, but he can use links and everything.
>
> is there a way i can get the IP address of a site without using DNS?
> cause DNS is disabled at my school(i dont like saying college).[/color]

DNS *disabled*? I bet not... or is everybody that good at memorizing IP
adresses?

SCNR,

--
http://www.joergjooss.de
mailto:news-reply@joergjooss.de
Cor Ligthert
Guest
 
Posts: n/a
#8: Nov 16 '05

re: how to get the IP address of a website without using DNS anything?


Econobeing,

Here is a complete snippet as Nick describes in C#

\\\
Process p = new Process();
ProcessStartInfo pi = new ProcessStartInfo();
pi.UseShellExecute = false;
pi.RedirectStandardOutput = true;
pi.Arguments = "www.google.com";
pi.WorkingDirectory = "C:\\windows\\system32";
//this for nt* computers
pi.FileName = "ping";
p.StartInfo = pi;
p.Start();
System.IO.StreamReader sr = p.StandardOutput;
System.Text.StringBuilder sb = new System.Text.StringBuilder("");
int input = sr.Read();
while (input != -1)
{
sb.Append((char) input);
input = sr.Read();
}
MessageBox.Show(sb.ToString());
///

However don't expect too much from it on your school that you can than go
around the firewall.

The ping command is one of the first commands that is catched by firewalls.
While it can also be that your school has a complete private network, what
means that they don't use the external ip conventions however have there own
which is renumbered by routering and you are only behind a proxy.

You see that direct when your computer at school in the network has an IP
number that not start with 10, 150 or 192.168 although even than it says
nothing.

(In past every computer had its own IP address however than it is direct
connected to the global DNS).

I hope that this give some more understanding now.

Cor



Closed Thread


Similar C# / C Sharp bytes