Tag Archives: C#

C# DllImport – Using the C ++ DLL / Windows API

The strong point of C # is that it is easy to import Dll and Windows API developed in C ++ as well as .Net Framework. The part that provides this functionality is DllImport. DllImport is available under the following conditions. It must also be using System.Runtime.InteropServices in Microsoft Visual Studio https://docs.microsoft.com/ko-kr/dotnet/api/system.runtime.interopservices?view=netframework-4.7.2 [DllImport (string dllName) ] public

Read More

C# DirectorySearcher search result more than 1000

When searching Active directory, DirectorySearcher will be used to retrieve information from Active Directory. Below is the code that gets the username information.   string DomainPath = “LDAP://DC=domain,DC=com”; DirectoryEntry searchRoot = new DirectoryEntry(DomainPath); DirectorySearcher search = new DirectorySearcher(searchRoot); search.Filter = “(&(objectClass=user)(objectCategory=person))”; search.PropertiesToLoad.Add(“samaccountname”); SearchResult result; SearchResultCollection resultCol = search.FindAll(); foreach(SearchResult item in resultCol ) { string

Read More

The underlying connection was closed – REST API call over HTTPS

The underlying connection was closed – REST API call over HTTPS {System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. —> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. —> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote

Read More

Windows 파일 무결성 – 파일 해쉬 알고리즘 사용하기(FCIV,FileVerifier)

Windows 파일 무결성 포렌식에 관심 있는 분들을 일부 알고 있듯이 컴퓨터 증거 자료는 법적으로 증거로 인정받기가 어렵다. 전자식으로 되어 있는 데이터는 원본이라는 보장을 하기가 어렵기 때문이다. A라는 파일이 이동되면서 처음 수집한 A라는 것을 증명하기가 쉽지 않다. 우리가 사용하는 무수히 많은 컴퓨터 내의 데이터들은 수시로 변경되고, 그 변경된 내용을 외부에 노출되지 않을 수 있다. 이는 전자

Read More