mIRC Home    About    Download    Register    News    Help

Print Thread
#146528 05/04/06 07:36 PM
Joined: Jul 2003
Posts: 32
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Jul 2003
Posts: 32
I need to make a script that tells the Internal IP address. Has anyone made such a script, or can someone tell me where to start off?

(I don't know if this is a stupid or common question here, but "search" didn't help me. Sorry if this shouldn't be here)


KevinJr42
#146529 05/04/06 07:42 PM
Joined: May 2005
Posts: 449
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
in the editbox, type
Code:
//echo $ip


or if you want it in an alias:
Code:
alias myip {
echo $ip
}


and you'd type /myip to run the alias.

Last edited by bwr30060; 05/04/06 07:42 PM.
#146530 05/04/06 07:45 PM
Joined: Jul 2003
Posts: 32
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Jul 2003
Posts: 32
That doesn't get the internal IP address, that gets the IP reported by the server that mIRC connected to.
I'm asking because I'm connected to a router.

$ip would get me 68.9.***.***
I'm looking for something that would tell me my IP is... 192.168.0.2, for example.


KevinJr42
#146531 05/04/06 07:46 PM
Joined: May 2005
Posts: 449
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
That's odd, because it gives me 192.168.1.101.

#146532 05/04/06 07:48 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
You would have to first type
/localinfo -h
//echo -a $ip

To get your wan ip back type /localinfo -u

It has been suggested as a feature to have a $lanip identifier (or something like that)

#146533 05/04/06 07:49 PM
Joined: Feb 2006
Posts: 164
V
Vogon poet
Offline
Vogon poet
V
Joined: Feb 2006
Posts: 164
Depends on what's checked in alt + o -> Local info
If i swap some things round, it shows my network ip and other times my direct ip

#146534 05/04/06 07:57 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Found it .. it was $localip & $localhost. Well I know there has
been more but this was the first one I found when searched.[/i]

Last edited by mIRCManiac; 05/04/06 07:58 PM.
#146535 05/04/06 07:58 PM
Joined: Jul 2003
Posts: 32
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Jul 2003
Posts: 32
That worked, mostly.

But I just realized I have more than one internal IP address (because Hamachi is running - it's a VPN program if I'm using that term correctly).
So I'm getting 5.24.***.*** (my VPN IP) instead of 192.168.***.*** (my router IP).
Is there any way to make it return my other IP addresses?


KevinJr42
#146536 05/04/06 08:00 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Not that I'm aware of. frown

#146537 05/04/06 08:00 PM
Joined: Jul 2003
Posts: 32
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Jul 2003
Posts: 32
The user was only posting a suggestion, look at it again.


KevinJr42
#146538 05/04/06 08:02 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Yes I know, I searched for that after I said..

Quote:
It has been suggested as a feature to have a $lanip identifier (or something like that)


~ Edit ~
FiberOptics or whoever the COM guy is on here can
probably make something for you if it can be done.

Last edited by mIRCManiac; 05/04/06 08:03 PM.
#146539 05/04/06 08:03 PM
Joined: Jul 2003
Posts: 32
K
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Jul 2003
Posts: 32
Oh! I never knew a "$host" existed!
That helps a lot - I could just DNS it and make a script to return different DNS results...

Thanks!


KevinJr42

Link Copied to Clipboard