Giter Site home page Giter Site logo

ictauth's Introduction

ICTAuth

在没有图形化界面的情况下可以通过命令行方便的认证ICT有线网,比如树莓派的认证,同时应对ICT十二点后会统一强制下线所有的用户,添加了网络监控功能,可以再断网的时候自动进行认证

使用方法

首先下载代码

$git clone https://github.com/KDF5000/ICTAuth.git

修改auth.py里面认证需要的用户名和密码

pass_str = hashlib.md5("******").hexdigest()

data = {"username":"******", "password":password,"drop":0, "type":1, "n":100}

然后执行下面命令进行登录和退出

$python auth.py login
$python auth.py logout

添加网络监控程序

下载的代码中mornitor_net.sh是监控网络是否连接比在断网的情况下调用auth.py进行自动认证。为了持续监控需要将此程序加入crontab进行定时执行,可以修改devincron里面的相应路径,然后执行下面指令即可。

$crontab devincorn

该设置将会每十分钟检查一下网络连接情况,如果发现已经断网则自动认证。

ictauth's People

Watchers

 avatar  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.