-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
37 lines (34 loc) · 1.01 KB
/
main.cpp
File metadata and controls
37 lines (34 loc) · 1.01 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
#include <iostream>
#include "interface.hpp"
#include "static_parser.hpp"
int main(int argc, char *argv[])
{
int filePathIndex = -1;
int logPathIndex = -1;
switch (ParseCommands(argc, argv, filePathIndex, logPathIndex))
{
case 1:
PrintHelpMessage();
break;
case 2:
if (filePathIndex != -1)
{
if (isPE(argv[filePathIndex]) == 0)
{
std::cout << "Starting static parsing of PE file... \n";
if (logPathIndex == -1)
PE_ParseStrings(argv[filePathIndex], "");
else
PE_ParseStrings(argv[filePathIndex], argv[logPathIndex]);
}
else
{
std::cout << "Not a valid PE file or another error occured while validating file. Terminated. \n";
break;
}
}
default:
break;
}
return 0;
}