![]() |
2010-01-13
, 12:48
|
Posts: 883 |
Thanked: 980 times |
Joined on Jul 2007
@ Bern, Switzerland
|
#2
|
import socket s=socket.socket(socket.af_inet, socket.sock_dgram) s.setsockopt(socket.sol_socket, socket.so_broadcast, 1) s.sendto('\xff'*6+'\x00\x50\x2c\x01\x99\x52'*16, ("255.255.255.255",9))
The Following User Says Thank You to twaelti For This Useful Post: | ||
![]() |
2010-02-22
, 13:32
|
Posts: 116 |
Thanked: 18 times |
Joined on Sep 2009
|
#3
|
![]() |
2010-05-10
, 17:25
|
Posts: 2 |
Thanked: 4 times |
Joined on May 2010
|
#4
|
# Wake-On-LAN # # Copyright (C) 2002 by Micro Systems Marc Balmer # Written by Marc Balmer, marc@msys.ch, http://www.msys.ch/ # This code is free software under the GPL import struct, socket def WakeOnLan(ethernet_address): # Construct a six-byte hardware address addr_byte = ethernet_address.split(':') hw_addr = struct.pack('BBBBBB', int(addr_byte[0], 16), int(addr_byte[1], 16), int(addr_byte[2], 16), int(addr_byte[3], 16), int(addr_byte[4], 16), int(addr_byte[5], 16)) # Build the Wake-On-LAN "Magic Packet"... msg = '\xff' * 6 + hw_addr * 16 # ...and send it to the broadcast address using UDP s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) s.sendto(msg, ('<broadcast>', 9)) s.close() # Example use WakeOnLan('0:3:93:81:68:b2')
socket.gethostbyname('YOURDYNAMICDNSIP')
'YOURROUTERIP'
'Mac_Address_Of_Pc_You_Want_Wake'
![]() |
2010-08-20
, 13:34
|
Posts: 36 |
Thanked: 45 times |
Joined on Jan 2010
@ Belgium
|
#5
|
![]() |
2010-08-20
, 13:47
|
Posts: 433 |
Thanked: 274 times |
Joined on Jan 2010
|
#6
|
![]() |
2010-08-22
, 10:04
|
|
Posts: 47 |
Thanked: 14 times |
Joined on Jul 2010
|
#7
|
Anybody using VNC Viewer found any app, or know a method to send a WOL packet over the net's to wake a sleeping VNC server computer?
I know dslreports will allow you to send over the net, but I don't like having something like that done by an outside party.
Anybody using / know / have an idea on it?
2d