Skip to content

Commit

Permalink
[ClrPhTester] Add a help usage for ClrPhTester
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasg committed Oct 14, 2017
1 parent 9d38d6f commit 25ceb93
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion ClrPhTester/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,27 @@ public static void DumpImports(PE Pe)
VerboseWriteLine("[-] Import listing done");
}

public static void DumpUsage()
{
string Usage = String.Join(Environment.NewLine,
"ClrPhTester.exe : COFF/PE dumper tool (kinda like dumpbin).",
"",
"Usage : ClrPhTester.exe [OPTIONS] FILE",
"",
"Options :",
" -h -help : display this help",
" -verbose : activate human centric output.",
" -apisets : display the ApiSet schema (api set dll -> host dll)",
" -knowndll : display all the known dlls (x86 and x64)",
" -manifest : display the FILE embedded manifest, if it exists.",
" -sxsentries : display all the FILE's sxs dependencies.",
" -imports : display the FILE imports",
" -exports : display the FILE exports"
);

Console.WriteLine(Usage);
}


static void Main(string[] args)
{
Expand All @@ -169,7 +190,13 @@ static void Main(string[] args)
if (ProgramArgs.ContainsKey("-verbose"))
VerboseOutput = true;

// no need to load PE for it
// no need to load PE for those commands
if ((args.Length == 0) || ProgramArgs.ContainsKey("-h") || ProgramArgs.ContainsKey("-help"))
{
DumpUsage();
return;
}

if (ProgramArgs.ContainsKey("-knowndll"))
{
DumpKnownDlls();
Expand Down

0 comments on commit 25ceb93

Please sign in to comment.