找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 2505|回复: 2

[k2p] 有没有熟悉k2p官改的朋友,写了段自动获取v2瑞账号的脚本

[复制链接]
本帖最后由 child9527 于 2019-1-4 14:00 编辑

有个网页会放出v2瑞的免费账号,但是每隔几个小时会换一次。出于懒,写了段自动获取v2瑞账号的脚本。写得很粗糙,虽然现在可以用,但是使用久了可能会出现莫名其妙的问题。希望有朋友能够帮我改善。我使用的固件是@abccba94 最新的1.9官改。

wget --no-check-certificate -qO ywy.txt http://abc.com/index.html
if [ -f ywy.txt ] ;then
local port=`cat ywy.txt | grep '"port"'| sed s/[[:space:]]//g | cut -d'=' -f2 | cut -d'>' -f2`                #获取端口
local ip=`cat ywy.txt | grep Address |sed s/[[:space:]]//g | cut -d'=' -f2 | cut -d'>' -f2 | cut -d'<' -f1`   #获取ip
local Alertid=`cat ywy.txt | grep AlterID |sed s/[[:space:]]//g | cut -d':' -f2 | cut -d'<' -f1`              #获取Alertid
local uuid=`cat ywy.txt | grep UUID | cut -d'=' -f2 | cut -d'>' -f2`                                          #获取UUID

#设置参数
uci set s-sr.global.server_index='1'
uci set s-sr.@servers[0].server=$ip
uci set s-sr.@servers[0].server_port=$port
uci set s-sr.@servers[0].v2alertid=$Alertid
uci set s-sr.@servers[0].v2uuid=$uuid
/etc/init.d/s-sr restart
else
uci set s-sr.global.server_index='0'
uci set s-sr.global.global_server='nil'
/etc/init.d/s-sr stop
fi




我的恩山、我的无线 The best wifi forum is right here.
来自手机 | 显示全部楼层
你的某个网站,出现的数据是啥样的,json 还是html页面??

点评

当然是html页面,下载页面,截取参数。  详情 回复 发表于 2019-1-7 21:29
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 来自手机 | 显示全部楼层
systemctl 发表于 2019-1-6 17:55
你的某个网站,出现的数据是啥样的,json 还是html页面??

当然是html页面,下载页面,截取参数。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-28 06:23

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表