
光猫自动登录并弹出公网IP, 油猴脚本:
当然,你得需要获得光猫的管理员密码,联通光猫的管理员帐号密码默认为:CUAdmin,密码与用户名相同.
可以在浏览器中,打开http://192.168.1.1/cu.html进入验证.如果无法获得光猫管理员帐号密码,下面会有介绍.
1. 匹配:
http://192.168.1.1/cu.html
http://192.168.1.1/menu.gch
// ==UserScript==
// @name 联通光猫超管登陆
// @namespace https://github.com/luomoxu/UserScript
// @version 0.1
// @description 目前测试支持光猫 KD-YUN-811E(北京联通)
// @author You
// @match http://192.168.1.1/*
// @require https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js
// @grant unsafeWindow
// ==/UserScript==
(function () {
'use strict';
$("#Frm_Username").val('CUAdmin');
$("#Frm_Password").val('CUAdmin');
var gT0;
gT0=setTimeout(function(){
clearTimeout(gT0);
document.getElementById("menuSucc").value = 'status';
document.getElementById("flogout").action ="menu.gch";
document.flogout.submit();
},1000);
$("#LoginId").click();
})();
2. 匹配:
http://192.168.1.1/start.ghtml
// ==UserScript==
// @name 打开IP显示tab页
// @namespace https://github.com/luomoxu/UserScript
// @include http://192.168.1.1/start.ghtml
// @exclude onChangeURL('mmNet');
// @version 1
// @grant none
// ==/UserScript==
var gT1;
var gT2;
gT1=setTimeout(function(){
clearTimeout(gT1);
var doc = document.getElementById('mainFrame').contentWindow;
var sUrl = doc.getURL(doc.menu_items['mmStatus']['smWanStatu']['page']);
console.log(sUrl);
gT2=setTimeout(function(){
clearTimeout(gT2);
var doc= document.getElementById('mainFrame').contentWindow;
var ip = doc.document.getElementsByClassName('tdright')[3].innerHTML;
alert(ip);
},2000);
doc.openLink_cu(sUrl);
},1000);
使用的是油猴3.9 + firefox v52.
打包好的油猴v3.9下载:
https://otfiles.otherhill.com:12321/uploads/file/20211111/greasemonkey-2021.11.11.beta.xpi油猴各版本下载:
https://github.com/greasemonkey/greasemonkey/tags?after=4.0firefox v52下载:
https://ftp.mozilla.org/pub/firefox/releases/52.9.0esr/获得光猫管理员帐号密码的方法:
进入
http://192.168.1.1/hidden_version_switch.gch
可以开启光猫telnet,默认是关闭的.
联通光猫的telnet帐户名默认为root,密码为:Pon521
打开命令行窗口, 键入:
telnet 192.168.1.1
根据提示,输入telnet帐号和密码.
输入sendcmd 1 DB p DevAuthInfo回车。会出现密文密码如图:

干完坏事后,记得关闭telnet, 因为网络上任何一个人,拿到你光猫的公网IP后,都能telnet进去干坏事.
执行一句rm -rf ... 就彻底凉凉.太坑! 抬头三尺有神明,做最好的自己,不要去害人.
参考:
https://moy.cat/2021/09/记中兴-f477v2-新版固件改桥接/