Home

Awesome

HustLogin

A python-lib for authenticating HustPass@2023

HustPassLogo

Faster, Easier, Lighter

Attention: HustPass login protocol underwent a major update on 2023/05/23, moving from DES to RSA, previous login libraries are now deprecated.

Tutorials on Bilibili

Plug-in for python-requests HustAuth

Installing

The library has been made publicly available on PyPI hust_login

Installing by a single line of command, and requirements will be automatically handled.

pip install hust_login

Additionally, you need to install tesseract-ocr back end:

Documentation

hust_login.HustLogin(username, password, headers=None)

PARAMETERS:

RETURNS:

hust_login.HustLogin(username, password, headers=None)

PARAMETERS: Same as HustLogin

RETURNS:

BE CREATIVE!!!

Demo

Demonstrating how to query the exam result

Development

If the lib outdated, try to make a pull request to get this lib working again!

The js-scripts that enable encrypting and posting the login-form during regular login are publicly available login_standar.js?v=20230523. My job was to translate the js into python and deal with the captcha code.

Here are something worth mentioning if you are developing a newer version of the lib: