Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- #include <cstdlib>
- /** 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.
- *
- * psvpfsparser.exe -i PCSXXXXXX -o PCSXXXXXX_ctm -z <zrif> -f http://cma.henkaku.xyz
- *
- * You DEFINITELY should check his other collaborations for the PS Vita scene on his GitHub page: https://github.com/motoharu-gosuto
- *
- * 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/
- * 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.
- *
- * Usage:
- * After compilation of this source code, drag the PCSXXXXXX theme folder into the .exe.
- * Be sure that both the folder, the zrif.txt and psvpfsparser.exe are in the same directory.
- *
- */
- int main(int argc, char *argv[])
- {
- std::string param = std::string();
- std::string zRIF = std::string();
- std::string titleID = std::string();
- titleID.append(argv[1]);
- titleID.erase(titleID.begin(),titleID.end()-9);
- std::string zRIF_file = std::string();
- std::ifstream file;
- file.open("zrif.txt", std::ios::out);
- while(!file.fail())
- {
- zRIF.erase(zRIF.begin(),zRIF.end());
- getline(file,zRIF);
- param.erase(param.begin(),param.end());
- param += "psvpfsparser.exe -i " + titleID + " -o " + titleID + "_ctm -z " + zRIF + " -f http://cma.henkaku.xyz";
- system(param.c_str());
- }
- file.close();
- return 0;
- }
Add Comment
Please, Sign In to add comment