From 9942ce04da377ccd864a796b32c29961291f8e7c Mon Sep 17 00:00:00 2001 From: Kyle Fleming Date: Tue, 15 Oct 2024 20:52:50 +0100 Subject: [PATCH 1/2] Update make.py .strip(".dll" would remove any 'd' 'l' or '.' from filenames, not a breaking issue, but this generates libcurl-origin.dll instead of ibcur-origin.dll --- make.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/make.py b/make.py index 654721d..4288d1a 100644 --- a/make.py +++ b/make.py @@ -331,8 +331,9 @@ def proxyFunctions(targetDLL): # If our DLL is in a local directory let's make a copy and proxy to it else: pe = pefile.PE(targetDLL) - dll = targetDLL.strip(".dll") + "_origin" - os.system(f"copy {targetDLL} Output/{dll}.dll") + tempdllname, ext = os.path.splitext(targetDLL) + dll = tempdllname + "_origin" + ext + os.system(f"copy {targetDLL} Output\{dll}.dll") d = [pefile.DIRECTORY_ENTRY["IMAGE_DIRECTORY_ENTRY_EXPORT"]] pe.parse_data_directories(directories=d) exports = [(e.ordinal, e.name.decode()) for e in pe.DIRECTORY_ENTRY_EXPORT.symbols if e.name] From a30dedefa117d9d9ed570f39dd8315a33bf41556 Mon Sep 17 00:00:00 2001 From: Kyle Fleming Date: Wed, 16 Oct 2024 08:54:38 +0100 Subject: [PATCH 2/2] Update make.py Previously it would only copy the output files if the output directory didn't exist, due to the indentation. --- make.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make.py b/make.py index 4288d1a..d8a97bf 100644 --- a/make.py +++ b/make.py @@ -396,8 +396,8 @@ def main(): if not os.path.exists('Output'): os.makedirs('Output') - print("[+] Moving everything to Output directory") - os.system(f"move .\\SideLoadingDLL\\x64\\Release\\SideLoadingDLL.dll .\\Output\\{targetDLL.split('/')[-1]} && move {outputFilename} Output/{outputFilename}") + print("[+] Moving everything to Output directory") + os.system(f"move .\\SideLoadingDLL\\x64\\Release\\SideLoadingDLL.dll .\\Output\\{targetDLL.split('/')[-1]} && move {outputFilename} Output/{outputFilename}") if __name__ == "__main__": main()