diff --git a/Harness/main.cpp b/Harness/main.cpp index 4015d2e..32cc692 100644 --- a/Harness/main.cpp +++ b/Harness/main.cpp @@ -17,7 +17,7 @@ int main() { HMODULE module = LoadLibrary(L"Theif.dll"); if (!module) return 1; - DynExport Dynamic = (DynExport)GetProcAddress(module, "Mucklow"); + DynExport Dynamic = (DynExport)GetProcAddress(module, "Dynamic"); if (!Dynamic) return 1; if (Dynamic()) { diff --git a/NetClone/Program.cs b/NetClone/Program.cs index 4e0f4ca..c5b8bc2 100644 --- a/NetClone/Program.cs +++ b/NetClone/Program.cs @@ -83,6 +83,9 @@ namespace NetClone } static void CloneExports(ref PeFile target, PeFile reference, string referencePath, string sectionName) { + // Forwards don't typically supply an extension + referencePath = referencePath.Replace(".dll", ""); + IMAGE_DATA_DIRECTORY tgtExportDirectory = target.ImageNtHeaders.OptionalHeader.DataDirectory[0]; IMAGE_DATA_DIRECTORY refExportDirectory = reference.ImageNtHeaders.OptionalHeader.DataDirectory[0]; diff --git a/PyClone/PyClone.py b/PyClone/PyClone.py index 749601c..d227806 100644 --- a/PyClone/PyClone.py +++ b/PyClone/PyClone.py @@ -67,6 +67,9 @@ def add_section(pe, name, size, characteristics = DEFAULT_CHARACTERISTICS): def _clone_exports(tgt, ref, ref_path, new_section_name = '.rdata2'): + # Forwards don't typically supply the extension + ref_path = ref_path.replace('.dll', '') + ref = copy.deepcopy(ref) tgt = copy.deepcopy(tgt) diff --git a/Theif/main.cpp b/Theif/main.cpp index 0d77e12..39ab3f0 100644 --- a/Theif/main.cpp +++ b/Theif/main.cpp @@ -9,8 +9,8 @@ BOOL RebuildExportTable(PBYTE ourBase, PBYTE targetBase); #ifdef _FORWARD -#pragma comment(linker,"/export:Static=Functions.dll.Static") -#pragma comment(linker,"/export:Dynamic=Functions.dll.Dynamic") +#pragma comment(linker,"/export:Static=Functions.Static") +#pragma comment(linker,"/export:Dynamic=Functions.Dynamic") #else