Plazes Launcher BASH Shell Script

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

Comments

Post new comment

You can comment anonymously if you must, but I would prefer it if you used your real name.
The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
Optional. If you enter the address of a website here, your name will be publicly linked to the site.
  • Adds typographic refinements.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.