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
Helper script to bootstrap a Python environment with the tools required to build and install packages.

python-bootstrap Helper script to bootstrap a Python environment with the tools required to build and install packages. Usage $ python -m bootstrap.bu

Filipe Laíns 7 Oct 06, 2022
Customized python validations.

A customized python validations.

Wilfred V. Pine 2 Apr 20, 2022
A python module to manipulate XCode projects

This module can read, modify, and write a .pbxproj file from an Xcode 4+ projects. The file is usually called project.pbxproj and can be found inside the .xcodeproj bundle. Because some task cannot b

Ignacio Calderon 1.1k Jan 02, 2023
A clock app, which helps you with routine tasks.

Clock This app helps you with routine tasks. Alarm Clock Timer Stop Watch World Time (Which city you want) About me Full name: Matin Ardestani Age: 14

Matin Ardestani 13 Jul 30, 2022
Runes - Simple Cookies You Can Extend (similar to Macaroons)

Runes - Simple Cookies You Can Extend (similar to Macaroons) is a paper called "Macaroons: Cookies with Context

Rusty Russell 22 Dec 11, 2022
Produce a simulate-able SDF of an arbitrary mesh with convex decomposition.

Mesh-to-SDF converter Given a (potentially nasty, nonconvex) mesh, automatically creates an SDF file that describes that object. The visual geometry i

Greg Izatt 22 Nov 23, 2022
A collection of custom scripts for working with Quake assets.

Custom Quake Tools A collection of custom scripts for working with Quake assets. Features Script to list all BSP files in a Quake mod

Jason Brownlee 3 Jul 05, 2022
Casefy (/keɪsfaɪ/) is a lightweight Python package to convert the casing of strings

Casefy (/keɪsfaɪ/) is a lightweight Python package to convert the casing of strings. It has no third-party dependencies and supports Unicode.

Diego Miguel Lozano 12 Jan 08, 2023
A plugin to simplify creating multi-page Dash apps

Multi-Page Dash App Plugin A plugin to simplify creating multi-page Dash apps. This is a preview of functionality that will of Dash 2.1. Background Th

Plotly 19 Dec 09, 2022
A fast Python implementation of Ac Auto Mechine

A fast Python implementation of Ac Auto Mechine

Jin Zitian 1 Dec 07, 2021
Teleport Ur Logs with Love

Whatever you pipe into tull, will get a unique UUID and the data gets stored locally - accessible via a flask server with simple endpoints. You can use ngrok or localtunnel then to share it outside L

Lokendra Sharma 11 Jul 30, 2021
Run async workflows using pytest-fixtures-style dependency injection

Run async workflows using pytest-fixtures-style dependency injection

Simon Willison 26 Jun 26, 2022
A fancy and practical functional tools

Funcy A collection of fancy functional tools focused on practicality. Inspired by clojure, underscore and my own abstractions. Keep reading to get an

Alexander Schepanovski 2.9k Jan 07, 2023
Fcpy: A Python package for high performance, fast convergence and high precision numerical fractional calculus computing.

Fcpy: A Python package for high performance, fast convergence and high precision numerical fractional calculus computing.

SciFracX 1 Mar 23, 2022
Retrying is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just about anything.

Retrying Retrying is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just

Ray Holder 1.9k Dec 29, 2022
PyGMT - A Python interface for the Generic Mapping Tools

PyGMT A Python interface for the Generic Mapping Tools Documentation (development version) | Contact | Try Online Why PyGMT? A beautiful map is worth

The Generic Mapping Tools (GMT) 564 Dec 28, 2022
A morse code encoder and decoder utility.

morsedecode A morse code encoder and decoder utility. Installation Install it via pip: pip install morsedecode Alternatively, you can use pipx to run

Tushar Sadhwani 2 Dec 25, 2021
API Rate Limit Decorator

ratelimit APIs are a very common way to interact with web services. As the need to consume data grows, so does the number of API calls necessary to re

Tomas Basham 575 Jan 05, 2023
Pass arguments by reference—in Python!

byref Pass arguments by reference—in Python! byrefis a decorator that allows Python functions to declare reference parameters, with similar semantics

9 Feb 10, 2022
A collection of common regular expressions bundled with an easy to use interface.

CommonRegex Find all times, dates, links, phone numbers, emails, ip addresses, prices, hex colors, and credit card numbers in a string. We did the har

Madison May 1.5k Dec 31, 2022