Skip to content

Commit

Permalink
Fix for Save Offsets and Inject Value not working.
Browse files Browse the repository at this point in the history
Fix for Save Offsets and Inject Value not working.
  • Loading branch information
Rinnegatamante committed Sep 8, 2016
1 parent f838955 commit 4866689
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main_module/memory.c
Expand Up @@ -110,16 +110,19 @@ void injectStackFile(void* stack_ptr, int stack_size, char* file){

// Inject multiple values on memory (MMC storage)
void injectMemory(uint64_t val, int val_size){
int results_fd = sceIoOpen("ux0:/data/rinCheat/rinCheat_temp.bin", SCE_O_RDONLY | SCE_O_CREAT, 0777);
sceIoLseek(results_fd, 0x0, SEEK_SET);
uint32_t addr;
int i = 0;
while (sceIoRead(results_fd, &addr, 4) > 0 && i++ < results_num){
injectValue((uint8_t*)addr,val,val_size);
}
sceIoClose(results_fd);
}

// Save offsets from results on MMC (MMC storage)
void saveOffsets(char* filename){
int results_fd = sceIoOpen("ux0:/data/rinCheat/rinCheat_temp.bin", SCE_O_RDONLY | SCE_O_CREAT, 0777);
sceIoLseek(results_fd, 0x0, SEEK_SET);
uint32_t addr;
int fd = sceIoOpen(filename, SCE_O_CREAT|SCE_O_WRONLY|SCE_O_APPEND, 0777);
Expand All @@ -130,4 +133,5 @@ void saveOffsets(char* filename){
sceIoWrite(fd, data, strlen(data));
}
sceIoClose(fd);
sceIoClose(results_fd);
}

0 comments on commit 4866689

Please sign in to comment.