Ejemplo n.º 1
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var file = System.IO.MemoryMappedFiles.MemoryMappedFile.CreateFromFile(@"E:\PS4\SAVEDATA\781ce6549a5d099d\CUSA00135\BAK1Save0x0sgd");



            byte[] enckey = PS4_Tools.SaveData.GetSealedKey_Bytes(@"E:\PS4\SAVEDATA\781ce6549a5d099d\CUSA00135\BAK1Save0x0sgd.bin");
            var    r      = file.CreateViewAccessor();

            LibOrbisPkg.PFS.PfsHeader PfsHeader = new LibOrbisPkg.PFS.PfsHeader();
            var reader = r;
            var buf    = new byte[0x400];

            //reader.Read(0, buf, 0, 0x400);
            //Read(reader,)
            reader.ReadArray(0, buf, 0, 0x400);
            var header = LibOrbisPkg.PFS.PfsHeader.ReadFromStream(new MemoryStream(buf));

            //byte[] passcode = new byte[] { 0xB5, 0xDA, 0xEF, 0xFF, 0x39, 0xE6, 0xD9, 0x0E, 0xCA, 0x7D, 0xC5, 0xB0, 0x29, 0xA8, 0x15, 0x3E, 0x87, 0x07, 0x96, 0x0A, 0x53, 0x46, 0x8D, 0x6C, 0x84, 0x3B, 0x3D, 0xC9, 0x62, 0x4E, 0x22, 0xAF, };
            byte[] Data  = new byte[] { 0xA2, 0xC0, 0x13, 0x20, 0x30, 0x0B, 0x26, 0x01, 0x6D, 0x7C, 0x72, 0x0C, 0x22, 0xC3, 0x25, 0xE0 };
            byte[] Tweak = new byte[] { 0xF2, 0x80, 0x83, 0x30, 0xE8, 0xDE, 0x69, 0x8F, 0x91, 0x6C, 0x45, 0x3D, 0xBF, 0xF0, 0x55, 0xF3 };
            LibOrbisPkg.PFS.PfsReader pfsreader = new LibOrbisPkg.PFS.PfsReader(r, tweak: Tweak, data: Data);
            //just testing something here quickly


            OpenFileDialog opendialog = new OpenFileDialog();

            opendialog.CheckFileExists = true;
            //opendialog.AddExtension
            opendialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            opendialog.Multiselect      = false;
            opendialog.Filter           = "PS4 Project File (*.gp4) | *.gp4";
            if (opendialog.ShowDialog() == DialogResult.OK)
            {
                project = PS4_Tools.PKG.SceneRelated.GP4.ReadGP4(opendialog.FileName);
                TreeNode mainnode = new TreeNode("root");
                for (int i = 0; i < project.Rootdir.Dir.Count; i++)
                {
                    //List<PS4_Tools.PKG.GP4.File> listoffiles = new List<PS4_Tools.PKG.GP4.File>();
                    List <TreeNode> treenodes = new List <TreeNode>();
                    for (int x = 0; x < project.Files.File.Count; x++)
                    {
                        if (project.Files.File[x].Targ_path.Contains(project.Rootdir.Dir[i].Targ_name.ToString()))
                        {
                            //listoffiles.Add(project.Files.File[i]);
                            TreeNode node = new TreeNode(project.Files.File[x].Targ_path);
                            node.ImageIndex         = 1;
                            node.SelectedImageIndex = 1;
                            treenodes.Add(node);
                        }
                    }
                    TreeNode[] projectfiles = treenodes.ToArray();
                    TreeNode   treeNode     = new TreeNode(project.Rootdir.Dir[i].Targ_name.ToString(), projectfiles);
                    treeNode.ImageIndex         = 0;
                    treeNode.SelectedImageIndex = 0;
                    treeView1.Nodes.Add(treeNode);
                }
            }
        }
