summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-14 10:15:03 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-08-14 10:15:03 +0200
commit291e18e82de36cd68e4e46e537fb5bf31786671a (patch)
treee2cda01d84998e6435760730cc1d2050d5ea0a89 /src
parent4fd41c0462b65d5cbaff29d639a5628a986e34c4 (diff)
[IMP] Update BTB to understand MZ executables as well.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'src')
-rw-r--r--src/manifest_builder.cxx16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/manifest_builder.cxx b/src/manifest_builder.cxx
index efdb409..81f2c8e 100644
--- a/src/manifest_builder.cxx
+++ b/src/manifest_builder.cxx
@@ -5,12 +5,15 @@
// Created by Amlal on 6/20/24.
//
-#include <cstdio>
+#include <manifest_builder.hxx>
+
#include <json.hxx>
+
#include <cstdlib>
+#include <cstdio>
+
#include <iostream>
#include <fstream>
-#include <manifest_builder.hxx>
using json = nlohmann::json;
@@ -91,7 +94,7 @@ bool ManifestBuilder::buildJson(int arg_sz, const char* arg_val)
std::cout << "buildme: error: can't open DLL/SO, it mayn't contain an entrypoint." << std::endl;
return true;
}
- else if (target.ends_with(".lib"))
+ else if (target.ends_with(".dll"))
{
auto file = std::ifstream(target);
std::stringstream ss;
@@ -101,12 +104,15 @@ bool ManifestBuilder::buildJson(int arg_sz, const char* arg_val)
ss.str()[1] == 'o' &&
ss.str()[2] == 'y' &&
ss.str()[3] == '!')
- std::cout << "buildme: error: can't open PEF LIB, it mayn't contain an entrypoint." << std::endl;
+ std::cout << "buildme: error: can't open PEF DLL, it mayn't contain an entrypoint." << std::endl;
else if (ss.str()[0] == '!' &&
ss.str()[1] == 'y' &&
ss.str()[2] == 'o' &&
ss.str()[3] == 'J')
- std::cout << "buildme: error: can't open FEP LIB, it mayn't contain an entrypoint." << std::endl;
+ std::cout << "buildme: error: can't open FEP DLL, it mayn't contain an entrypoint." << std::endl;
+ else if (ss.str()[0] == 'M' &&
+ ss.str()[1] == 'Z')
+ std::cout << "buildme: error: can't open MZ DLL, it mayn't contain an entrypoint." << std::endl;
return true;
}