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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file radius-eap-mschapv2-client-1.0.6.tar.gz.

File metadata

File hashes

Hashes for radius-eap-mschapv2-client-1.0.6.tar.gz
Algorithm Hash digest
SHA256 543905f8c7e0d3291a0f6d6b13bacf1997f8ea773b74e5684c3d20a3f2db5c1e
MD5 2b16a2a7eb42cdddd23c68d0023ec189
BLAKE2b-256 4c7e753285f5725c46933dc687bec317cdd17270df646316bceb8e7f5679ee30

See more details on using hashes here.

File details

Details for the file radius_eap_mschapv2_client-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for radius_eap_mschapv2_client-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fcebe762c673fa3ed70cc99353a04a35c9356f7d46896eded2ccdf31b832e278
MD5 2cc8b3a71ce5b4229eb19651c118e564
BLAKE2b-256 b53bc40c14118ba6cf3eb3e30d3fc0503d5e12066bc2b23c096d69177d573ce7

See more details on using hashes here.

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