Ejemplo n.º 2
0
        private void button26_Click(object sender, EventArgs e)
        {
            //string path

            //set base directory for PS4 project
            PS4_Tools.PKG.SceneRelated.GP4.Psproject project = PS4_Tools.PKG.SceneRelated.GP4.ReadGP4(@"C: \Users\3deEchelon\Desktop\PS4\RE\Ps4 Save Data Backup\CUSA00265\app.xml");
            if (project.Fmt != "playgo-status")
            {
                MessageBox.Show("This is not a valid PS4 PlayGoXML");
                return;
            }

            //lets read the pkg content info
            //that should be that
        }
Ejemplo n.º 3
0
        private void button2_Click(object sender, EventArgs e)
        {
            //string path

            //set base directory for PS4 project
            PS4_Tools.PKG.SceneRelated.GP4.Psproject project = PS4_Tools.PKG.SceneRelated.GP4.ReadGP4(@"C:\Users\3deEchelon\Documents\Sony\Crash Bandcioot Twinsanity.gp4");
            if (project.Fmt != "gp4")
            {
                MessageBox.Show("This is not a valid PS4 Project");
                return;
            }

            //lets read the pkg content info
            if (project.Volume.Package.Passcode.Length != 32)
            {
                MessageBox.Show("Passcode Lentgh is not valid");
            }



            //to save a gp4

            PS4_Tools.PKG.SceneRelated.GP4.SaveGP4(@"C:\Users\3deEchelon\Documents\Sony\tempworking.gp4", project);
        }
Ejemplo n.º 4
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog opendialog = new OpenFileDialog();

            opendialog.CheckFileExists = true;
            //opendialog.AddExtension
            opendialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            opendialog.Multiselect      = false;
            opendialog.Filter           = "PS4 Project File (*.gp4) | *.gp4";
            if (opendialog.ShowDialog() == DialogResult.OK)
            {
                project = PS4_Tools.PKG.SceneRelated.GP4.ReadGP4(opendialog.FileName);
                TreeNode mainnode = new TreeNode("root");
                for (int i = 0; i < project.Rootdir.Dir.Count; i++)
                {
                    //List<PS4_Tools.PKG.GP4.File> listoffiles = new List<PS4_Tools.PKG.GP4.File>();
                    List <TreeNode> treenodes = new List <TreeNode>();
                    for (int x = 0; x < project.Files.File.Count; x++)
                    {
                        if (project.Files.File[x].Targ_path.Contains(project.Rootdir.Dir[i].Targ_name.ToString()))
                        {
                            //listoffiles.Add(project.Files.File[i]);
                            TreeNode node = new TreeNode(project.Files.File[x].Targ_path);
                            node.ImageIndex         = 1;
                            node.SelectedImageIndex = 1;
                            treenodes.Add(node);
                        }
                    }
                    TreeNode[] projectfiles = treenodes.ToArray();
                    TreeNode   treeNode     = new TreeNode(project.Rootdir.Dir[i].Targ_name.ToString(), projectfiles);
                    treeNode.ImageIndex         = 0;
                    treeNode.SelectedImageIndex = 0;
                    treeView1.Nodes.Add(treeNode);
                }
            }
        }
Ejemplo n.º 5
0
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     project = new PS4_Tools.PKG.SceneRelated.GP4.Psproject();//start a new project
 }
