![]() ![]() Which works just fine from inside my home network (or LAN). Print "WOL request has been sent to %s " % (j,k) Print "Invalid MAC address nothing to do!!" Both parameter are optional as if left empty, the program would ask the user to input both the MAC and IP address. The second parameter is IP adress of the targeted device to be woken up. If not re.search(X.replace('zA-Z','fA-F'), k): python wakeon.py < mac address > < broadcast address > The first parameter is the MAC address of the targeted device to be woken up.# strip off everything from first "#" found # Previously, it was a string of 256 characters class Waker (): def makeMagicPacket (self, macAddress): Take the entered MAC address and format it to be sent via socket. The packet is constructed from the mac address given as a parameter. A Wake on LAN program that allows you to send magic packets over the Internet. A magic packet is a packet that can be used with the for wake on lan protocol to wake up a computer. ![]() # First argument 'None' in str.translate is new in 2.6. Small module for use with the wake on lan protocol. Here is the script: exec /usr/bin/python -x "$0" = [ The pc1 can be waked on from the router Turn off pc1,wakeup it from pc2 with the following python code wakeonlan.py: from wakeonlan import sendmagicpacket sendmagicpacket ('xx.xx.xx.xx') Executing the command python3 wakeonlan.py in pc2 can wakeup my pc1 successfully. With Task scheduler you can run tasks based on events like startup. I found threads discussing a possibility that you could run a script as a service or something, but couldnt find a working solution. Oh… yeah.A while ago, I wrote a small WOL script to switch on the computers in my network. Is there any way to auto login after Wake On Lan or somehow automate the login process without removing the password.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |