开源软件名称:wakeonlan
开源软件地址:https://gitee.com/libolink/wakeonlan
开源软件介绍:
wakeonlan一个python制作的魔术唤醒包工具 安装wakeonlan模块执行下面2行命令,生成安装包,然后切换到dist目录,使用第3行命令安装包。安装以后就可以用cmd输入wakeonlan命令测试使用。 1.python setup.py bdist_egg 2.python setup.py sdist 3.pip install wakeonlan-0.1*.tar.gz 注意:要想唤醒成功,必须把目标主机BIOS和电源相关设置弄好,具体可以百度。 作为模块使用>>> from wakeonlan.wakeonlan import * - Wake up a single computer by its mac address
>>> send_magic_packet('ff.ff.ff.ff.ff.ff') - Wake up multiple computers by their mac addresses.
>>> send_magic_packet('ff.ff.ff.ff.ff.ff', '00-00-00-00-00-00',... 'FFFFFFFFFFFF') - An external host may be specified. Do note that port forwarding on that hostis required. The default ip address is 255.255.255.255 and the default portis 9.
>>> send_magic_packet('ff.ff.ff.ff.ff.ff',... ip_address='example.com',... port=1337) 作为命令行使用usage: wakeonlan [-h] [-i ip] [-p port] mac address [mac address ...]Wake one or more computers using the wake on lan protocol.positional arguments: mac address The mac addresses or of the computers you are trying to wake.optional arguments: -h, --help show this help message and exit -i ip The ip address of the host to send the magic packet to. (default 255.255.255.255) -p port The port of the host to send the magic packet to (default 9) DependenciesPython3.x |
请发表评论