Coder Social home page Coder Social logo

yah3c's Introduction

YaH3C

YaH3C 是用于校园网认证的客户端,支持中山大学东校区.

依赖

  • Linux
  • Python2 (Python3暂不支持)

安装

首先从github上下载,可以直接利用git clone,也可以下载压缩包自己解压然后安装。下面以git为例,如果没有则需要先安装:

# Ubuntu/Debian
sudo apt-get install git

# ArchLinux
sudo pacman -S git

然后从项目中clone下来并安装

git clone git://github.com/humiaozuzu/YaH3C.git
cd YaH3C
sudo python setup.py install

ArchLinux默认安装的python是python3,你需要手动安装python2。

使用

认证

程序运行时必须要有root权限:

sudo yah3c

然后根据程序的提示输入账号密码就可以开始认证了。

联网

因为YaH3C仅仅是认证客户端,所以通过认证后你需要自己联网,不过为了方便还是添加了dhcp支持。

如果没有指定dhcp的命令,你可以在认证成功后使用自己喜欢的网络管理工具获取IP,如NetworkManager/Wicd。

yah3c支持基本的命令行参数,执行yah3c -h可以看到支持的命令行参数

$ yah3c -h       
usage: yah3c [-h] [-u USERNAME] [-debug]

Yet Another H3C Authentication Client

optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        Login in with this username
  -debug                Enable debugging mode

如执行sudo yah3c -u Maple可以自动认证Maple这个帐号

配置文件格式

用户的登陆信息按照如下的格式保存在文件/etc/yah3c.conf中:

[account]                  # 你的帐户 
password = 123456          # 密码
ethernet_interface = eth0  # 使用的网卡
dhcp_command = dhcpcd      # 验证成功后使用的dhcp命令(dhcpcd/dhclient)
daemon = True              # 验证成功后是否变成daemon进程

ScreenShots

认证成功:

success

认证失败:

failure

Todo

  • BSD BPF support

Thanks

yah3c's People

Contributors

humiaozuzu avatar qiao avatar tigersoldier avatar

Watchers

James Cloos 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.