Code Monkey home page Code Monkey logo

njupt-autologin's Introduction

NJUPT-AutoLogin

由于2023年暑假南邮更新了校园网认证系统,把原来的POST方式改成了GET,还引入了HTTPS,以前的登录脚本需要大改,于是有了这个项目。

【测试环境】

  • OS: Windows10
  • Python 3.8.10 (Anaconda3)
  • httpx 0.24.1

❤准备工作

本项目使用了Python第三方库httpx,用来支持HTTP/2的请求。使用以下控制台命令下载:

pip install httpx
pip install httpx[http2]

注:requests库不支持HTTP/2,所以用的httpx,但是我看到其他人的项目用requests库也行?

然后把源码下载到电脑里

➡修改代码

用记事本或其他文本编辑器打开源码,在USERNAMEPASSWD后面的双引号中间填写对应信息,并修改SEL后面的数字选择运营商,如下方代码块所示。

#定义登录时需要用的变量
USERNAME = "BXXXXXXXX"      #用户名
PASSWD = "💅💅💅💅💅💅"    #密码
SEL = 1     #0-校园网;1-**电信;2-**移动

🧱cmd.exe,启动!

在与源码同一目录下,新建一个文本文档,将后缀改成.bat,复制下面的代码并保存,你也可以自行修改😘:

@ECHO OFF
chcp 65001
title NJUPT校园网登录
python ./NJUPT-AutoLogin.py
pause
EXIT

njupt-autologin's People

Contributors

httslayqueen avatar

Watchers

 avatar

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.