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

G

Guest

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).
 
N

Nick Malik [Microsoft]

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.
 
G

Guest

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.
 
N

Nick Malik [Microsoft]

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 said:
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 said:
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.
 
G

Guest

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/scripts/ShowCode.asp?txtCodeId=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 said:
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 said:
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 said:
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.
 
N

Nick Malik [Microsoft]

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 said:
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/scripts/ShowCode.asp?txtCodeId=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 said:
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 said:
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.

:

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.
 
J

Joerg Jooss

econobeing said:
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).

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

SCNR,
 
C

Cor Ligthert

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top