Murga-Projects Forums

Full Version: Wake on Lan
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just wrote a Wake on Lan script, and thought I might share it.

It's a simple script using LuaSocket to send a magic packet to a computer to wake it up over the network.

Usage is like:

murgaLua wol.lua -i <broadcast IP address> (one or more MAC addresses, or identifiers)

identifiers are defined in a table in the script in the table "targets". they start by @ and are followed by a number of characters (the set matched by %w).

Feel free if you want to adapt it, or write a GUI frontend.
I've never had a desire for wake-on-lan yet, but i do like this script. I particularly like the checkIPv4() function. If you don't mind, i would like to stash it into my collection of code chunks for future use/reference.
Sure, if I meant it to proprietary, I wouldn't share it Wink.
I'm glad the few hours I spent writing it weren't useless after all. (After writing this, I discovered my PC can't use wake on LAN Wink).

Kind regards,

Jan-Pieter
Reference URL's