|
本帖最后由 cw_qh 于 2023-8-6 19:52 编辑
(所谓R4AV2是指原厂固件版本为2.30.x的小米4A千兆版路由器,本教程非保姆级教程,基础知识请自学)
一 开启ftp和telnet
准备好 python(linux和windows均可),到https://github.com/acecilia/OpenWRTInvasion下载OpenWRTInvasion-master.zip(非别的教程的0.0.7或0.0.8,路由器也不需连外网),解压缩OpenWRTInvasion-master,运行pothon remote_command_execution_vulnerability ,测试过多次,第一遍不行,第二遍成功。
注意:(在windows环境提示"Stopping: script can only be run on a Mac/Linux system"的话,编辑remote_command_execution_vulnerability文件,注释掉“if platform.system() == "Windows" 和 sys.exit("Stopping: script can only be run on a Mac/Linux system")”两行,或删除这两行(我这里是36和37行))
二 刷openwrt固件
下载官方固件,目前最新的是 https://downloads.openwrt.org/releases/23.05.0-rc2/targets/ramips/mt7621/openwrt-23.05.0-rc2-ramips-mt7621-xiaomi_mi-router-4a-gigabit-v2-squashfs-sysupgrade.bin;也有snapshots版本(https://downloads.openwrt.org/snapshots/targets/ramips/mt7621),不过这个版本不带luci,需要自己opkg install luci.
ftp 上传到路由器的 /tmp 下,telnet到路由器,mtd -e OS1 write 你上传的固件名 OS1 刷机,完成后reboot重启动,web进管理地址配置(刷完openwrt官方固件,路由器地址变成192.168.1.1)。
强调几点:不刷别的教程的 breed;刷完2.4G和5G wifi都正常;LED指示灯也正常;固件带luci;以后升级openwrt直接在luci界面(web管理界面)的系统-备份与升级 刷写固件即可。
三 刷回原厂固件
到官网 http://www1.miwifi.com/miwifi_download.html下载 小米路由器修复工具(MIWIFIRepairTool.x86)及相应的固件,即可刷回。
|
|