Skip to main content

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.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.0.tar.gz (38.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.0-py2.7.egg (84.3 kB view details)

Uploaded Egg

File details

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

File metadata

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

File hashes

Hashes for pyrad-2.0.tar.gz
Algorithm Hash digest
SHA256 6bdac1af328aceb4383c39986356b6bb8a880157c3fd95eefc28643526718999
MD5 e95f2cef1a191c1c891779dff8fb0255
BLAKE2b-256 bf2facbc4459d7521eba65bbff5c295d5172b88cad5b20340085c086bdc3f528

See more details on using hashes here.

File details

Details for the file pyrad-2.0-py2.7.egg.

File metadata

  • Download URL: pyrad-2.0-py2.7.egg
  • Upload date:
  • Size: 84.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyrad-2.0-py2.7.egg
Algorithm Hash digest
SHA256 29f07277b98c69c526b3e1e3e213b5f58f063bc4a7f2c8f2c6f92dc17af2da15
MD5 6c5a80e3464f2fa5e4e5ae0eb86ef6b5
BLAKE2b-256 9c926230c6be585a013ddf362aa1019a1a27a4b2a41ea46756969290e8cf0ae3

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