Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.60 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <pspkernel.h>
  4. #include <systemctrl.h>
  5.  
  6. PSP_MODULE_INFO("MacSpoof",0x1007,2,0);
  7.  
  8. STMOD_HANDLER previous = NULL;
  9.  
  10. wchar_t mac[] = L"PATCHED";
  11.  
  12. void SysconfPatch(u32 text_addr)
  13. {
  14.     memcpy((void *)(text_addr+0x272FC),mac,strlen(mac));
  15. }
  16.  
  17. int OnModuleStart(SceModule2 *mod)
  18. {
  19.     if(strcmp(mod->modname,"sysconf_plugin_module") == 0)
  20.     {
  21.         SysconfPatch(mod->text_addr);
  22.     }
  23.     if(!previous)
  24.         return 0;
  25.        
  26.     return previous(mod);
  27. }
  28.  
  29.  
  30. int module_start(SceSize args,void *argp)
  31. {
  32.     previous = sctrlHENSetStartModuleHandler(OnModuleStart);
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement