Plazes Launcher BASH Shell Script

Peter Rukavina
The code described here has been moved into Subversion.

In anticipation of doing some work with mobile devices, I’ve become interested in building a lightweight [[Plazes]] launcher — something that doesn’t require a Perl, PHP, Python or any other “scripting language engine” overhead. At the same time, I don’t want something I have to compile — like a C or C++ launcher — partly because I’m lazy, and partly because I’m not smart enough.

The tentative result is a Plazes Launcher BASH Shell Script, a Plazes Launcher that, true to the “little bits of code glued together to do powerful stuff” UNIX philosophy, takes advantage of a whole bunch of [probably installed on your system already] standard UNIX tools to do what needs to be done:

  • The MD5 hash of the Plazes.com password is created using OpenSSL
  • The netstat and arp commands are used to grab the MAC address of the default gateway.
  • The grep, cut, sed and wc commands are used for various string manipulation duties.
  • cURL is used to send a hand-crafted XML-RPC request to the Plazes.com XML-RPC server.

In its current state, the script is Mac OS X-specific because it assumes the output of netstat and arp as it emerges from the OS X versions of those commands (and maybe from all FreeBSD-based systems — I’m not sure about that, though). It should be trivial to modify for other Unices.

Of course, like my earlier Plazes GUI Launcher for Ruby, this BASH version doesn’t do all of the things a Real Plazes.com Launcher should — like error detection, display of useful information, pinging the Plazes.com server every X minutes and so on. But it is a lightweight starting place.

Plazes BASH Launcher screen shot

Add new comment

Plain text

  • Allowed HTML tags: <b> <i> <em> <strong> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). You can subscribe to an RSS feed of posts, an RSS feed of comments, or receive a daily digests of posts by email.

Search