mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 21:15:56 +08:00
[BugFix] ReflectiveLoader and GetModuleFileNameA
This commit is contained in:
1 parent
c05a00efaa
commit
f82f6235e3
2 files changed
+25
-9
No files matched your search
@@ -34,8 +34,7 @@ int inject(int pid, char *path, InjectParameters *params){
|
||||
|
||||
do {
|
||||
if (!params) {
|
||||
log_error("Invalid parameters");
|
||||
BREAK_WITH_ERROR("Invalid parameters");
|
||||
log_warn("[!] No parameters provided");
|
||||
}
|
||||
|
||||
/* open DLL file */
|
||||
@@ -129,8 +128,13 @@ int inject(int pid, char *path, InjectParameters *params){
|
||||
|
||||
/* write params to remote memory */
|
||||
SIZE_T written = 0;
|
||||
if (!WriteProcessMemory(hProcess, lpRemoteParam, params, sizeof(InjectParameters), &written) || written != sizeof(InjectParameters))
|
||||
if (params) {
|
||||
if (!WriteProcessMemory(hProcess, lpRemoteParam, params, sizeof(InjectParameters), &written) || written != sizeof(InjectParameters))
|
||||
BREAK_WITH_ERROR("WriteProcessMemory for remote param failed");
|
||||
} else {
|
||||
log_warn("No parameters provided; using null pointer");
|
||||
lpRemoteParam = NULL;
|
||||
}
|
||||
|
||||
/* read back some bytes to verify write */
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user