Giter VIP home page Giter VIP logo

yah3c's Introduction

YaH3C

YaH3C is a H3c authentication client for SYSU east campus.

Dependencies

  • Linux Platform
  • Python2 (Python3 is not supported)

Installation

You should have git installed first, if not:

# Ubuntui/Debian users
sudo apt-get install git

# ArchLinux users
sudo pacman -S git

Then use the following bash scripts to install:

git clone git://github.com/humiaozuzu/YaH3C.git
cd YaH3C
make
sudo make install

For Arch users, be sure to use python2

Usage

You must run the program with root privilege:

$ sudo yah3c

Use dhcpcd/dhclients or other network management tools(NetworkManager/wicd) to obtain IP address

# dhcpcd as an example 
$ sudo dhcpcd eth0

Resource files

All users logging info and plugins are stored in the folder ~/.yah3c/

~/yah3c/
├── plugins            # plugins folder
│   ├── auto_dhcp.py
│   ├── __init__.py
│   ├── notify.py
│   ├── plugin_template.py
│   └── test.py
└── users.conf         # storing all users' logging info 

A user's logging info is organized in the following format in users.conf:

    [account]          # your net ID
    password = 123456  # password for your net ID
    dev = eth0         # Ethernet card you use for authentication

You can refer to ~/.yah3c/plugins/plugin_template.py to known how to write a plugin for YaH3C.

notify

This plugin will use python-notify to indicate the user when he is online/offline.

You may meet with following error message when logging in, and the notify won't show up:

No protocol specified\nAutolaunch error: X11 initialization failed.\n

There are both ways to solve the problem:

  1. excute xhost +local:root or add it to your .bash_profile once and for all.
  2. Add the following line to sudoers file(using visudo):
Defaults env_keep += "HOME"

auto_dhcp

This plugin will use dhcpcd to allocate for ip adress after you have successfully logged in.

ScreenShots

Authenticate successfully:

success

Authenticate failed:

failure

Updates

Ver 0.2

  • complete refactory
  • plugins support

Ver 0.01

  • Initial commit

Todo

  • Windows platform support
  • Command line argument support
  • Web UI

Thanks

  • qiao - Write python installation script for YaH3C
  • houqp - Refered to houqp's pyh3c.

yah3c's People

Contributors

humiaozuzu avatar zhanruiliang avatar qiao avatar

Stargazers

 avatar Bian Jiaping avatar Lhfcws avatar  avatar

Watchers

 avatar James Cloos avatar Lhfcws avatar AprilirpA 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.