43{
45 wstring Filepath;
46 string TempFilePath;
48
49 if (CommandTokens.size() <= 2)
50 {
51 ShowMessages("err, incorrect use of the '%s' command\n\n",
54 return;
55 }
56
57
58
59
61 {
62 if (CommandTokens.size() == 3)
63 {
64 ShowMessages("err, incorrect use of the '%s' command\n\n",
67 return;
68 }
69
70 if (CommandTokens.size() != 4)
71 {
72 ShowMessages("err, incorrect use of the '%s' command\n\n",
75 return;
76 }
77 ShowDumpOfSection =
TRUE;
79 }
81 {
82 if (CommandTokens.size() != 3)
83 {
84 ShowMessages("err, incorrect use of the '%s' command\n\n",
87 return;
88 }
89
90 ShowDumpOfSection =
FALSE;
92 }
93 else
94 {
95
96
97
98 ShowMessages("err, couldn't resolve error at '%s'\n\n",
101 return;
102 }
103
104
105
106
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125#ifdef __linux__
126 const WCHAR * FilepathW = (const WCHAR *)Filepath.c_str();
127#else
128 const WCHAR * FilepathW = Filepath.c_str();
129#endif
130
131
132
133
135 {
136
137
138
139 return;
140 }
141
142
143
144
145 if (!ShowDumpOfSection)
146 {
148 }
149 else
150 {
152 }
153}
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
VOID StringToWString(std::wstring &ws, const std::string &s)
convert std::string to std::wstring
Definition common.cpp:850
BOOLEAN CompareLowerCaseStrings(CommandToken TargetToken, const CHAR *StringToCompare)
Compare lower case strings.
Definition common.cpp:503
BOOLEAN PeIsPE32BitOr64Bit(const WCHAR *AddressOfFile, PBOOLEAN Is32Bit)
Detect whether PE is a 32-bit PE or 64-bit PE.
Definition pe-parser.cpp:4483
BOOLEAN PeShowSectionInformationAndDump(const WCHAR *AddressOfFile, const CHAR *SectionToShow, BOOLEAN Is32Bit)
Show information about different sections of PE and the dump of sections.
Definition pe-parser.cpp:3727
VOID CommandPeHelp()
help of the .pe command
Definition pe.cpp:20