@@ -35,7 +35,7 @@ BYTE* shellcodify(BYTE *my_exe, size_t exe_size, size_t &out_size, bool is64b)
35
35
int res_id = is64b ? STUB64 : STUB32;
36
36
BYTE *stub = peconv::load_resource_data (stub_size, res_id);
37
37
if (!stub) {
38
- std::cout << " Stub not loaded" << std::endl;
38
+ std::cout << " [-] Stub not loaded" << std::endl;
39
39
return nullptr ;
40
40
}
41
41
size_t ext_size = exe_size + stub_size;
@@ -57,20 +57,20 @@ bool is_supported_pe(BYTE *my_exe, size_t exe_size)
57
57
{
58
58
if (!my_exe) return false ;
59
59
if (!peconv::has_relocations (my_exe)) {
60
- std::cout << " The PE must have relocations!" << std::endl;
60
+ std::cout << " [-] The PE must have relocations!" << std::endl;
61
61
return false ;
62
62
}
63
63
if (peconv::get_subsystem (my_exe) != IMAGE_SUBSYSTEM_WINDOWS_GUI) {
64
64
std::cout << " [WARNING] This is a console application! The recommended subsystem is GUI." << std::endl;
65
65
}
66
66
IMAGE_DATA_DIRECTORY* dotnet_dir = peconv::get_directory_entry (my_exe, IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR);
67
67
if (dotnet_dir) {
68
- std::cout << " .NET applications are not supported!" << std::endl;
68
+ std::cout << " [-] .NET applications are not supported!" << std::endl;
69
69
return false ;
70
70
}
71
71
IMAGE_DATA_DIRECTORY* tls_dir = peconv::get_directory_entry (my_exe, IMAGE_DIRECTORY_ENTRY_TLS);
72
72
if (tls_dir) {
73
- std::cout << " Applications with TLS callbacks are not supported!" << std::endl;
73
+ std::cout << " [-] Applications with TLS callbacks are not supported!" << std::endl;
74
74
return false ;
75
75
}
76
76
return true ;
@@ -104,7 +104,7 @@ int main(int argc, char *argv[])
104
104
std::cout << " Reading module from: " << in_path << std::endl;
105
105
BYTE *my_exe = peconv::load_file (in_path.c_str (), exe_size);
106
106
if (!my_exe) {
107
- system ( " pause " ) ;
107
+ std::cout << " [-] Could not read the input file! " << std::endl ;
108
108
return -1 ;
109
109
}
110
110
if (!is_supported_pe (my_exe, exe_size)) {
@@ -121,7 +121,7 @@ int main(int argc, char *argv[])
121
121
return -3 ;
122
122
}
123
123
if (peconv::dump_to_file (out_str.c_str (), ext_buf, ext_size)) {
124
- std::cout << " [+] Saved to file : " << out_str << std::endl;
124
+ std::cout << " [+] Saved as : " << out_str << std::endl;
125
125
}
126
126
else {
127
127
std::cout << " [-] Failed to save the output!" << std::endl;
0 commit comments