freeradius: draft d'auth wifi via python

This commit is contained in:
Daniel STAN 2013-11-01 02:58:47 +01:00
parent 0a141bf7a5
commit 24d754566e
3 changed files with 230 additions and 0 deletions

21
freeradius/test.py Executable file
View file

@ -0,0 +1,21 @@
#!/bin/bash /usr/scripts/python.sh
# -*- coding: utf-8 -*-
import auth
import sys
import time
if len(sys.argv) < 2:
print "Give me a mac !"
sys.exit(1)
# Machine à s'authentifier (cerveaulent)
p=(('Calling-Station-Id', sys.argv[1]),)
print repr(auth.wifi_authorize(p))
print "wait for 3s, tu peux aller crasher le serveur pg ou ldap"
sys.stdout.flush()
time.sleep(3)
print repr(auth.post_auth(p))