Esempio n. 1
0
        static void ReadPlist()
        {
            PlistDictionary infoDict = (PlistDictionary)PlistStructure.FromFile(@"C:\Users\Admin\Desktop\iphonebak\00008030-000A6C562E92802E\Info.plist");

            BackupInfo backupInfo = new BackupInfo
            {
                Applications          = (PlistDictionary)infoDict["Applications"],
                BuildVersion          = ((PlistString)infoDict["Build Version"]).Value,
                DeviceName            = ((PlistString)infoDict["Device Name"]).Value,
                DisplayName           = ((PlistString)infoDict["Display Name"]).Value,
                GUID                  = ((PlistString)infoDict["GUID"]).Value,
                ICCID                 = ((PlistString)infoDict["ICCID"]).Value,
                IMEI                  = ((PlistString)infoDict["IMEI"]).Value,
                InstalledApplications = (PlistArray)infoDict["Installed Applications"],
                LastBackupDate        = ((PlistDate)infoDict["Last Backup Date"]).Value,
                MEID                  = ((PlistString)infoDict["MEID"]).Value,
                PhoneNumber           = ((PlistString)infoDict["Phone Number"]).Value,
                ProductType           = ((PlistString)infoDict["Product Type"]).Value,
                ProductVersion        = ((PlistString)infoDict["Product Version"]).Value,
                SerialNumber          = ((PlistString)infoDict["Serial Number"]).Value,
                TargetIdentifier      = ((PlistString)infoDict["Target Identifier"]).Value,
                TargetType            = ((PlistString)infoDict["Target Type"]).Value,
                UniqueIdentifier      = ((PlistString)infoDict["Unique Identifier"]).Value,
                iTunesFiles           = (PlistDictionary)infoDict["iTunes Files"],
                iTunesSettings        = (PlistDictionary)infoDict["iTunes Settings"],
                iTunesVersion         = ((PlistString)infoDict["iTunes Version"]).Value,
            };


            List <string> installedApplications = new List <string>();

            foreach (PlistString item in backupInfo.InstalledApplications)
            {
                installedApplications.Add(item.Value);
            }


            List <Application> applications = new List <Application>();

            foreach (var item in backupInfo.Applications)
            {
                string          key   = item.Key;
                PlistDictionary value = (PlistDictionary)item.Value;

                Application application = new Application
                {
                    ApplicationSINF = (PlistData)value["ApplicationSINF"],
                    PlaceholderIcon = (PlistData)value["PlaceholderIcon"],
                    iTunesMetadata  = (PlistData)value["iTunesMetadata"]
                };
                applications.Add(application);

                string path = Path.Combine(@"C:\Users\Admin\Desktop\iphonebak", $"{key}.png");
                using (FileStream fileStream = new FileStream(path, FileMode.Create, FileAccess.Write))
                {
                    byte[] buffer = application.PlaceholderIcon.Value;
                    fileStream.Write(buffer, 0, buffer.Length);
                }
            }
        }
Esempio n. 2
0
 public PlistInteger(ulong value, PlistStructure parent = null)
 {
     _node   = plist.plist_new_uint(value);
     _parent = parent;
 }
Esempio n. 3
0
 public PlistInteger(plist_t node, PlistStructure parent = null)
 {
     _node   = node;
     _parent = parent;
 }
Esempio n. 4
0
 public PlistBoolean(bool value, PlistStructure parent = null)
 {
     _node   = plist.plist_new_bool(value ? (byte)1 : (byte)0);
     _parent = parent;
 }
Esempio n. 5
0
 public PlistBoolean(plist_t node, PlistStructure parent = null)
 {
     _node   = node;
     _parent = parent;
 }
Esempio n. 6
0
 public PlistReal(double value, PlistStructure parent = null)
 {
     _node   = plist.plist_new_real(value);
     _parent = parent;
 }
Esempio n. 7
0
 public PlistReal(plist_t node, PlistStructure parent = null)
 {
     _node   = node;
     _parent = parent;
 }
Esempio n. 8
0
 public PlistUid(ulong value, PlistStructure parent = null)
 {
     _node   = plist.plist_new_uid(value);
     _parent = parent;
 }