RADIUS tools
Project description
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.7, or Python 3.6 or later
Installing is simple; pyrad uses the standard distutils system for installing Python modules:
python setup.py install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyrad-2.4.tar.gz
(28.0 kB
view details)
Built Distribution
pyrad-2.4-py3-none-any.whl
(32.5 kB
view details)
File details
Details for the file pyrad-2.4.tar.gz
.
File metadata
- Download URL: pyrad-2.4.tar.gz
- Upload date:
- Size: 28.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 057de4b7e89d8da57ba782c1bde45c63ebee720ae2c0b0a69beaff15c47e30d9 |
|
MD5 | 3a34146ef689aad045aac0435e1b28ac |
|
BLAKE2b-256 | fc040fe33dca20685b3ced8359f487638bdf03f2776652f7f6812a639cce1b70 |
File details
Details for the file pyrad-2.4-py3-none-any.whl
.
File metadata
- Download URL: pyrad-2.4-py3-none-any.whl
- Upload date:
- Size: 32.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 233de3aefa383875c5bddfdecfd4819d1b1fbac41aa43f6bebe4f81e63dca363 |
|
MD5 | a323f6c98f6badb58b465a9fefbc003e |
|
BLAKE2b-256 | 7523483cc51b2ea1ac47dc30093a786190e4a2dfaef892263430c6f99296fabf |