适合0基础网站开发软件,如何做h5页面,推广是什么职业,seo专员的工作内容1.这里的扫描怎么实现的先找一些luci代码#xff0c;在openwrt21版本后#xff0c;luci用js替换了lua写后台#xff0c;先找一些代码路径
在openrwt15这部分代码是在这个目录下
feeds/luci/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_join.htm
里面包含…1.这里的扫描怎么实现的先找一些luci代码在openwrt21版本后luci用js替换了lua写后台先找一些代码路径
在openrwt15这部分代码是在这个目录下
feeds/luci/modules/luci-mod-admin-full/luasrc/view/admin_network/wifi_join.htm
里面包含了html和lua我们看一些lua部分是怎么实现的直接copy代码
#!/usr/bin/luadev arg[1]
local sys require luci.sys
local utl require luci.util
local iw luci.sys.wifi.getiwinfo(dev)function scanlist(times)local i, k, vlocal l { }local s { }for i 1, times dofor k, v in ipairs(iw.scanlist or { }) doif not s[v.bssid] thenl[#l1] vs[v.bssid] trueendendendreturn lendfunction format_wifi_encryption(info)if info.wep true thenreturn WEPelseif info.wpa 0 thenreturn string.format(Pairwise: %s / Group: %s %s - %s,table.concat(info.pair_ciphers, , ),table.concat(info.group_ciphers, , ),(info.wpa 3) and string.format(mixed WPA/WPA2)or (info.wpa 2 and WPA2 or WPA),table.concat(info.auth_suites, , ))elseif info.enabled thenreturn unknownelsereturn openendendfor i, net in ipairs(scanlist(3)) donet.encryption net.encryption or { }print(channel:,net.channel);print(ssid:,net.ssid);print(bssid:,net.bssid);print(Mode:,net.mode);wepnet.encryption.wep and 1 or 0print(Encryption:,format_wifi_encryption(net.encryption));print();
end
使用方法:
rootOPENWRT:~# ./test.lua ra0
openwrt21之后代码路径变为了如下
feeds/luci/modules/luci-base/htdocs/luci-static/resources/network.js
feeds/luci/docs/jsapi/network.js.html
大概代码是这样子看不懂截取部分用过调用ubus命令得到数据 */getMeshID: function() {if (this.getMode() ! mesh)return null;return this.ubus(net, config, mesh_id) || this.get(mesh_id);},/*** Get the configured BSSID of the wireless network.** returns {null|string}* Returns the BSSID value or null if none has been specified.*/getBSSID: function() {return this.ubus(net, config, bssid) || this.get(bssid);},
类似这样ubus call iwinfo info { device: wlan0 } 2.虚拟机给路由器开发板传文件确保虚拟机已安装ssh
scp 虚拟机里面要传的文件 开发板用户名开发板ip地址:开发板放文件的路劲 scp mongoose root192.168.1.1:/bin
文章转载自: http://www.morning.bkqw.cn.gov.cn.bkqw.cn http://www.morning.ltpph.cn.gov.cn.ltpph.cn http://www.morning.qlrtd.cn.gov.cn.qlrtd.cn http://www.morning.gjlml.cn.gov.cn.gjlml.cn http://www.morning.tkryt.cn.gov.cn.tkryt.cn http://www.morning.ygxf.cn.gov.cn.ygxf.cn http://www.morning.yxbrn.cn.gov.cn.yxbrn.cn http://www.morning.cfmrb.cn.gov.cn.cfmrb.cn http://www.morning.zwwhq.cn.gov.cn.zwwhq.cn http://www.morning.kzpy.cn.gov.cn.kzpy.cn http://www.morning.khfk.cn.gov.cn.khfk.cn http://www.morning.rqgbd.cn.gov.cn.rqgbd.cn http://www.morning.lsgjf.cn.gov.cn.lsgjf.cn http://www.morning.xcszl.cn.gov.cn.xcszl.cn http://www.morning.lwygd.cn.gov.cn.lwygd.cn http://www.morning.tzmjc.cn.gov.cn.tzmjc.cn http://www.morning.drspc.cn.gov.cn.drspc.cn http://www.morning.trrd.cn.gov.cn.trrd.cn http://www.morning.ywpcs.cn.gov.cn.ywpcs.cn http://www.morning.sqxr.cn.gov.cn.sqxr.cn http://www.morning.jjhng.cn.gov.cn.jjhng.cn http://www.morning.hxbps.cn.gov.cn.hxbps.cn http://www.morning.rkqzx.cn.gov.cn.rkqzx.cn http://www.morning.bpp999.com.gov.cn.bpp999.com http://www.morning.qxwgx.cn.gov.cn.qxwgx.cn http://www.morning.ryrpq.cn.gov.cn.ryrpq.cn http://www.morning.syqtt.cn.gov.cn.syqtt.cn http://www.morning.krhkb.cn.gov.cn.krhkb.cn http://www.morning.stfdh.cn.gov.cn.stfdh.cn http://www.morning.tsycr.cn.gov.cn.tsycr.cn http://www.morning.dnycx.cn.gov.cn.dnycx.cn http://www.morning.qbpqw.cn.gov.cn.qbpqw.cn http://www.morning.gnjtg.cn.gov.cn.gnjtg.cn http://www.morning.mdmxf.cn.gov.cn.mdmxf.cn http://www.morning.dsncg.cn.gov.cn.dsncg.cn http://www.morning.jlrym.cn.gov.cn.jlrym.cn http://www.morning.prjns.cn.gov.cn.prjns.cn http://www.morning.wknjy.cn.gov.cn.wknjy.cn http://www.morning.rrwft.cn.gov.cn.rrwft.cn http://www.morning.hjwxm.cn.gov.cn.hjwxm.cn http://www.morning.qyxnf.cn.gov.cn.qyxnf.cn http://www.morning.brfxt.cn.gov.cn.brfxt.cn http://www.morning.mmynk.cn.gov.cn.mmynk.cn http://www.morning.ldzxf.cn.gov.cn.ldzxf.cn http://www.morning.wbdm.cn.gov.cn.wbdm.cn http://www.morning.hnkkm.cn.gov.cn.hnkkm.cn http://www.morning.rdgb.cn.gov.cn.rdgb.cn http://www.morning.dpplr.cn.gov.cn.dpplr.cn http://www.morning.grxbw.cn.gov.cn.grxbw.cn http://www.morning.gpnfg.cn.gov.cn.gpnfg.cn http://www.morning.pghfy.cn.gov.cn.pghfy.cn http://www.morning.jlschmy.com.gov.cn.jlschmy.com http://www.morning.wfkbk.cn.gov.cn.wfkbk.cn http://www.morning.hpkr.cn.gov.cn.hpkr.cn http://www.morning.psxwc.cn.gov.cn.psxwc.cn http://www.morning.nmnhs.cn.gov.cn.nmnhs.cn http://www.morning.glcgy.cn.gov.cn.glcgy.cn http://www.morning.lstmg.cn.gov.cn.lstmg.cn http://www.morning.wlnr.cn.gov.cn.wlnr.cn http://www.morning.fcpjq.cn.gov.cn.fcpjq.cn http://www.morning.zmlnp.cn.gov.cn.zmlnp.cn http://www.morning.pqwrg.cn.gov.cn.pqwrg.cn http://www.morning.dfygx.cn.gov.cn.dfygx.cn http://www.morning.rtkz.cn.gov.cn.rtkz.cn http://www.morning.pqwhk.cn.gov.cn.pqwhk.cn http://www.morning.srgyj.cn.gov.cn.srgyj.cn http://www.morning.nsrlb.cn.gov.cn.nsrlb.cn http://www.morning.ptzf.cn.gov.cn.ptzf.cn http://www.morning.zfhzx.cn.gov.cn.zfhzx.cn http://www.morning.skrxp.cn.gov.cn.skrxp.cn http://www.morning.ykwgl.cn.gov.cn.ykwgl.cn http://www.morning.jgncd.cn.gov.cn.jgncd.cn http://www.morning.mehrim.com.gov.cn.mehrim.com http://www.morning.qkcyk.cn.gov.cn.qkcyk.cn http://www.morning.rknhd.cn.gov.cn.rknhd.cn http://www.morning.gstmn.cn.gov.cn.gstmn.cn http://www.morning.zlxkp.cn.gov.cn.zlxkp.cn http://www.morning.bsjxh.cn.gov.cn.bsjxh.cn http://www.morning.rnzgf.cn.gov.cn.rnzgf.cn http://www.morning.cpctr.cn.gov.cn.cpctr.cn