Re: Does anybody know a fast method to get out myIP?
Re: Does anybody know a fast method to get out myIP?
- Subject: Re: Does anybody know a fast method to get out myIP?
- From: Bernardo Hoehl <email@hidden>
- Date: Thu, 1 Dec 2005 16:16:04 -0200
Simon,
That works great.
But, what if I want to try to get a "reverse DNS lookup" on the
resulting IP number?
Is there any chance to pass it to a "do shell script" and try to get a
result?
Thanks,
Bernardo Höhl
Rio de Janeiro, Brazil
===================
On 01 Dec, 2005, at 2:45 PM, Simon Topliss wrote:
This will return all the ip addresses your mac is currently using...
paragraphs of (do shell script "/sbin/ifconfig -au | grep broadcast |
awk '{print$2}'")
The first one will be en0 - your ethernet address and any subsequent
items in the list are other ip's that you are using - typically en1
for airport.
Simon
On 1 Dec 2005, at 16:20, demski wrote:
Umm,
maybe I was to lousy discribing the issue:
I thought of getting my internal IP on local net...
(something like 192.168.1...)
Maybe there is some .plist or something like that to take it from?
gruss, demski
Die Anderen · digitale mediendienstleistungen
Bellealliancestraße 58 b · 20259 Hamburg
fon: 040 41 26 61 81
fax: 040 41 26 61 83
email@hidden
Am 01.12.2005 um 17:17 schrieb Emmanuel:
At 9:04 AM -0600 12/1/05, Allan McCoy wrote:
<mailto:email@hidden>applescript-
email@hidden on Thursday, December 1, 2005 at 5:50 AM
-0600 wrote:
Does anybody know a fast method to get out myIP?
on the local machine:
set hostName to do shell script "hostname"
set myIP to do shell script "host " & hostname
set myIP to last word of myIP
or in a single line:
set myIP to last word of (do shell script "host " & (do shell
script "hostname"))
This won't work in all cases. OMM, do shell script "hostname"
returns "emmanuel.local", that "host" doesn't resolve.
I must confess that I know no other way of getting your IP than
connecting to whatismyip.com or some other equivalent service.
Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden