1 .局域网扫描ip和网卡地址

2.udp测试工具向udp服务端发送唤醒数据包

3.udp测试工具收到的软件包

4 .使用手机app pingTools工具上的网络唤醒工具发送唤醒包

5 .接收智能手机APP发来的包

6 .比较包的内容是否一致。

7 .唤醒包的内容是什么?

请看本说明: https://blog.csdn.net/u 013363811/article/details/44343437 /

3.1构成魔术分组的魔术分组是以十六进制表示的分组,其包括固定前缀数据和固定重复次数的目标主机MAC地址。 作为固定前缀数据的6对” FF “是指,作为固定重复次数的16次,即魔术包是在12个” f “上加上16次重复的主机MAC地址而成的,例如,本论文中使用的试验机的MAC地址是” 28-” 所以,远程开启这台机器的魔术包, “0 xffffffffffffffffffffffffffffffffffff28 d 2443568 a 728 d 2443568 a 728 d 2443568 d 2443568 a 728 d 2443568 a 728 d 24443568 a 728 d 2444443568 d 68d 28d 2443568 a 728 d 2443568 a 728 d 2443568 d 2443568 a 728 d 2443568 a 728 d 2443568 a 728 d 2443568 a 7”3354——3——33——333——33——3543 声明:本文来自CSDN原文链接: https://blog.csdn.net/u 013363811/article/details/44343437/8.PHP代码通过套接字发送唤醒包

3359 www.hangge.com/blog/cache/detail _ 1399.html

! doctypehtmlhtmlheadmetacharset=’ utf-8 ‘ title远程唤醒PC/titlemetaname=’ viewport ‘ content=’ width=device-with inititity maximum-scale=1.0,user-scalable=no ‘ link rel=’ style sheet ‘ href=’ https://cdn.static file.org/titeted bootstrap.min.CSS ‘ script src=’ https://cdn.static file.org/jquery/2.1.1/jquery.min.js ‘/script src js/BBB PHP $ MAC=’ 0c :9 d :9233608133603 e :7 a ‘; $ip=’192.168.253.21 ‘; 包括(WOL.PHP ); $WOL=newWOL(‘192.168.253.21 ‘,’ 0c :9 d 33609233608133603 e :7 a ‘,’7′ ); $status=$WOL-wake_on_wan (; divclass=’ form-group ‘ label for=’ HW URL ‘? php echo $ip.$status;/label/div divid=’ resultok ‘/div/div/body/html? PHP/***wakeonLAN功能*/class WOL{ private $hostname; //唤醒设备的url地址私有$ MAC; //唤醒设备的mac地址专用端口; //唤醒设备端口私有$ IP; //唤醒设备的ip地址(不是必需的。 程序将自动基于$hostname获取相应的ip。 ) private$msg=array )0=’目标计算机已通电。 ‘,1=’socket_create方法执行失败。 ),2=’sockeate方法执行失败。4=’幻像包发送成功! ‘ ); function__construct($hostname、$mac、$port、$ip=false ) { $this-hostname=$hostname; $this-mac=$mac; $this-port=$port; if (! $ip () $ this-IP=$ this-get _ IP _ from _ hostname ); } }公共功能wake _ on _ wan () if ) $this-is_awake ) ) return$this-msg(0); //如果设备已经唤醒,则不执行其他操作} else { $ addr _ byte=explode (‘ : ‘,$this-mac ); $hw_addr=’ ‘; for($a=0; $a6; $a ) $HW_addr.=chr(hexdec ) $addr_byte[$a] ); $msg=chr(255 ).chr ) 255 ).chr ) 255 ).chr ) 255 ); for($a=1; $a=16; $a ) $msg .=$hw_addr; //UDP发送数据包$s=socket_create(af_inet,SOCK_DGRAM,SOL_UDP ); if($s==false ) { return $this-msg[1]; //socket_create执行失败} $ set _ opt=@ socket _ set _ option ($ s,1,6,TRUE ); if $ set _ opt0(返回$ this-msg [2]; //socket_set_option执行失败}$sendto=@socket_sendto($s、$msg、strlen )、0、$this-ip、$ this-port if return $this-msg[3];//幻灯片套件发送成功! }返回$ this-msg [4];//幻灯片套件发送失败! } privatefunctionis _ awake (($ awake=@ fsockopen ) $this-IP,80,$errno,$errstr,2 ); if($awake ) ) fclose ) $awake ); } return $awake; } privatefunctionget _ IP _ from _ hostname () returngethostbyname ) $this-hostname ); }?