mirror of
https://github.com/GhostPack/SharpDPAPI
synced 2026-06-08 11:11:23 +00:00
39 lines
1.2 KiB
C#
Executable File
39 lines
1.2 KiB
C#
Executable File
using SharpDPAPI.Domain;
|
|
using System;
|
|
|
|
namespace SharpDPAPI
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
try
|
|
{
|
|
Info.Logo();
|
|
|
|
// try to parse the command line arguments, show usage on failure and then bail
|
|
var parsed = ArgumentParser.Parse(args);
|
|
if (parsed.ParsedOk == false)
|
|
Info.ShowUsage();
|
|
else
|
|
{
|
|
// Try to execute the command using the arguments passed in
|
|
|
|
var commandName = args.Length != 0 ? args[0] : "";
|
|
|
|
var commandFound = new CommandCollection().ExecuteCommand(commandName, parsed.Arguments);
|
|
|
|
// show the usage if no commands were found for the command name
|
|
if (commandFound == false)
|
|
Info.ShowUsage();
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Console.WriteLine("\r\n[!] Unhandled SharpDPAPI exception:\r\n");
|
|
Console.WriteLine(e);
|
|
}
|
|
}
|
|
}
|
|
}
|