Skip to main content

A RADIUS EAP-MSCHAPv2 client

Project description

RADIUS EAP-MSCHAPv2 and MSCHAPv2 Client

A pure Python 3 RADIUS EAP-MSCHAPv2 and MSCHAPv2 client implementation.

Explanation

This project was developped because no RADIUS client library supports EAP-MSCHAPv2 (A ticket is open for the pyrad library, see here).

This library only supports EAP-MSCHAPv2 and (legacy) MSCHAPv2. This code has been tested with Microsoft Windows Server 2016 Network Policy Server and FreeRADIUS 3.0.25.

Installation

pip3 install radius-eap-mschapv2-client

Usage

from radius_eap_mschapv2 import RADIUS

radius_host = '10.1.2.3'
radius_secret = 'r4d!us_$3cr3t'
radius_nas_ip = '10.3.2.1'
radius_nas_id = 'mynas'
username = 'myuser'
password = 'mypassword!'

r = RADIUS(radius_host, radius_secret, radius_nas_ip, radius_nas_id)

# legacy MSCHAPv2 (no EAP)
r = RADIUS(radius_host, radius_secret, radius_nas_ip, radius_nas_id, eap=False)
print(r.is_credential_valid(username, password))

Requirements

This script has been written for Python 3.5 and newer.

You must install librairies with pip3 install -r requirements.txt.

Credits

To make this implementation, I used the daphp/radius PHP implementation.

The article Understanding PEAP In-Depth also helped me a lot.

Thanks to them.

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

radius-eap-mschapv2-client-1.0.6.tar.gz (13.0 kB view hashes)

Uploaded Source

Built Distribution

radius_eap_mschapv2_client-1.0.6-py3-none-any.whl (14.0 kB view hashes)

Uploaded Python 3

Supported by

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