pyrad icon indicating copy to clipboard operation
pyrad copied to clipboard

Radius Client isn't working PwCrypt not defined in the Client Class.

Open mzdaemon opened this issue 9 years ago • 1 comments
trafficstars

Hi I am trying to run the client following the documentation. It looks like the PwCrypt function is not defined in the pyrad.client.Client. I am receiving the errors below, the code is: Please advice if things changed on how to create a password using PwCrypt.

create request

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

/scripts$ ./clientradius.py Traceback (most recent call last): File "./clientradius.py", line 16, in req["User-Password"] = req.PwCrypt("password") File "build/bdist.linux-i686/egg/pyrad/packet.py", line 189, in setitem File "build/bdist.linux-i686/egg/pyrad/packet.py", line 126, in _EncodeKeyValues KeyError: 'User-Password'

mzdaemon avatar Sep 17 '16 03:09 mzdaemon

It seems that User-Password is not defined in your dictionary.

GIC-de avatar Sep 21 '16 18:09 GIC-de