@@ -155,6 +155,27 @@ public static void DumpImports(PE Pe)
155
155
VerboseWriteLine ( "[-] Import listing done" ) ;
156
156
}
157
157
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
+
158
179
159
180
static void Main ( string [ ] args )
160
181
{
@@ -169,7 +190,13 @@ static void Main(string[] args)
169
190
if ( ProgramArgs . ContainsKey ( "-verbose" ) )
170
191
VerboseOutput = true ;
171
192
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
+
173
200
if ( ProgramArgs . ContainsKey ( "-knowndll" ) )
174
201
{
175
202
DumpKnownDlls ( ) ;
0 commit comments