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
A python program to find binary, octal and hexadecimal of a decimal.

decimal-converter This little python program can convert a decimal in to, Binary Octal Hexadecimal Needed Python 3 or later or a online python compile

Chandula Janith 0 Nov 27, 2021
Package that allows for validate and sanitize of string values.

py.validator A library of string validators and sanitizers Insipired by validator.js Strings only This library validates and sanitizes strings only. P

Sanel Hadzini 22 Nov 08, 2022
Pampy: The Pattern Matching for Python you always dreamed of.

Pampy: Pattern Matching for Python Pampy is pretty small (150 lines), reasonably fast, and often makes your code more readable and hence easier to rea

Claudio Santini 3.5k Jan 06, 2023
Experimental python optimistic rollup fraud-proof generation

Macula Experimental python optimistic rollup fraud-proof generation tech by @protolambda. Working on a python version for brevity and simplicity. See

Diederik Loerakker 30 Sep 01, 2022
Finger is a function symbol recognition engine for binary programs

Finger is a function symbol recognition engine for binary programs

332 Jan 01, 2023
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

GDSC RCCIIT 46 Dec 25, 2022
A random cats photos python module

A random cats photos python module

Fayas Noushad 6 Dec 01, 2021
MITRE ATT&CK Lookup Tool

MITRE ATT&CK Lookup Tool attack-lookup is a tool that lets you easily check what Tactic, Technique, or Sub-technique ID maps to what name, and vice ve

Curated Intel 33 Nov 22, 2022
Conveniently measures the time of your loops, contexts and functions.

Conveniently measures the time of your loops, contexts and functions.

Maciej J Mikulski 79 Nov 15, 2022
A monitor than send discord webhook when a specific monitored product has stock in your nearby pickup stores.

Welcome to Apple In-store Monitor This is a monitor that are not fully scaled, and might still have some bugs.

5 Jun 16, 2022
A multipurpose python module

pysherlock pysherlock is a Python library for dealing with web scraping using images, it's a Python application of the rendertron headless browser API

Sachit 2 Nov 11, 2021
A Python package implementing various colour checker detection algorithms and related utilities.

A Python package implementing various colour checker detection algorithms and related utilities.

colour-science 147 Dec 29, 2022
EthTx - Ethereum transactions decoder

EthTx - Ethereum transactions decoder Installation pip install ethtx Requirements The package needs a few external resources, defined in EthTxConfig o

398 Dec 25, 2022
Abstraction of a Unit, includes convertions and basic operations.

Units Abstraction of a Unit, includes convertions and basic operations. ------ EXAMPLE : Free Fall (No air resistance) ------- from units_test import

1 Dec 23, 2021
Export watched content from Tautulli to the Letterboxd CSV Import Format

Export watched content from Tautulli to the Letterboxd CSV Import Format

Evan J 5 Aug 31, 2022
Minimal Windows system information tool written in Python

wfetch wfetch is a Minimal Windows system information tool written in Python (Only works on Windows) Installation First of all have python installed.

zJairO 3 Jan 24, 2022
This script allows you to retrieve all functions / variables names of a Python code, and the variables values.

Memory Extractor This script allows you to retrieve all functions / variables names of a Python code, and the variables values. How to use it ? The si

Venax 2 Dec 26, 2021
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

12 Dec 12, 2022
Aggregating gridded data (xarray) to polygons

A package to aggregate gridded data in xarray to polygons in geopandas using area-weighting from the relative area overlaps between pixels and polygons.

Kevin Schwarzwald 42 Nov 09, 2022
An extremely simple package with a single utillity class used for gracefully handling POSIX shutdown signals.

graceful-killer An extremely simple package with a single utillity class used for gracefully handling POSIX shutdown signals. Installation Use pip to

Sven Ćurković 1 Dec 09, 2021