Skip to main content

RADIUS tools

Project description

https://travis-ci.org/wichert/pyrad.svg?branch=master https://img.shields.io/pypi/v/pyrad.svg https://img.shields.io/pypi/dm/pyrad.svg

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

Project details


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.1.tar.gz (32.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyrad-2.1-py2.py3-none-any.whl (36.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pyrad-2.1.tar.gz.

File metadata

  • Download URL: pyrad-2.1.tar.gz
  • Upload date:
  • Size: 32.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyrad-2.1.tar.gz
Algorithm Hash digest
SHA256 757cc854a58ea1a3f6f527585feaeeff216e175db7222c09c193b392409978ba
MD5 bad8a9b5f2410abf776c37294593a73c
BLAKE2b-256 cbd6f65cd7413432cbec94bf44d6d11b70f91a41f7fddc7a92c0de8e410f41d4

See more details on using hashes here.

File details

Details for the file pyrad-2.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pyrad-2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c01a1a9f3f1c5013f193093c8cb2c9d0d89db802c610e6b8cbb6ba19c57eb113
MD5 c1a81f3e1e23ec081c7b3b01c61b8ea3
BLAKE2b-256 f6f3092eef19a9af791f2c63d9fbefae4c005e2dac9d212b84da91707940fd31

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page