pydsinternals - A Python native library containing necessary classes, functions and structures to interact with Windows Active Directory.

Overview



pydsinternals - Directory Services Internals Library

MIT License PyPI - Python Version PyPI Build Status

A Python native library containing necessary classes, functions and structures to interact with Windows Active Directory.

Installation

python3 -m pip install dsinternals

Contributing

Pull requests are welcome. Feel free to open an issue if you want to add other features.

Credits

This code base was heavily inspired by MichaelGrafnetter's DS Internals library.

References

You might also like...
A repository containing several general purpose Python scripts to automate daily and common tasks.

General Purpose Scripts Introduction This repository holds a curated list of Python scripts which aim to help us automate daily and common tasks. You

Astvuln is a simple AST scanner which recursively scans a directory, parses each file as AST and runs specified method.

Astvuln Astvuln is a simple AST scanner which recursively scans a directory, parses each file as AST and runs specified method. Some search methods ar

A utility that makes it easy to work with Python projects containing lots of packages, of which you only want to develop some.

Mixed development source packages on top of stable constraints using pip mxdev [mɪks dɛv] is a utility that makes it easy to work with Python projects

A work in progress box containing various Python utilities

python-wipbox A set of modern Python libraries under development to simplify the execution of reusable routines by different projects. Table of Conten

Python Classes Without Boilerplate

