• Welcome to Valhalla Legends Archive.
 

Getting my own IPAddress

Started by FuZe, September 18, 2003, 05:09 PM

Previous topic - Next topic

FuZe

Language: VB6

How would I obtain my real IP address that my isp gives me.  I can only get my fake lan ip address, but i'm not sure how to get the real one.  Thx

Banana fanna fo fanna

Will need to contact a third party server. I suggest connecting via CHAT to battle.net and it will give you your IP address.

iago

I'm sure there's an easier way than that.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Grok

Since you're using Visual Basic, I will assume you mean using some edition of Microsoft Windows.

The IP is bound to a network interface.  Using the WIN32 API, you can enumerate network adapters.  Each enumeration returns a structure containing information.  This is enough help to get you started.

Let us know what you come up with!

Camel

Grok, that wont even begin to help him unless he is connected directly to a WAN interface, which I sincerely doubt based on his post.

drivehappy

Quote from: FuZe- on September 18, 2003, 05:09 PM
Language: VB6

How would I obtain my real IP address that my isp gives me.  I can only get my fake lan ip address, but i'm not sure how to get the real one.  Thx

The easiest way would be to find a site that determines your external IP address. Use the INET OCX to download the page and parse the IP out of the data.

iago

My ISP used to make me use a proxy for port 80, so it would be wrong.

Good site is www.network-tools.com
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


CupHead

The class I wrote to do this connected to http://www.whatismyip.com and parsed the HTML to find the IP.  Even enumerating the local IP addresses won't give you the WAN address if you're behind a router or two.

Banana fanna fo fanna

what the fuck, why do people ignore my posts all the time?

j0k3r

Quote from: FuZe- on September 18, 2003, 05:09 PM
Language: VB6

How would I obtain my real IP address that my isp gives me.  I can only get my fake lan ip address, but i'm not sure how to get the real one.  Thx
I think if you go to 'Local Area Network' in the D2 login page, it will give you your correct IP... If not then Storm had a good idea. I'm not sure how accurate it is though because I can't even host games on war3 due to my firewall/router.

Storm -- maybe he tried it and it didn't work so instead of flaming you he said nothing... or maybe he hasn't checked the forum again... who knows.
QuoteAnyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin
John Vo

Adron

Quote from: St0rm.iD on September 19, 2003, 05:53 AM
what the fuck, why do people ignore my posts all the time?

Probably because Grok posted after you and bears much authority and hardly ever makes a mistake, so when he now might have made one, everyone jumped at the chance to bash him.

Grok

Quote from: Adron on September 19, 2003, 07:18 AM
Quote from: St0rm.iD on September 19, 2003, 05:53 AM
what the fuck, why do people ignore my posts all the time?

Probably because Grok posted after you and bears much authority and hardly ever makes a mistake, so when he now might have made one, everyone jumped at the chance to bash him.

St0rm, heh, it's been observed dozens of times that people ignore your completely legitimate and workable solutions.

Adron, I make plenty of mistakes.  But you're correct, there are a number of insecure people here who are more comfortable being critics than being creators.  Rather than come up with solutions themselves, and let other people criticize them, they bash people who are trying to offer help.  Camel is a primary example of such a person.

Camel

#12
Quote from: Grok on September 19, 2003, 10:29 AMAdron, I make plenty of mistakes.  But you're correct, there are a number of insecure people here who are more comfortable being critics than being creators.  Rather than come up with solutions themselves, and let other people criticize them, they bash people who are trying to offer help.  Camel is a primary example of such a person.
Interesting view. My intent, however, was to save him some agony.
[edit] I didn't give an answer because St0rm already did.

DarkVirus

I guess I'm confused... Are you looking for some type of code to write in VB 6.0 or VB .Net to reveal your real IP or are you just trying to generally find your ISP given IP...  

Also are you behind a router of some sort or are you hooked directly to the net via modem. If that's the case there are multiple ways of finding your IP given to you by your ISP... If your looking for your LAN IP then I suggest the normal methods either in code using winsock or dsSocket32 or you could just go to Command Prompt or DOS and type  ipconfig /all  

If you are looking for your ISP given IP then I suggest looking at your router settings... If you don't have access to that type of information (assuming your even behind a router) then I can't help you in terms of coding because I'm not at my computer but on my g/f's comp.

So again, what exactly are you trying to do in terms of the questions asked above?
To restrict ones ability to learn based on current surroundings means to never learn anything at all. - DarkVirus

iago

Quote from: DarkVirus on September 20, 2003, 07:42 PM
I guess I'm confused... Are you looking for some type of code to write in VB 6.0 or VB .Net to reveal your real IP or are you just trying to generally find your ISP given IP...  

Also are you behind a router of some sort or are you hooked directly to the net via modem. If that's the case there are multiple ways of finding your IP given to you by your ISP... If your looking for your LAN IP then I suggest the normal methods either in code using winsock or dsSocket32 or you could just go to Command Prompt or DOS and type  ipconfig /all  

If you are looking for your ISP given IP then I suggest looking at your router settings... If you don't have access to that type of information (assuming your even behind a router) then I can't help you in terms of coding because I'm not at my computer but on my g/f's comp.

So again, what exactly are you trying to do in terms of the questions asked above?

He's using vb6, so ipconfig /all wouldn't be too useful, unless he parses the information from there (I don't know how to use a shell like that, though).   I get the impression that he isn't behind a router, but that he has multiple network connections.  

It might be useful to ask, what type of internet connection do you have?  If it's DSL, it's harder since there's a LAN connection to your modem, then another connection from the modem to the internet.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*