一个通用的命令行光猫(GPON ONU)浏览器 / 调试工具,帮研究者和自动化 agent 把「只能在网页后台点」的光猫操作搬到命令行,并从设备实际返回的数据里发现网页 UI 没列出的字段与开关。
A universal command-line optical modem (GPON ONU) browser / debugging tool. It brings the web-admin operations of fiber modems to the CLI, and surfaces fields & hidden switches that the web UI doesn't show — discovered from the device's actual returned data, not from presets.
授权前提 / Authorization: 仅用于你自己拥有或获得明确授权的设备。This is for devices you own or are explicitly authorized to test — a local-management research tool.
很多光猫的关键信息(PPPoE 账号密码、Wi-Fi 明文密码、认证 SN/MAC、Telnet 开关、TR-069 配置等)只能在厂商 Web 后台一页页点。FiberCat CLI 把这些封装成命令,并额外提供一个 browse 通用浏览器:登录后 GET 任意页面,自动从返回的 HTML/JS 里挖出所有服务端注入变量、隐藏 input、.cmd/.cgi 端点和操作令牌 —— 不靠任何预设字段表,页面里有什么就挖什么。
| 厂商 | 型号 | 登录 | 一条龙抓取 |
|---|---|---|---|
| 天邑 SCTY | TEWA-768G (Tianyi 固件) | ✅ 纯 CLI | SN / 认证 GPON SN / 认证 MAC / 双频 Wi-Fi / PPPoE / Telnet 开关 |
| 中兴 ZTE | ZXHN F650A (电信定制) | ✅ | 6 步登录 + PSK AES 解密 + 配置抓取 |
「实战驱动」:只收录亲手在真机验证过的型号与协议,不堆网上未验证的口令库。
git clone https://github.com/Wuvomi/fibercat-cli
cd fibercat-cli
go build -o fibercat-cli .
# 天邑 768G:登录后一条命令拉全(序列号 / 认证SN / MAC / WiFi / PPPoE / Telnet)
./fibercat-cli tewa 192.168.1.1 telecomadmin '<password>' all
# 通用浏览器:GET 任意页面,自动 dump 所有数据/隐藏端点
./fibercat-cli tewa 192.168.1.1 telecomadmin '<password>' browse SO_Overview.html
# 开 / 关 Telnet(写前自动读回 FTP 全字段回填,避免误关 FTP)
./fibercat-cli tewa 192.168.1.1 telecomadmin '<password>' telnet-on
# 中兴 F650A:探测 / 备份
./fibercat-cli detect 192.168.1.1
./fibercat-cli backup --ip 192.168.1.1 --user telecomadmin --pass '<password>' --out ./backup.json天邑 Tianyi 固件的 :8080/login.cgi 是顺序敏感的原始 CGI 解析器:表单字段必须 username 在前、psd 在后。而各语言标准库的表单编码(如 Go 的 url.Values.Encode())会按字母序把 psd 排到 username 前 → 服务端返回 HTTP 400。这就是很多人"浏览器能登、脚本登不上"的真凶。本项目用固定字段顺序的编码器解决(tewaEncodeForm)。
天邑 GPON 认证 SN 与铭牌 MAC 都可从设备上报的序列号派生,已在多台真机 + 自建 OLT 实测印证:
GPON SN = 厂家(SCTY) + 序列号后 8 位 例: SCTY + 9abcdef0 = SCTY9abcdef0
铭牌 MAC = 序列号后 12 位 例: 56:78:9a:bc:de:f0
Fiber modems hide key data (PPPoE credentials, cleartext Wi-Fi keys, GPON auth SN/MAC, Telnet toggle, TR-069 config) behind a vendor web UI, page by page. FiberCat CLI wraps these into commands, plus a generic browse that logs in, GETs any page, and auto-extracts every server-injected JS variable, hidden input, .cmd/.cgi endpoint and operation token from the actual response — no preset field tables, it dumps whatever the page contains.
| Vendor | Model | Login | One-shot dump |
|---|---|---|---|
| SCTY (Tianyi) | TEWA-768G | ✅ pure CLI | SN / GPON auth SN / auth MAC / dual-band Wi-Fi / PPPoE / Telnet toggle |
| ZTE | ZXHN F650A | ✅ | 6-step login + PSK AES decrypt + config dump |
Practice-driven: only models & protocols verified on real hardware are included.
git clone https://github.com/Wuvomi/fibercat-cli
cd fibercat-cli
go build -o fibercat-cli .
# TEWA-768G: one command dumps everything after login
./fibercat-cli tewa 192.168.1.1 telecomadmin '<password>' all
# Universal browser: GET any page, auto-dump data + hidden endpoints
./fibercat-cli tewa 192.168.1.1 telecomadmin '<password>' browse enableTelnet.htmlThe Tianyi firmware's :8080/login.cgi is an order-sensitive CGI parser: form fields must be username first, then psd. Standard form encoders (e.g. Go's url.Values.Encode()) sort keys alphabetically, putting psd before username → the firmware returns HTTP 400. That's why "the browser logs in but my script can't." This project fixes it with a fixed-field-order encoder.
仅供在授权设备上做本地管理与研究,请遵守当地法律法规;作者不对滥用负责。
For local management & research on authorized devices only. Comply with local laws. The authors are not responsible for misuse.
MIT — see LICENSE.