Sample code for 30+ languages & platforms
Lua

Send a Wake-on-LAN Packet with a SecureOn Password

See more Socket/SSL/TLS Examples

Demonstrates Socket.SendWakeOnLan2, which sends a Wake-on-LAN magic packet that includes a SecureOn password.

Background. The password is a hexadecimal string representing four or six bytes and should come from a secure source. This is otherwise the same as SendWakeOnLan.

Chilkat Lua Downloads

Lua
local chilkat = require("chilkat")

local socket = chilkat.Socket.new()

-- Send a Wake-on-LAN magic packet that includes a SecureOn password.  The password is a hexadecimal
-- string representing four or six bytes, and should come from a secure source rather than being
-- hard-coded.
local secureOnPassword = "AABBCCDDEEFF"
local success = socket:send_wake_on_lan2("000102030405", 9, "255.255.255.255", secureOnPassword)
if not success then
    print(socket.last_error_text)
    return
end

print("Wake-on-LAN packet sent.")