远程唤醒
python远程唤醒
#!/usr/bin/python from socket import socket, AF_INET, SOCK_DGRAM, SOL_SOCKET, SO_BROADCAST data = b'\xFF\xFF\xFF\xFF\xFF\xFF' + b'\xaa\xbb\xcc\xdd\xee\xff' * 16 #aabbccddeeff为mac地址 sock = socket(AF_INET, SOCK_DGRAM) sock.setsockopt(SOL_SOCKET, SO_BROADCAST, 1) sock.sendto(data, ('ip地址或者域名', 22)) sock.close()
zuoer 》原创,转载请保留文章出处。
本文链接:远程唤醒 https://www.zuoer.xin/?post=117
版权声明:若无特殊注明,本文皆为《
正文到此结束
管理员已关闭本篇文章评论!