KDOXG

Official Theme Converter to Custom Theme Manager - PS Vita

Aug 4th, 2019
479
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.31 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <string>
  4. #include <cstdlib>
  5.  
  6. /** This piece of crap reads several zRIF keys stored in a zrif.txt file and try, with each one until EOF, executing the command line below into Motoharu-Gosuto's psvpfstools.
  7.  *
  8.  * psvpfsparser.exe -i PCSXXXXXX -o PCSXXXXXX_ctm -z <zrif> -f http://cma.henkaku.xyz
  9.  *
  10.  * You DEFINITELY should check his other collaborations for the PS Vita scene on his GitHub page: https://github.com/motoharu-gosuto
  11.  *
  12.  * I'm still in learning stage of programming, so this code is definitely not surprising for anyone who studies it, but I believe everyone should start collaborating for the scene somewhere. I got inspired to do this after having some little problems using an old tutorial on r/VitaPiracy about how to install NPS themes on non-Ensou hacked PS Vita. I'm not blaming the tutorial, my problem was that I downloaded too many themes without ordenating the zRIF keys needed for decrypt, and wasted a couple of time installing them. By the way, if you're interested, you should check the post I'm talking about: https://old.reddit.com/r/VitaPiracy/comments/987jyq/tutorial_installing_nps_themes_on_367368_without/
  13.  * To be honest, I don't know who besides me would be that idiot to get a bunch of themes and a lot of zRIF keys without ordenation, but if you do, you can spare your time by using this script without testing one-by-one yourself.
  14.  *
  15.  * Usage:
  16.  * After compilation of this source code, drag the PCSXXXXXX theme folder into the .exe.
  17.  * Be sure that both the folder, the zrif.txt and psvpfsparser.exe are in the same directory.
  18.  *
  19.  */
  20.  
  21. int main(int argc, char *argv[])
  22. {
  23.     std::string param = std::string();
  24.     std::string zRIF = std::string();
  25.  
  26.     std::string titleID = std::string();
  27.     titleID.append(argv[1]);
  28.     titleID.erase(titleID.begin(),titleID.end()-9);
  29.  
  30.     std::string zRIF_file = std::string();
  31.     std::ifstream file;
  32.     file.open("zrif.txt", std::ios::out);
  33.  
  34.     while(!file.fail())
  35.     {
  36.         zRIF.erase(zRIF.begin(),zRIF.end());
  37.         getline(file,zRIF);
  38.         param.erase(param.begin(),param.end());
  39.         param += "psvpfsparser.exe -i " + titleID + " -o " + titleID + "_ctm -z " + zRIF + " -f http://cma.henkaku.xyz";
  40.         system(param.c_str());
  41.     }
  42.    
  43.     file.close();
  44.     return 0;
  45. }
Add Comment
Please, Sign In to add comment