Skip to content

Commit 25ceb93

Browse files
committed
[ClrPhTester] Add a help usage for ClrPhTester
1 parent 9d38d6f commit 25ceb93

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

ClrPhTester/Program.cs

+28-1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,27 @@ public static void DumpImports(PE Pe)
155155
VerboseWriteLine("[-] Import listing done");
156156
}
157157

158+
public static void DumpUsage()
159+
{
160+
string Usage = String.Join(Environment.NewLine,
161+
"ClrPhTester.exe : COFF/PE dumper tool (kinda like dumpbin).",
162+
"",
163+
"Usage : ClrPhTester.exe [OPTIONS] FILE",
164+
"",
165+
"Options :",
166+
" -h -help : display this help",
167+
" -verbose : activate human centric output.",
168+
" -apisets : display the ApiSet schema (api set dll -> host dll)",
169+
" -knowndll : display all the known dlls (x86 and x64)",
170+
" -manifest : display the FILE embedded manifest, if it exists.",
171+
" -sxsentries : display all the FILE's sxs dependencies.",
172+
" -imports : display the FILE imports",
173+
" -exports : display the FILE exports"
174+
);
175+
176+
Console.WriteLine(Usage);
177+
}
178+
158179

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

172-
// no need to load PE for it
193+
// no need to load PE for those commands
194+
if ((args.Length == 0) || ProgramArgs.ContainsKey("-h") || ProgramArgs.ContainsKey("-help"))
195+
{
196+
DumpUsage();
197+
return;
198+
}
199+
173200
if (ProgramArgs.ContainsKey("-knowndll"))
174201
{
175202
DumpKnownDlls();

0 commit comments

Comments
 (0)