Skip to content

Instantly share code, notes, and snippets.

View kosua20's full-sized avatar
🐉
Rendering

Simon Rodriguez kosua20

🐉
Rendering
View GitHub Profile
@meziantou
meziantou / CredentialManager.cs
Last active March 12, 2024 02:35
Using the Windows Credential API (CredRead, CredWrite, CredDelete, CredEnumerate).
// The most up to date version is available
// on GitHub: https://github.com/meziantou/Meziantou.Framework/tree/master/src/Meziantou.Framework.Win32.CredentialManager
// NuGet package: https://www.nuget.org/packages/Meziantou.Framework.Win32.CredentialManager/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Text;
using Microsoft.Win32.SafeHandles;
@nzbart
nzbart / CredWriteAndReadWithProfileLoad.cpp
Last active February 26, 2021 03:27
Read / write credentials through CredRead and CredWrite, with a profile load for good measure. Fails under PowerShell remoting.
#include <SDKDDKVer.h>
#include <tchar.h>
#include <Windows.h>
#include <WinCred.h>
#include <Userenv.h>
#include <atlsecurity.h>
#include <Lmcons.h>
#include <iostream>