attrs is the Python package that will bring back the joy of writing classes by relieving you from the drudgery of implementing object protocols (aka d

A simple python script to generate an iCalendar file for the university classes.
A simple python script to generate an iCalendar file for the university classes.

iCal Generator This is a simple python script to generate an iCalendar file for the university classes. Installation Clone the repository git clone ht

Allows you to canibalize methods from classes effectively implementing trait-oriented programming

About This package enables code reuse in non-inheritance way from existing classes, effectively implementing traits-oriented programming pattern. Stor

Helpful functions for use alongside the rich Python library.

🔧 Rich Tools A python package with helpful functions for use alongside with the rich python library. 󠀠󠀠 The current features are: Convert a Pandas

A simple and easy to use collection of random python functions.

A simple and easy to use collection of random python functions.

Comments
  • Why `DateTime` dependency?

    Why `DateTime` dependency?

    Why do you need the DateTime module instead of the builtin datetime? And especially when you don't use it and overrides it with your own DateTime class... 😅

    https://github.com/p0dalirius/pydsinternals/blob/69ff94b91b4cbf03df4ea0d3231d898781a0382f/requirements.txt#L2

    The DateTime module specifically states that it probably shouldn't be used in most cases:

    This package provides a DateTime data type, as known from Zope. Unless you need to communicate with Zope APIs, you're probably better off using Python's built-in datetime module.

    opened by bastantoine 1
  • Catch OverflowError in KeyCredential

    Catch OverflowError in KeyCredential

    During a test I've used Pywhisker to list msKey credential attributes and this library threw an error on the KeyCreationTime. This pull requests catches this error for this specific key. And this solves the problem I had with Pywhisker.

    opened by mwgielen 0
  • Pythonic improvements on the tests

    Pythonic improvements on the tests

    Improved a bit the tests, especially how they are launched:

    • Used unittests.main() instead of instantiating the class and running the tests one by one. This basically is the same, but a bit more pythonic
    • Used __init__.py files to be able to use absolute imports in the tests files instead of using a symlink
    opened by bastantoine 0
  • KeyCredential Timestamp - OverflowError: date value out of range

    KeyCredential Timestamp - OverflowError: date value out of range

    Hello, while using the tool pywhisker I was able to retrieve credential information from an AD environment. There are two credentials linked to the account in question and for both the following Traceback is thrown:

    Traceback (most recent call last): File "/home/unprivileged/tools/pywhisker/pywhisker.py", line 824, in main shadowcreds.list() File "/home/unprivileged/tools/pywhisker/pywhisker.py", line 320, in list keyCredential = KeyCredential.fromDNWithBinary(DNWithBinary.fromRawDNWithBinary(dn_binary_value)) File "/usr/local/lib/python3.9/dist-packages/dsinternals-1.2.4-py3.9.egg/dsinternals/common/data/hello/KeyCredential.py", line 233, in fromDNWithBinary _KeyCreationTime = ConvertFromBinaryTime(entry["data"], _KeySource, _Version) File "/usr/local/lib/python3.9/dist-packages/dsinternals-1.2.4-py3.9.egg/dsinternals/Utils.py", line 61, in ConvertFromBinaryTime return DateTime(timeStamp) File "/usr/local/lib/python3.9/dist-packages/dsinternals-1.2.4-py3.9.egg/dsinternals/system/DateTime.py", line 31, in init self.Value = datetime.datetime(1601, 1, 1, 0, 0, 0) + datetime.timedelta(seconds=ticks / 1e7) OverflowError: date value out of range [!] date value out of range

    It seems the date is out of range, do you know by any chance how such a date could be included in the binary or how I could troubleshoot the issue?

    Thanks a lot!

    opened by sro-nviso 0
Releases(1.2.4)
  • 1.2.4(Aug 1, 2021)

  • 1.2.3(Jul 29, 2021)

    First release of the library !

    Currently implemented :

    dsinternals.common.cryptography.RSAKeyMaterial
    dsinternals.common.cryptography.X509Certificate2
    dsinternals.common.data.DNWithBinary
    dsinternals.common.data.hello.CustomKeyInformation
    dsinternals.common.data.hello.CustomKeyInformationVolumeType
    dsinternals.common.data.hello.KeyCredential
    dsinternals.common.data.hello.KeyCredentialEntryType
    dsinternals.common.data.hello.KeyCredentialVersion
    dsinternals.common.data.hello.KeyFlags
    dsinternals.common.data.hello.KeySource
    dsinternals.common.data.hello.KeyStrength
    dsinternals.common.data.hello.KeyUsage
    dsinternals.system.DateTime
    dsinternals.system.Guid
    dsinternals.Utils
    
    Source code(tar.gz)
    Source code(zip)
    dsinternals-1.2.3-py3-none-any.whl(26.97 KB)
Owner
Podalirius
Security Researcher
Podalirius
Cleaning-utils - a collection of small Python functions and classes which make cleaning pipelines shorter and easier

cleaning-utils [] [] [] cleaning-utils is a collection of small Python functions

null 4 Aug 31, 2022
Python @deprecat decorator to deprecate old python classes, functions or methods.

deprecat Decorator Python @deprecat decorator to deprecate old python classes, functions or methods. Installation pip install deprecat Usage To use th

null 12 Dec 12, 2022
Pyfunctools is a module that provides functions, methods and classes that help in the creation of projects in python

Pyfunctools Pyfunctools is a module that provides functions, methods and classes that help in the creation of projects in python, bringing functional

Natanael dos Santos Feitosa 5 Dec 22, 2022
Keval allows you to call arbitrary Windows kernel-mode functions from user mode, even (and primarily) on another machine.

Keval Keval allows you to call arbitrary Windows kernel-mode functions from user mode, even (and primarily) on another machine. The user mode portion

null 42 Dec 17, 2022
Find dependent python scripts of a python script in a project directory.

Find dependent python scripts of a python script in a project directory.

null 2 Dec 5, 2021
A Python utility belt containing simple tools, a stdlib like feel, and extra batteries. Hashing, Caching, Timing, Progress, and more made easy!

Ubelt is a small library of robust, tested, documented, and simple functions that extend the Python standard library. It has a flat API that all behav

Jon Crall 638 Dec 13, 2022
Small project to interact with python, C, HTML, JavaScript, PHP.

Micro Hidroponic Small project to interact with python, C, HTML, JavaScript, PHP. Table of Contents General Info Technologies Used Screenshots Usage P

Filipe Martins 1 Nov 10, 2021
Install, run, and update apps without root and only in your home directory

Qube Apps Install, run, and update apps in the private storage of a Qube Building instrutions

Micah Lee 26 Dec 27, 2022
Install, run, and update apps without root and only in your home directory

Qube Apps Install, run, and update apps in the private storage of a Qube. Build and install in Qubes Get the code: git clone https://github.com/micahf

Micah Lee 26 Dec 27, 2022
Tools to connect to and interact with the Mila cluster

milatools The milatools package provides the mila command, which is meant to help with connecting to and interacting with the Mila cluster. Install Re

Mila 32 Dec 1, 2022