GithubHelp home page GithubHelp logo

buaalogin's Introduction

fork from https://github.com/coffeehat/BIT-srun-login-script

概述

北京航空航天大学校园网自动登陆脚本 详情见 https://zhuanlan.zhihu.com/p/122556315

用户密码配置

always_online.py中配置自己的用户名和密码

开机自启动

如果有开机自启动需求, 往下看

Ubuntu 20.04

编辑目录systemd下的buaalogin.service文件, 并将ExecStart属性中的python路径及程序路径正确设置

复制buaalogin.service文件至/lib/systemd/system/文件夹中。

参考运行以下命令:

sudo systemctl daemon-reload # 加载文件
sudo systemctl start buaalogin.service # 启动服务

sudo systemctl enable buaalogin.service # 开机自启动
sudo systemctl disable buaalogin.service # 取消开机自启动

在文件/var/log/buaalogin.log中查看运行日志

Docker 配置

直接在项目根路径下执行下面命令,打包镜像

docker build -t buaalogin:tag .

运行镜像时,添加两个环境变量USERNAMEPASSWORD即可,例如

docker run -d -e USERNAME="username" -e PASSWORD="password" halfcoke/buaalogin:1

其中halfcoke/buaalogin:1是打包好的镜像,可以直接使用

通过docker logs 容器id可以查看程序执行日志

buaalogin's People

Contributors

halfcoke avatar soyons avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

buaalogin's Issues

作者可否在看下,目前直接运行always_online.py结果如下

on May 30 19:21:35 2022
Step1: Get local ip returned from srun server.
Getting login page
Successfully get login page
Resolving IP from login page html
Successfully resolve IP

Step2: Get token by resolving challenge result.
Begin getting challenge
Challenge response successfully received
Resolving token from challenge response
Successfully resolve token

Step3: Loggin and resolve response.
Begin to send login info
Login info send successfully
Resolving login result
Cannot resolve login result. Maybe the srun response format is changed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.