Exploit databaseDownload repository ZIP
GH-88d8bc551618926a04536090300b4292
dungnm24/cve-2020-0796
Sources for CVE-2020-0796
81 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files44
dungnm24/cve-2020-0796Revision fe7aebbe1789
- ↑..Parent directory
- Rpc/
- bin/
- obj/
- AccessCheckObjectTree.cs
- ArrayUtility.cs
- ChannelHelper.cs
- Common.csproj
- ConnectionFilter.cs
- DtypAutoGeneratedTypes.cs
- DtypAutoGeneratedTypesExtension.cs
- DtypSecurityStructures.cs
- DtypUtility.cs
- EndianUtility.cs
- EndpointManager.cs
- HRESULT.cs
- IHasInterrelatedFields.cs
- Int3264.cs
- IntPtrUtility.cs
- IpUtility.cs
- LdapExtensions.cs
- Logging.cs
- NativeMethods.cs
- NetApiStatus.cs
- NtStatus.cs
- ObjectUtility.cs
- PacketFilter.cs
- PduMarshaler.cs
- QueueManager.cs
- ReadOnlyDictionary.cs
- Rfc1035Utility.cs
- SafeIntPtr.cs
- StackEvent.cs
- StackException.cs
- StackFilter.cs
- StackPacket.cs
- StackTypes.cs
- SyncFilterQueue.cs
- Token.cs
- TypeCustomAttributeProvider.cs
- TypeMarshal.cs
- TypeMarshalSafeIntPtr.cs
- WellKnownSid.cs
- Win32ErrorCode_16.cs
- Win32ErrorCode_32.cs
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
WindowsProtocolTestSuites/ProtoSDK/Common/LdapExtensions.cs
C# · 2,755 bytes// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Novell.Directory.Ldap;
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.Protocols.TestTools.StackSdk
{
public static class LdapExtensions
{
public static IList<LdapAttribute> GetLdapEntryAttributes(this LdapEntry entry)
{
IList<LdapAttribute> attributes = new List<LdapAttribute>();
LdapAttributeSet attributeSet = entry.GetAttributeSet();
System.Collections.IEnumerator ienum = attributeSet.GetEnumerator();
while (ienum.MoveNext())
{
LdapAttribute attribute = (LdapAttribute)ienum.Current;
attributes.Add(attribute);
}
return attributes;
}
public static Dictionary<string, IList<LdapAttribute>> GetAllLdapEntries(this ILdapSearchResults searchResult)
{
Dictionary<string, IList<LdapAttribute>> entryList = new Dictionary<string, IList<LdapAttribute>>();
while (searchResult.HasMore())
{
var entry = searchResult.Next();
entryList.Add(entry.Dn, entry.GetLdapEntryAttributes());
}
return entryList;
}
public static string GetStringValueFromAttributes(this IList<LdapAttribute> listAttribures, string key)
{
var listQuery = listAttribures.Where(a => a.Name.Equals(key));
if (listQuery.Any())
{
var attribute = listQuery.First();
string attributeVal = attribute.StringValue;
return attributeVal;
}
else
{
return null;
}
}
public static IList<string> GetStringListValueFromAttributes(this IList<LdapAttribute> listAttribures, string key)
{
var listQuery = listAttribures.Where(a => a.Name.Equals(key));
if (listQuery.Any())
{
var attribute = listQuery.First();
return attribute.StringValueArray;
}
else
{
return null;
}
}
public static byte[][] GetBytesValueFromAttributes(this IList<LdapAttribute> listAttribures, string key)
{
var listQuery = listAttribures.Where(a => a.Name.Equals(key));
if (listQuery.Any())
{
var attribute = listQuery.First();
return attribute.ByteValueArray;
}
else
{
return null;
}
}
}
}