summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-04-08 12:08:48 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-04-08 12:08:54 +0200
commite74e5567987ce09dde47de130abde0f1dbf8c826 (patch)
treeb10e6e381779d6ed5e318a78c4665aecfd25ec1b
parent44d61cc27c4f7f6b86b779ca7bcccb946da20cfd (diff)
downloadbin-e74e5567987ce09dde47de130abde0f1dbf8c826.zip
bin-e74e5567987ce09dde47de130abde0f1dbf8c826.tar.gz
fix wol
-rwxr-xr-xwol2
1 files changed, 1 insertions, 1 deletions
diff --git a/wol b/wol
index 8f00b98..4da2e4e 100755
--- a/wol
+++ b/wol
@@ -21,7 +21,7 @@ def WakeOnLan(ethernet_address, ip=0):
int(addr_byte[4], 16),
int(addr_byte[5], 16))
# Build the Wake-On-LAN "Magic Packet"...
- msg = '\xff' * 6 + hw_addr * 16
+ msg = bytes(('\xff'*6), 'UTF-8') + (hw_addr*16)
# send it
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)