forked from GhostPack/SharpDPAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
executable file
·45 lines (38 loc) · 1.36 KB
/
Copy pathProgram.cs
File metadata and controls
executable file
·45 lines (38 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using SharpDPAPI.Domain;
using System;
using System.Diagnostics;
namespace SharpDPAPI
{
class Program
{
public static void Main(string[] args)
{
Stopwatch sw = new Stopwatch();
sw.Start();
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);
}
sw.Stop();
Console.WriteLine("\n\nSharpDPAPI completed in " + sw.Elapsed);
}
}
}