Skip to main content

LDAP protocol module

Project description

Python module to decode ASN1 stream of LDAP message using pyasn1

Install

pip install pyasn1_ldap

Usage

#!/usr/bin/python
from pyasn1.codec.ber.decoder import decode as ber_decoder
from pyasn1_ldap import rfc4511

hex_text = '302f020101602a020103041a41646d696e6973747261746f72404558414d504c45322e434f4d800950617373773072642e'
substrate = bytes.fromhex(hex_text)
ldap_message, rest = ber_decoder(substrate, asn1Spec=rfc4511.LDAPMessage())
print(ldap_message)

# the output should be:
# LDAPMessage:
#  messageID=1
#  protocolOp=Choice:
#   bindRequest=BindRequest:
#    version=3
#    name=Administrator@EXAMPLE2.COM
#    authentication=AuthenticationChoice:
#     simple=Passw0rd.

Thanks

  • Thanks to pyasn1 for implementing ASN.1 types and codecs.

  • Thanks to asn1ate for implementing ASN.1 translation library.

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

pyasn1_ldap-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

pyasn1_ldap-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file pyasn1_ldap-0.1.0.tar.gz.

File metadata

  • Download URL: pyasn1_ldap-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.10

File hashes

Hashes for pyasn1_ldap-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c9981fdf8adb8914cc793ca3b298ce1df40e599c9a176ed0fcc59c59c8a1e407
MD5 8b356d95227730e1da840780cc65d5b9
BLAKE2b-256 c4058dd9164015a0296a8eacfe11dd17847d65816bac527da32afcc4ed6e5482

See more details on using hashes here.

File details

Details for the file pyasn1_ldap-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyasn1_ldap-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.10

File hashes

Hashes for pyasn1_ldap-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa76f83ccc91c2d9c27a16ac7f3c286783c9ad870713f640bff161a3169755ef
MD5 d807fba652fcfc5a6fc2a33b5f277e20
BLAKE2b-256 77445716e946d8ee98d426db4e1953971617906b0ca3800b9182b51087fd2dd6

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