Ejemplo n.º 6
0
    void Start()
    {
        try
        {
            //Unjail505();
        }
        catch {; }

        CrearDirectorio();

        #region << PS4 Tools >>



        //Testing PS4 Tools here I will ask Lappy to test it for me in full for now just testing on windows
        #region << PKG Handeling >>
        try
        {                       //Liborbis testing
            var temp = PS4_Tools.PKG.SceneRelated.ReadPKG("C:\\Users\\3deEchelon\\Desktop\\PS4\\Euro.FISHING.COLLECTORS.EDITION.PS4-DUPLEX\\Euro.Fishing.Collectors.Edition.PS4-DUPLEX\\duplex-euro.fishing.collectors.ed.ps4\\Euro.Fishing.Collectors.Edition.PS4-DUPLEX.pkg");
        }
        catch (Exception ex)
        {
            //some load error
        }
        try
        {
            //Normal testing just to read some info from the pkg
            var pkg = PS4_Tools.PKG.SceneRelated.Read_PKG("C:\\Users\\3deEchelon\\Desktop\\PS4\\Euro.FISHING.COLLECTORS.EDITION.PS4-DUPLEX\\Euro.Fishing.Collectors.Edition.PS4-DUPLEX\\duplex-euro.fishing.collectors.ed.ps4\\Euro.Fishing.Collectors.Edition.PS4-DUPLEX.pkg");
        }
        catch (Exception ex)
        {
            //some load error
        }
        #endregion << PKG Handeling >>

        #region << GP File Handeling >>
        try{
            //PS4 GP4 File Testing
            PS4_Tools.PKG.SceneRelated.GP4.Psproject project = PS4_Tools.PKG.SceneRelated.GP4.ReadGP4(@"C:\Users\3deEchelon\Documents\Sony\Crash Bandcioot Twinsanity.gp4");
            if (project.Fmt != "gp4")
            {
                //MessageBox.Show("This is not a valid PS4 Project");
                //show some sort of messagebox
                return;
            }

            //lets read the pkg content info
            if (project.Volume.Package.Passcode.Length != 32)
            {
                //MessageBox.Show("Passcode Lentgh is not valid");
            }

            //to save a gp4

            //PS4_Tools.PKG.SceneRelated.GP4.SaveGP4(@"C:\Users\3deEchelon\Documents\Sony\tempworking.gp4", project);
        }
        catch (Exception ex)
        {
            //display some load error
        }
        #endregion << GP File Handeling >>

        #region << DDS Handeling >>

        //since i was using bitmaps to do all this i will need to change it to byte[] so users can create proper images from these items

        Stream item = PS4_Tools.Image.DDS.GetStreamFromDDS(@"C:\Users\3deEchelon\Desktop\PS4\psp Decrypt\Sc0\icon0.dds");
        //do with the stream as you wish

        #endregion << DDS Handeling >>

        #region << RCO >>

        //PS4_Tools.RCO.DumpRco(@"C:\Users\3deEchelon\Desktop\PS4\RCO\Sce.Cdlg.GameCustomData.rco");
        var file = PS4_Tools.RCO.ReadRco(@"C:\Users\3deEchelon\Desktop\PS4\RCO\Sce.Cdlg.GameCustomData.rco");
        //testing time
        //write a file to server or whatever
        //we can dump them all if we want 2

        //example how to write all files out you can also display them as you wish using this
        //var image = file.FileTable.PNGFiles[0].FileBytes;
        //System.IO.File.WriteAllBytes(@"C: \Users\3deEchelon\Desktop\PS4\RCO\img0.png", image);

        #endregion << RCO >>

        #region << Save Data >>


        //PS4_Tools.SaveData.LoadSaveData(@"C:\Users\3deEchelon\Desktop\PS4\RE\Ps4 Save Data Backup\10000000\savedata\CUSA01656\sdimg_SAVEDATA00", @"C:\Users\3deEchelon\Desktop\PS4\RE\Ps4 Save Data Backup\10000000\savedata\CUSA01656\SAVEDATA00.bin");


        #endregion << Save Data >>

        #region << RIF >>

        // PS4_Tools.PKG.Official.RIF rifitem = PS4_Tools.PKG.Official.ReadRif(@"C:\Users\3deEchelon\Downloads\RifTest.rif");
        PS4_Tools.PKG.Official.RIF rifitem = PS4_Tools.PKG.Official.ReadRif(@"C:\Users\3deEchelon\Desktop\PS4\LM\Sc0\license.dat");
        /*Rif Loaded*/
        // string Content_ID = System.Text.Encoding.ASCII.GetString(rifitem.Content_ID);


        #endregion << RIF >>

        #region << Updates and DLC checking >>
        try{
            var updateitem = PS4_Tools.PKG.Official.CheckForUpdate("CUSA07708");
            var storeitems = PS4_Tools.PKG.Official.Get_All_Store_Items("CUSA07708");
        }
        catch (Exception ex)
        {
        }

        #endregion << Updates and DLC Checking >>

        #endregion << PS4 Tools >>
    }