SHARE
TWEET

PS3 Image Image Injector

HlDE1 Apr 24th, 2019 (edited) 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MW2 Offset : CDE7F800
  2. MW2 Resolution : 1280x720
  3.  
  4. MW3 Offset : 0xCCC77000 , 0xCCD27900
  5. MW2 Resolution : 1280x720
  6.  
  7. BO2 Offset : 0xCAD88480
  8. BO2 Resolution : 1024x1024
  9. BO2 Bytes Length :1000
  10. C#
  11. --------
  12. OpenFileDialog openFileDialog = new OpenFileDialog();
  13. openFileDialog.ShowDialog();
  14. byte[] array = File.ReadAllBytes(openFileDialog.FileName);
  15. PS3.SetMemory(CDE7F800 , array);
  16.  
  17. C++
  18. --------
  19. int getFileSize(char *file)
  20. {
  21.     int fd;
  22.     int ret;
  23.     uint64_t pos;
  24.     uint64_t nread;
  25.     ret = cellFsOpen(file, 0, &fd, NULL, 0);
  26.     if (!ret) {
  27.         CellFsStat sb;
  28.         ret = cellFsFstat(fd, &sb);
  29.         if (!ret) {
  30.             return sb.st_size;
  31.         }
  32.     }
  33.     return -1;
  34. }
  35. void readFile(char *file, char buf[], int size)
  36. {
  37.     int fd;
  38.     int ret;
  39.     uint64_t pos;
  40.     uint64_t nread;
  41.     ret = cellFsOpen(file, 0, &fd, NULL, 0);
  42.     if (!ret)
  43.     {
  44.         cellFsLseek(fd, 0, CELL_FS_SEEK_SET, &pos);
  45.         ret = cellFsRead(fd, buf, size, &nread);
  46.         if (!ret)
  47.         {
  48.             cellFsClose(fd);
  49.         }
  50.     }
  51. }
  52.  
  53. int ByteLength;
  54. unsigned int MALLOC = 0x100000; //‭921584‬
  55. unsigned int loc = 0xCDE7F800;
  56. void imginject(char *file)
  57. {
  58.     ByteLength = getFileSize(file);
  59.     if (ByteLength != -1)
  60.     {
  61.         readFile(file, (char*)loc, MALLOC);
  62.     }
  63.     else
  64.     {
  65.     //  DrawOkayMessageDialog("\nUnable to Inject Image\n");
  66.     }
  67. }
  68. bool imageinjected;
  69. bool imgfirst;
  70. void injectimagepls(uint64_t nothing)
  71. {
  72.     for (;;)
  73.     {
  74.         if (imgfirst == false)
  75.         {
  76.             Sleep(6000);
  77.             imginject("/dev_hdd0/tmp/SpaceMW2.dds");
  78.             imgfirst = true;
  79.         }
  80.         if (imageinjected == false && IsInGame == false)
  81.         {
  82.             imginject("/dev_hdd0/tmp/SpaceMW2.dds");
  83.             imageinjected = true;
  84.         }
  85.         Sleep(3000);
  86.     }
  87.     sys_ppu_thread_exit(nothing);
  88. }
  89.  
  90. Then Put this somewhere that constantly runs in game. (the image resets when you join a game)
  91. Code:
  92. if (DvarGetBool("cl_ingame")) {
  93.         imageinjected = false;
  94.     }
  95.  
  96. sys_ppu_thread_t startimageinject;
  97. sys_ppu_thread_create(&startimageinject, injectimagepls, 0, 10, 0x0A, 0, "imageInjector")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top