Skip to content

Commit d894890

Browse files
Refactoring
1 parent 25fad9e commit d894890

63 files changed

Lines changed: 829 additions & 1048 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/CHANGELOG.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ All notable changes to this project will be documented in this file. The format
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Migrated from `PeterO.Cbor` to `System.Formats.Cbor`.
13+
- Moved the `System.DirectoryServices.ActiveDirectory` dependency from `DSInternals.Common` to `DSInternals.ADSI`.
14+
- Major `DSInternals.Replication` and `DSInternals.SAM` code cleanup may result in breaking changes.
15+
- Removed the broken `-Protocol` parameter from replication cmdlets.
16+
1017
## [6.1.1] - 2025-08-19
1118

1219
### Fixed
@@ -112,7 +119,7 @@ All notable changes to this project will be documented in this file. The format
112119
- Added the [Get-ADDBDnsResourceRecord](PowerShell/Get-ADDBDnsResourceRecord.md#get-addbdnsresourcerecord) cmdlet for retrieving DNS resource records from `ntds.dit` files.
113120
- The [Get-ADDBAccount](PowerShell/Get-ADDBAccount.md#get-addbaccount), [Get-ADReplAccount](PowerShell/Get-ADReplAccount.md#get-adreplaccount), and [Get-ADSIAccount](PowerShell/Get-ADSIAccount.md#get-adsiaccount) cmdlets have a new parameter called `-Properties` for specifying the properties to be fetched, which greatly increases the performance.
114121
- The [Get-ADDBAccount](PowerShell/Get-ADDBAccount.md#get-addbaccount) and [Get-ADReplAccount](PowerShell/Get-ADReplAccount.md#get-adreplaccount) cmdlets have a new parameter called `-ExportFormat`, which replaces the `Format-Custom` cmdlet when exporting data to `hashcat`, `pwdump`, and other formats.
115-
- Legacy LAPS and Windows LAPS cleartext passwords can now be extracted from `ntds.dit` files using the [Get-ADDBAccount](PowerShell/Get-ADDBAccount.md#get-addbaccount) cmdlet.
122+
- Legacy LAPS and Windows LAPS cleartext passwords can now be extracted from `ntds.dit` files using the [Get-ADDBAccount](PowerShell/Get-ADDBAccount.md#get-addbaccount) cmdlet.
116123
- More user and computer attributes can optionally be retrieved by the [Get-ADDBAccount](PowerShell/Get-ADDBAccount.md#get-addbaccount), [Get-ADReplAccount](PowerShell/Get-ADReplAccount.md#get-adreplaccount), and [Get-ADSIAccount](PowerShell/Get-ADSIAccount.md#get-adsiaccount) cmdlets, including email addresses, phone numbers, managers, and OS versions.
117124

118125
## [4.16] - 2025-01-05
@@ -189,7 +196,7 @@ This is a PowerShell-only release.
189196

190197
### Fixed
191198

192-
- Fixed Kerberos PBKDF2 salt derivation for service accounts in the [ConvertTo-KerberosKey](PowerShell/ConvertTo-KerberosKey.md#convertto-kerberoskey) cmdlet and the corresponding
199+
- Fixed Kerberos PBKDF2 salt derivation for service accounts in the [ConvertTo-KerberosKey](PowerShell/ConvertTo-KerberosKey.md#convertto-kerberoskey) cmdlet and the corresponding
193200
[KerberosKeyDerivation](../Src/DSInternals.Common/Cryptography/KerberosKeyDerivation.cs) class.
194201

195202
## [4.10] - 2023-09-16
@@ -315,7 +322,7 @@ This is a PowerShell-only release.
315322

316323
### Added
317324

318-
- The [Test-PasswordQuality](PowerShell/Test-PasswordQuality.md#test-passwordquality) cmdlet now contains a check for accounts that require smart card authentication and have a password at the same time.
325+
- The [Test-PasswordQuality](PowerShell/Test-PasswordQuality.md#test-passwordquality) cmdlet now contains a check for accounts that require smart card authentication and have a password at the same time.
319326

320327
### Fixed
321328

@@ -476,14 +483,14 @@ This is a [Chocolatey](https://chocolatey.org/packages/dsinternals-psmodule)-onl
476483
## [2.21.2] - 2017-04-19
477484
### Fixed
478485
- [Framework] Fixed a bug in roamed credentials processing.
479-
- [Module] Fixed a bug in hexadecimal parameter parsing.
486+
- [Module] Fixed a bug in hexadecimal parameter parsing.
480487

481488
## [2.21.1] - 2017-04-14
482489
### Fixed
483490
- Fixed a bug in linked value replication.
484491

485492
## [2.21] - 2017-03-25
486-
- [Module] The replication cmdlets now use Kerberos authentication by default.
493+
- [Module] The replication cmdlets now use Kerberos authentication by default.
487494
- [Module] Added support for roamed credentials.
488495
- [Module] Cmdlets now accept hashes in both byte array and hexadecimal string forms.
489496
- [Framework] Added support for linked value retrieval.
@@ -518,7 +525,7 @@ This is a [Chocolatey](https://chocolatey.org/packages/dsinternals-psmodule)-onl
518525
- [Module] Added support for the the UserAccountControl attribute of user accounts.
519526
- [Framework] Added the ability to replicate user accounts by specifying their UPN.
520527
- [Framework] Added the ability to calculate a NT hash from both String and SecureString.
521-
- [Framework] Added the `HashEqualityComparer`, which allows the hashes to be stored
528+
- [Framework] Added the `HashEqualityComparer`, which allows the hashes to be stored
522529
in the built-in generic collections.
523530

524531
## [2.15] - 2016-06-18

Src/DSInternals.ADSI/packages.lock.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
},
4343
"System.Formats.Asn1": {
4444
"type": "Transitive",
45-
"resolved": "9.0.8",
46-
"contentHash": "gGL0gt2nAArsF2oOMFzClll6QN2FhtooTxEQ+K26uer4lrhahnYIo/qOn5HUSfjHlM91646L5/7dYIMJ86fHkQ==",
45+
"resolved": "9.0.9",
46+
"contentHash": "hnQCFWPAvZM45fFEExgbHTgq6GyfyQdHxyI+PvuzqI1G7KvBYcnNEPHbLJ+1jP+Ip69yBvvUOxaibmDInmOw2Q==",
4747
"dependencies": {
4848
"System.Buffers": "4.5.1",
4949
"System.Memory": "4.5.5",
@@ -52,8 +52,8 @@
5252
},
5353
"System.Formats.Cbor": {
5454
"type": "Transitive",
55-
"resolved": "9.0.8",
56-
"contentHash": "DelHsgpxWFqcmlDkqceKSZY0kqs0N/Rdg3isJDWtZP9atnxstPWwfsxZVtjf41wizxFVkmUpV4zxFL39lcR7MA==",
55+
"resolved": "9.0.9",
56+
"contentHash": "typxwjuGJyooPZNwInKvEBB/qXwGFoXDH+2gEP0YidaK/qwcrbHl0naeE1O3A2Xn30cCVl79G/v/+ta2eJxh1w==",
5757
"dependencies": {
5858
"Microsoft.Bcl.HashCode": "1.1.1",
5959
"System.Buffers": "4.5.1",
@@ -134,8 +134,8 @@
134134
"type": "Project",
135135
"dependencies": {
136136
"System.Buffers": "[4.6.1, )",
137-
"System.Formats.Asn1": "[9.0.8, )",
138-
"System.Formats.Cbor": "[9.0.8, )",
137+
"System.Formats.Asn1": "[9.0.9, )",
138+
"System.Formats.Cbor": "[9.0.9, )",
139139
"System.Memory": "[4.6.3, )",
140140
"System.Text.Json": "[9.0.8, )",
141141
"System.ValueTuple": "[4.6.1, )"
@@ -171,13 +171,13 @@
171171
},
172172
"System.Formats.Cbor": {
173173
"type": "Transitive",
174-
"resolved": "9.0.8",
175-
"contentHash": "DelHsgpxWFqcmlDkqceKSZY0kqs0N/Rdg3isJDWtZP9atnxstPWwfsxZVtjf41wizxFVkmUpV4zxFL39lcR7MA=="
174+
"resolved": "9.0.9",
175+
"contentHash": "typxwjuGJyooPZNwInKvEBB/qXwGFoXDH+2gEP0YidaK/qwcrbHl0naeE1O3A2Xn30cCVl79G/v/+ta2eJxh1w=="
176176
},
177177
"dsinternals.common": {
178178
"type": "Project",
179179
"dependencies": {
180-
"System.Formats.Cbor": "[9.0.8, )"
180+
"System.Formats.Cbor": "[9.0.9, )"
181181
}
182182
}
183183
}

Src/DSInternals.Common.Test/packages.lock.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@
202202
},
203203
"System.Formats.Asn1": {
204204
"type": "Transitive",
205-
"resolved": "9.0.8",
206-
"contentHash": "gGL0gt2nAArsF2oOMFzClll6QN2FhtooTxEQ+K26uer4lrhahnYIo/qOn5HUSfjHlM91646L5/7dYIMJ86fHkQ==",
205+
"resolved": "9.0.9",
206+
"contentHash": "hnQCFWPAvZM45fFEExgbHTgq6GyfyQdHxyI+PvuzqI1G7KvBYcnNEPHbLJ+1jP+Ip69yBvvUOxaibmDInmOw2Q==",
207207
"dependencies": {
208208
"System.Buffers": "4.5.1",
209209
"System.Memory": "4.5.5",
@@ -212,8 +212,8 @@
212212
},
213213
"System.Formats.Cbor": {
214214
"type": "Transitive",
215-
"resolved": "9.0.8",
216-
"contentHash": "DelHsgpxWFqcmlDkqceKSZY0kqs0N/Rdg3isJDWtZP9atnxstPWwfsxZVtjf41wizxFVkmUpV4zxFL39lcR7MA==",
215+
"resolved": "9.0.9",
216+
"contentHash": "typxwjuGJyooPZNwInKvEBB/qXwGFoXDH+2gEP0YidaK/qwcrbHl0naeE1O3A2Xn30cCVl79G/v/+ta2eJxh1w==",
217217
"dependencies": {
218218
"Microsoft.Bcl.HashCode": "1.1.1",
219219
"System.Buffers": "4.5.1",
@@ -308,8 +308,8 @@
308308
"type": "Project",
309309
"dependencies": {
310310
"System.Buffers": "[4.6.1, )",
311-
"System.Formats.Asn1": "[9.0.8, )",
312-
"System.Formats.Cbor": "[9.0.8, )",
311+
"System.Formats.Asn1": "[9.0.9, )",
312+
"System.Formats.Cbor": "[9.0.9, )",
313313
"System.Memory": "[4.6.3, )",
314314
"System.Text.Json": "[9.0.8, )",
315315
"System.ValueTuple": "[4.6.1, )"
@@ -509,8 +509,8 @@
509509
},
510510
"System.Formats.Cbor": {
511511
"type": "Transitive",
512-
"resolved": "9.0.8",
513-
"contentHash": "DelHsgpxWFqcmlDkqceKSZY0kqs0N/Rdg3isJDWtZP9atnxstPWwfsxZVtjf41wizxFVkmUpV4zxFL39lcR7MA=="
512+
"resolved": "9.0.9",
513+
"contentHash": "typxwjuGJyooPZNwInKvEBB/qXwGFoXDH+2gEP0YidaK/qwcrbHl0naeE1O3A2Xn30cCVl79G/v/+ta2eJxh1w=="
514514
},
515515
"System.Memory": {
516516
"type": "Transitive",
@@ -543,7 +543,7 @@
543543
"dsinternals.common": {
544544
"type": "Project",
545545
"dependencies": {
546-
"System.Formats.Cbor": "[9.0.8, )"
546+
"System.Formats.Cbor": "[9.0.9, )"
547547
}
548548
}
549549
}

Src/DSInternals.Common/DSInternals.Common.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
<PrivateAssets>all</PrivateAssets>
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2323
</PackageReference>
24-
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183">
24+
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.205">
2525
<PrivateAssets>all</PrivateAssets>
2626
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2727
</PackageReference>
28-
<PackageReference Include="System.Formats.Cbor" Version="9.0.8" />
28+
<PackageReference Include="System.Formats.Cbor" Version="9.0.9" />
2929
<PackageReference Include="System.Buffers" Version="4.6.1" Condition="'$(TargetFramework)' == 'net48'" />
30-
<PackageReference Include="System.Formats.Asn1" Version="9.0.8" Condition="'$(TargetFramework)' == 'net48'" />
30+
<PackageReference Include="System.Formats.Asn1" Version="9.0.9" Condition="'$(TargetFramework)' == 'net48'" />
3131
<PackageReference Include="System.Memory" Version="4.6.3" Condition="'$(TargetFramework)' == 'net48'" />
3232
<PackageReference Include="System.ValueTuple" Version="4.6.1" Condition="'$(TargetFramework)' == 'net48'" />
3333
<PackageReference Include="System.Text.Json" Version="9.0.8" Condition="'$(TargetFramework)' == 'net48'" />

Src/DSInternals.Common/Interop/Enums/GroupKeyLevel.cs renamed to Src/DSInternals.Common/Data/DPAPI/GroupKeyLevel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace DSInternals.Common.Interop
1+
namespace DSInternals.Common.Data
22
{
33
/// <see>https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-gkdi/4cac87a3-521e-4918-a272-240f8fabed39</see>
44
internal enum GroupKeyLevel : uint

Src/DSInternals.Common/Data/DPAPI/KdsRootKey.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
using System;
2-
using System.Collections.Concurrent;
3-
using System.Collections.Generic;
4-
using System.IO;
1+
using System.Collections.Concurrent;
52
using System.Text;
63
using DSInternals.Common.Interop;
74
using DSInternals.Common.Schema;

Src/DSInternals.Common/Data/DistinguishedName.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class DistinguishedName
1515
private const char dnsNameSeparator = '.';
1616

1717
private List<DistinguishedNameComponent> components = new List<DistinguishedNameComponent>();
18-
18+
1919
public IReadOnlyList<DistinguishedNameComponent> Components
2020
{
2121
get
@@ -239,7 +239,6 @@ private static string[] SplitDN(string dn, bool isRDN)
239239
if (inQuotes)
240240
{
241241
// Unpaired quotes
242-
// TODO: Extract as resource
243242
throw new ArgumentException("Error parsing distinguished name.", "dn");
244243
}
245244
// Add the last segment to the list

Src/DSInternals.Common/Interop/Enums/NetCancelOptions.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.

Src/DSInternals.Common/Interop/Enums/NetConnectOptions.cs

Lines changed: 0 additions & 53 deletions
This file was deleted.

Src/DSInternals.Common/Interop/Enums/NetResourceDisplayType.cs

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)