Skip to content

peterhoneder/pyrad

This branch is 1 commit ahead of, 113 commits behind pyradius/pyrad:master.

Folders and files

NameName
Last commit message
Last commit date
Feb 2, 2017
Jul 5, 2018
Oct 26, 2018
Aug 27, 2017
Sep 21, 2016
Jul 6, 2018
Apr 13, 2008
Apr 10, 2018
Mar 15, 2017
Feb 2, 2017
Nov 14, 2008
Feb 2, 2017
Sep 2, 2007
Jul 5, 2018

Repository files navigation

https://travis-ci.org/wichert/pyrad.svg?branch=master Documentation Status

Introduction

pyrad is an implementation of a RADIUS client/server as described in RFC2865. It takes care of all the details like building RADIUS packets, sending them and decoding responses.

Here is an example of doing a authentication request:

from __future__ import print_function
from pyrad.client import Client
from pyrad.dictionary import Dictionary
import pyrad.packet

srv = Client(server="localhost", secret=b"Kah3choteereethiejeimaeziecumi",
             dict=Dictionary("dictionary"))

# create request
req = srv.CreateAuthPacket(code=pyrad.packet.AccessRequest,
                           User_Name="wichert", NAS_Identifier="localhost")
req["User-Password"] = req.PwCrypt("password")

# send request
reply = srv.SendPacket(req)

if reply.code == pyrad.packet.AccessAccept:
    print("access accepted")
else:
    print("access denied")

print("Attributes returned by server:")
for i in reply.keys():
    print("%s: %s" % (i, reply[i]))

Requirements & Installation

pyrad requires Python 2.6 or later, or Python 3.2 or later

Installing is simple; pyrad uses the standard distutils system for installing Python modules:

python setup.py install

Author, Copyright, Availability

pyrad was written by Wichert Akkerman <[email protected]> and is maintained by Christian Giese (GIC-de).

This project is licensed under a BSD license.

Copyright and license information can be found in the LICENSE.txt file.

The current version and documentation can be found on pypi: http://pypi.python.org/pypi/pyrad

Bugs and wishes can be submitted in the pyrad issue tracker on github: https://github.com/wichert/pyrad/issues

About

Python RADIUS implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%