wake-on-lan

Android Wake On Lan in Java

梦想的初衷 提交于 2021-02-07 10:34:40
问题 i'm trying to make a Wake On Lan application in Java (for Android), so I searched, and found this code: import java.io.*; import java.net.*; public class WakeOnLan { public static final int PORT = 9; public static void main(String[] args) { if (args.length != 2) { System.out.println("Usage: java WakeOnLan <broadcast-ip> <mac-address>"); System.out.println("Example: java WakeOnLan 192.168.0.255 00:0D:61:08:22:4A"); System.out.println("Example: java WakeOnLan 192.168.0.255 00-0D-61-08-22-4A");

通过Wake-on-LAN唤醒服务器

ぐ巨炮叔叔 提交于 2020-03-12 17:33:51
Wake-on-LAN 简称WOL或WoL,中文多译为“网络唤醒”、“远端唤醒”技术。WOL 是一种技术同时也是该技术的规范标准,它的功效在于让已经进入休眠状态或关机状态的电脑,透过局域网路(多半为以太网路)的另一端对其发令,使其从休眠状态唤醒、恢复成运作状态,或从关机状态转成开机状态。此外,与 WOL 相关的技术也包括远端下令关机、远端下令重新开机等相关的遥控机制。 Wake-on-LAN功能需要有主板和网卡的支持,在主板BIOS中的网卡设置中必须有“Wake On LAN”设置(开启:On),并且相应网卡也得支持该功能。因为,在关闭计算机以后,其实网卡仍然通电的,这样你就可以通过发送一段Magic Packet给网卡,让网卡将计算机唤醒。 Magic Packet是一个广播帧(frame),透过端口7或端口9进行发送,且可以用无连接(Connectionless protocol)的通讯协议(如UDP、IPX)来传递,不过一般而言多是用UDP,原因是Novell公司的Netware网络操作系统的IPX协定已经很少使用。 在Magic Packet内,每次都会先有连续6个"FF"(十六进制,换算成二进制即:11111111)的资料,即:FF FF FF FF FF FF,在连续6个"FF"后则开始带出MAC地址,有时还会带出4字节或6字节的密码,一旦经由网卡侦测、解读、研判(广播

How to Enable Wake on LAN programmatically

三世轮回 提交于 2019-12-08 02:59:56
问题 Is there a way to programmatically reach into the BIOS and turn on the Wake on LAN capability for those machines that support it? Ideally, the solution would be cross-BIOS, but hitting each of the major vendors with separate solutions would be okay, too. 回答1: BIOS configuration is something that the OS intentionally limits to avoid virus problems (lots of bios viruses back in the day!). You need to look at the system management interface to see if it's available generally. You'll probably

How to Enable Wake on LAN programmatically

你。 提交于 2019-12-06 13:18:23
Is there a way to programmatically reach into the BIOS and turn on the Wake on LAN capability for those machines that support it? Ideally, the solution would be cross-BIOS, but hitting each of the major vendors with separate solutions would be okay, too. Adam Davis BIOS configuration is something that the OS intentionally limits to avoid virus problems (lots of bios viruses back in the day!). You need to look at the system management interface to see if it's available generally. You'll probably need to work in ring0 in windows (or root/kernel in linux). Additionally, you'll likely need to

Bash one-line command to send wake on LAN magic packet without specific tool

若如初见. 提交于 2019-12-03 15:03:57
问题 Is it possible to forge a wake on LAN magic packet and send it in just a one-line bash command? Of course, I know there are specific tools for doing this that solve the problem in one line, but it could be useful to know the minimal requirements for WOL forging. This is: how to deal with wake on LAN without specific tools . 回答1: The minimum requirements I can think off: Bash supporting brace expansion (I think it is v3.5.1 and above). The sed command (1). NetCat . Assuming: WOL package for

Bash one-line command to send wake on LAN magic packet without specific tool

痴心易碎 提交于 2019-12-03 04:52:32
Is it possible to forge a wake on LAN magic packet and send it in just a one-line bash command? Of course, I know there are specific tools for doing this that solve the problem in one line, but it could be useful to know the minimal requirements for WOL forging. This is: how to deal with wake on LAN without specific tools . The minimum requirements I can think off: Bash supporting brace expansion (I think it is v3.5.1 and above). The sed command (1). NetCat . Assuming: WOL package for LAN, broadcast to 255.255.255.255. The command line would be: echo -e $(echo $(printf 'f%.0s' {1..12}; printf

Wake on lan script that works

一个人想着一个人 提交于 2019-12-03 03:57:08
问题 is there a wake on lan script using a web language preferably php that works? Also one that has some documentation on how to get it to work like what needs to be enabled on your server etc 回答1: function wol($broadcast, $mac) { $hwaddr = pack('H*', preg_replace('/[^0-9a-fA-F]/', '', $mac)); // Create Magic Packet $packet = sprintf( '%s%s', str_repeat(chr(255), 6), str_repeat($hwaddr, 16) ); $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); if ($sock !== false) { $options = socket_set_option

Sending Wake on LAN packet from Android to PC

风格不统一 提交于 2019-11-28 19:23:31
问题 My Android app sends/retrieves data to/from the user's own PC using HTTP and it's working fine with a handful of beta testers. I now need to consider a situation where the PC is hibernating. I've never done this before but I've googled to find info about the WOL 'magic packet' and some simple source written in C (using CAsyncSocket at the client end). Doing this over a wi-fi connection on the user's home network is likely to be relatively straight-forward but ideally I want this to work over