Skip to content

Commit

Permalink
update introduction
Browse files Browse the repository at this point in the history
  • Loading branch information
Freedomisgood committed Sep 14, 2021
1 parent 9bdc96c commit 5985a3b
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 649 deletions.
Binary file not shown.
21 changes: 4 additions & 17 deletions Net_Assistant/Andriod/ZJU_CST_Net.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,6 @@ function getUserConfig() {
var ctx = storages.create(storageName);
var userConfig = {}
if (!ctx.contains("account")) {
// const options = ["NJUPT", "NJUPT-CMCC", "NJUPT-CHINANET"];
// const suffix = ["", "@cmcc", "@njxy"];
// var i = dialogs.singleChoice("想要连接的网络", options);
// if (i >= 0) {
// toast("账号: " + user + "\n" +
// "ESSID: " + options[i]
// );
// } else {
// toast("您取消了选择");
// exit();
// }
// var carrier = suffix[i];

var user = rawInput("请输入校园网账号");
var pwd = rawInput("请输入校园网密码");
if (user !== null && pwd !== null && user !== "") {
Expand Down Expand Up @@ -70,12 +57,12 @@ function login(userConfig){
toast("登录失败!~检查是否连接校园网");
return;
}
text = res.body.string()
if ( !isNaN(text)){
text_result = res.body.string()
if ( !isNaN(text_result)){
toast("登录成功!~");
}else if (text == "online_num_error"){
}else if (text_result === "online_num_error"){
toast("登录失败, 在线设备超时!~");
}else if (text == "username_error"){
}else if (text_result === "username_error"){
toast("登录失败, 账号密码错误!~");
storages.remove(storageName)
}else{ // NTEy为配置问题
Expand Down
21 changes: 16 additions & 5 deletions Net_Assistant/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
# ZJU_things
> :smile:写些在校期间用到的脚本
# Net_Assistant

- [基于AutoJS的CST上网APP](./Andriod)
- [CST-PC上网二进制](./PC)

> :smile: 运行上网助手: 运行APP或者exe即可登录上网,但由于CST校园网免费账号只能
> 一个设备登录,因此目前实现机制为**设备上线前会下线已上线的设备,从而保证当前设备上线成功**
> TODO:为了能够更好地利用空闲账号,可以搭建账号池,即每个宿舍留出固定路由器的账号后
> 共享出自己的账号作为公共账号, 从而高效利用所有人的上网账号并实现单人可以上线多设备的可能。
>
```
账号池有两种方式维护:
1.账号信息放在配套的本地配置文件中==>随机碰撞找到空闲账号
2.账号信息放在服务器上,通过http请求空闲账号==>通过服务器管控,登出时需要反馈给服务器
如果没有空闲账号,则强迫登录自己账号的设备下线,使自己上线
```

- [ZJU-新生报到服务-适应性课程速过脚本and测试题速过脚本](./guide_classes_and_tests)
- [ZJU浙软官网定时爬虫脚本(发送到微信ServerChan)](./soft_web_scrapy)
- [浙软课程资料](./Course_Materials)

Loading

0 comments on commit 5985a3b

Please sign in to comment.