reeps

wol

Oct 7th, 2019
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. import sys
  2. from socket import socket, AF_PACKET, SOCK_RAW
  3. soc = socket(AF_PACKET, SOCK_RAW)
  4.  
  5. woMac = "\x78\x24\xaf\xd8\x90\x11"
  6.  
  7. myMac = "\xdc\x0e\xa1\xb4\x90\x94"
  8.  
  9. payload = "\xFF" *6 + woMac*16
  10.  
  11. ethertype = "\x08\x42"
  12.  
  13. wol = woMac+ myMac + ethertype + payload
  14.  
  15. soc.bind(("enp2s0f0", 0))
  16. soc.send(wol)
  17. print "packet send"
  18. soc.close()
Add Comment
Please, Sign In to add comment