2021-11-25 08:59:28 +08:00
2021-11-25 08:57:54 +08:00
2021-11-25 08:57:54 +08:00
2021-11-25 08:57:54 +08:00
2021-11-24 22:53:43 +08:00
2021-11-25 08:59:28 +08:00
2021-11-25 08:59:28 +08:00
2021-07-15 10:46:05 +08:00
2021-09-20 09:43:03 +08:00

BitSrunLoginGo

Lisense Release GoReport

深澜校园网登录脚本Go语言版。GO语言可以直接交叉编译出mips架构可执行程序路由器主流平台更不用说了从而免除安装环境。

登录逻辑来自 https://github.com/coffeehat/BIT-srun-login-script

🛠️构建

建议安装使用最新版golang

直接编译本系统可执行程序:

go build

交叉编译(Linux)

export GOGGC=0
export GOOS=windows #系统
export GOARCH=amd64 #架构
go build

golang支持的系统与架构请自行查询

⚙️运行

编译结果为可执行文件,直接启动即可

可以通过添加启动参数--config指定配置文件路径,默认为当前目录

./autoLogin --config=/demo/i.json

首次运行将自动生成配置文件

Config.json说明

{
  "from": {
    "domain": "www.msftconnecttest.com", //登录地址ip或域名
    "username": "", //账号
    "user_type": "cmcc", //运营商类型,详情看下方
    "password": "" //密码
  },
  "meta": { //登录参数
    "n": "200",
    "type": "1",
    "acid": "5",
    "enc": "srun_bx1"
  },
  "settings": {
    "timeout": 1, //检查网络超时时间(秒)
    "demo_mode": false, //测试模式,报错更详细,且生成运行日志与错误日志
    "guardian": 0, //守护模式值为网络检查周期设为0关闭守护模式
    "daemon": false, //将守护挂入后台
  }
}

登录参数从原网页登陆时对/srun_portal的请求抓取

运营商类型在原网页会被自动附加在账号后,请把@后面的部分填入user_type

Description
No description provided
Readme AGPL-3.0 6.8 MiB
Languages
Go 98.7%
Dockerfile 1.1%
Batchfile 0.2%