mirror of
https://github.com/GhostPack/SharpDPAPI
synced 2026-06-08 11:11:23 +00:00
-Added remote server support for user triage functions -Added machine triage (machinemasterkeys, machinecredentials, machinevaults, machinetriage) -Expanded Vault credential format to handle vault credential clear attributes -Expanded machine vault/credential search locations -Broke out commands/files into the same general structure as Rubeus P.S. this release was a huge PITA, hopefully it's appreciated ;) Much <3 to @gentilkiwi for his excellent examples, and @tifkin_ for inspiring this work!
32 lines
928 B
C#
Executable File
32 lines
928 B
C#
Executable File
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
|
|
namespace SharpDPAPI.Domain
|
|
{
|
|
public static class ArgumentParser
|
|
{
|
|
public static ArgumentParserResult Parse(IEnumerable<string> args)
|
|
{
|
|
var arguments = new Dictionary<string, string>();
|
|
try
|
|
{
|
|
foreach (var argument in args)
|
|
{
|
|
var idx = argument.IndexOf(':');
|
|
if (idx > 0)
|
|
arguments[argument.Substring(0, idx)] = argument.Substring(idx + 1);
|
|
else
|
|
arguments[argument] = string.Empty;
|
|
}
|
|
|
|
return ArgumentParserResult.Success(arguments);
|
|
}
|
|
catch (System.Exception ex)
|
|
{
|
|
Debug.WriteLine(ex.Message);
|
|
return ArgumentParserResult.Failure();
|
|
}
|
|
}
|
|
}
|
|
}
|