Workflow Automator: Translate This

Apple’s Automator is a great to for scripting those activities that you find yourself doing over an over. I needed a way to translate a selection of text. I created this simple Automator workflow to grab the selected text and send it to Google’s Translation service. This flow is for English but you can edit the script to change the target language to anything you want.

Here are the steps in the workflow if you want to roll your own.

  1. Run AppleScript
    on run {input, parameters}
    copy "" & input to urlx
    return urlx
    end run
  2. Display Webpages

That’s the entire script. Enjoy.

Installation: Download Double-click on the zip file to open it up. Copy the “Translate This” workflow file to your ~/Library/Services folder. The ~/ is your home folder. You can get there from your “Go” menu.

It would be nice if the script could grab the page, find the translated DIV and then just display an alert with the translated text. That would save having to open a new Safari connection. This is just a first pass to make it useful.

The Lost Symbol IP Address Mystery

In the Dan Brown novel The Lost Symbol a character finds an IP address but is confounded trying to figure out whose IP address it is. She enlists the help of a hacker friend who is also confounded but claims to be able to hack it in no time. Once again Dan Brown fails at technology. Tracking down who owns an IP address is a very simple matter. The IP address system is based on a model of fractal ownership. The ownership of all IP addresses can be traced using a simple whois command. Let’s start with something simple. Let’s find out who owns the IP address for the CIA’s web site.

Note, all of these examples have been done on a Mac using the The should also work fine on an other UNIX distribution. If you’re still using windows they you are out of luck. Some of the basic networking commands are not supported by Windows’ cmd.

The first step is to resolve the host name from to an IP address. For this we use the host command. Simply type the command followed by the domain name you want to resolve. Also note that and are not necessarily the same thing. The www version does not have a mail server because people typically do not send email there.

$ host has address mail is handled by 10

$ host has address

Now that we know the IP address of this server we can look up its ownership. For that we use the whois command followed by the IP address we want to research.

$ whois
ANS Communications, Inc BLK198-15-ANS (NET-198-80-0-0-1) –
Central Intelligence Agency OIT-BLK1 (NET-198-81-128-0-1) –

In this example the result is simple and immediate. The range of IP addresses – is owned by ANS Communications, Inc.. A portion of this range – has been delegated to the CIA.

Let’s try another example that’s a little more difficult. I can open up most any spam message and find the IP address of a server that has been compromised. The fist one I find is 61•129•51•17. The whois command on this IP does not give us a nice pretty answer. It instead gives us the name of a server that does have this information.

$ whois

OrgName: Asia Pacific Network Information Centre
Address: PO Box 2131
City: Milton
StateProv: QLD
PostalCode: 4064
Country: AU

ReferralServer: whois://

NetRange: –

So now we know that the IP address we see if somewhere in the Asia Pacific region of the world. The Asia Pacific Network Information Centre (APNIC) manages the entire 61.x.x.x range out of Australia. So you know that if you see any IP address if is is going to be somewhere in Asia. In order to find out more, we need to ask APNIC for their customer information. Fortunately, APNIC has graciously told us the name of their whois server: (Notice that this is a .NET top-level domain name. The .NET used to mean something special to identify network providers.) No now all we need to do is repeat the whois command using APNIC as the authority instead of The way you do this is by adding the -h parameter followed by the name of the authoritative server. The whole command looks like this…

$ whois -h 61•129•51•17
inetnum: –
netname: CHINANET-CN
descr: Data Communication Division
descr: China Telecom
country: CN

So now we know that this IP is owned by China Telecom. They own the entire range – Also provided in the response but omitted above is a phone number and email address of the person responsible for that range of IP addresses. Most network administrators are responsible and want to know if their network is being used for spam or worse.

Luke Meets Apollo

I stumbled upon an old episode of The Streets of San Francisco called “Innocent No More” from February 1977. Richard Hatch was the co-star on the show and Mark Hamill was the guest star.

The Lost Symbol Traceroute Mystery

Dan Brown’s most recent thriller novel The Lost Symbol we find Robert Langdon on the train of a bad guy who uses Dr. Langdon knowledge of ancient symbols to track down a mysterious talisman of the Masons. Mean while another character is trying to uncover the identity of a web server containing some vital but redacted information. I really enjoy Dan Brown novels but it drives me crazy when authors try to inject technical details that they really do not understand. This was a fatal flaw of one of his previous books, Digital Fortress. That book was enjoyable but filled with technical inaccuracies that were distracting for me. The latest novel is not as technical.

The secondary character is trying to identify a web site. She knows enough to try a traceroute. The problem is that a traceroute doesn’t tell you the identity of a server. It only tells you the path to that server from your location. It is helpful for diagnosing congestion or routing problems. Since the route between two points on a network is not always the same that information is not really helpful. I can tell you some information if that server is inside another organization’s network but it is not the best way to accomplish this. The character in the novel is stymied when the traceroute abruptly stops. Actually that is very common. Some protocols like ping, finger and traceroute are blocked by some routers because they are considered noise or even a security risk.

So what does a traceroute look like. Let me do a sample traceroute to Let’s see what happens. The first response look promising. I’ll skip it because it is only showing me the path out of my house and to my ISP.

traceroute to (, 64 hops max, 52 byte packets
1 ( 1.117 ms 0.326 ms 0.305 ms
… omitted lines ….
7 ( 9.127 ms 8.965 ms 9.704 ms
8 ( 36.514 ms 53.158 ms 32.594 ms
9 ( 46.263 ms 32.090 ms 31.928 ms
10 * * *

These first few lines look promising. By line 10 however we are just getting the response * * *. Which is basically a non-response. The routers at that point in the trace have stopped responding. The trace will continue but you will probably not see any more meaningful information.

What’s interesting is that you can repeat the trace and get a different result.

traceroute to (, 64 hops max, 52 byte packets
1 ( 1.117 ms 0.326 ms 0.305 ms
… omitted lines ….
5 ( 35.616 ms 35.308 ms 35.390 ms
6 ( 35.262 ms 35.124 ms 35.175 ms
7 ( 56.628 ms ( 53.706 ms ( 54.319 ms
8 ( 74.448 ms ( 54.519 ms ( 58.251 ms
9 * * *

The second time the trace used instead of Somewhere there’s a map that shows these two paths and for at least that milisecond it was a faster route for our trace to take. Ten years ago the physical pathing was more limited and traceroute was more reliable. Today it is hobbled by security sensitive router managers.

TV Survey

The following survey is for an 8th grade science class. You participation is greatly appreciated. Please answer the questions honestly. This survey will close on 9/13/09.