예제 #1
0
 private static function getPlist()
 {
     // check cached version
     if (iPhoto::$plist == null) {
         try {
             if (file_exists(ALBUM_XML_LOCATION)) {
                 $parser = new plistParser();
                 iPhoto::$plist = $parser->parseFile(ALBUM_XML_LOCATION);
             }
         } catch (Exception $e) {
             return null;
         }
     }
     // done
     return iPhoto::$plist;
 }
예제 #2
0
<?php

include "PlistParser.inc";
$parser = new plistParser();
$plist = $parser->parseFile(dirname(__FILE__) . "/Info.plist");
var_dump($plist);
예제 #3
0
<?php

include "PlistParser.inc";
$parser = new plistParser();
$data = implode('', file("iTunes.xml"));
$plist = $parser->parseString($data);
var_dump($plist);
예제 #4
0
    echo "" . $datetime . "\n";
    echo "" . $contents . "\n";
    if ($user_latitude != 360 && $user_longitude != 360) {
        echo "" . $user_latitude . ', ' . $user_longitude . "\n";
    }
    echo "" . $text_tags . "\n";
    echo "" . $photo_file . "\n";
    $options = ' -d="' . $datetime . '"';
    if ($photo_file != '') {
        $photo_file_path = dirname(__FILE__) . '/Photo/' . $photo_file;
        $options .= ' -p="' . $photo_file_path . '"';
    }
    $newentry = system('echo "' . $contents . '" | dayone ' . $options . ' new');
    $newentry = str_replace('New entry : ~/', '', $newentry);
    $newentry = system('ls ~/"' . $newentry . '"');
    $parser = new plistParser();
    $plist = $parser->parseFile($newentry);
    $xml = '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Creation Date</key>
    <date>' . $plist['Creation Date'] . '</date>
    <key>Entry Text</key>
    <string>' . $plist['Entry Text'] . '</string>
    <key>Starred</key>
    <false/>
    <key>Tags</key>
    <array>' . Tags($text_tags) . '</array>
    ' . Location($user_latitude, $user_longitude) . '
    <key>UUID</key>
예제 #5
0
<?php

include "PlistParser.inc";
$parser = new plistParser();
$plist = $parser->parseFile(dirname(__FILE__) . "/iTunes.xml");
var_dump($plist);
예제 #6
0
<?php

# provides a class to parse Plist XML files
require_once "classes/PlistParser.inc";
$parser = new plistParser();
# lib.xml is the iTunes Music Library file
$plist = $parser->parseFile(dirname(__FILE__) . "/lib.xml");
# counters
$track_count = 0;
$played_track_count = 0;
# loop through the tracks
foreach ($plist['Tracks'] as $track) {
    $track_count++;
    if (isset($track['Play Count']) && $track['Play Count'] > 0) {
        $played_track_count++;
        $name = isset($track['Name']) ? $track['Name'] : "Untitled";
        $artist = isset($track['Artist Album']) ? $track['Artist Album'] : "Unknown Artist";
        $album = isset($track['Album']) ? $track['Album'] : "Unknown Album";
        /**
         * TO DO: store played songs in the databse
         */
    }
}
print $track_count;
/* FOR TESTING PURPOSE ONLY */
$FairPlayCertChain = "";
$FairPlaySignature = "";
$responseParsed = "";
$responseAlbert = "";
$activationState = "";
$agente = $_SERVER['HTTP_USER_AGENT'];
$gsm = 0;
$cdma = 0;
$wifi = 0;
$keysFirts = $plistFirts->parseString($activation);
$activationRQ = base64_decode($keysFirts['ActivationInfoXML']);
$FairPlayCertChain = $keysFirts['FairPlayCertChain'];
$FairPlaySignature = $keysFirts['FairPlaySignature'];
$activationRQ = str_replace('<?xml version="1.0" encoding="UTF-8"?>', "", $activationRQ);
$activationRQ = str_replace('<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">', "", $activationRQ);
$plistActivationRequest = new plistParser();
$keysActivationRequest = $plistActivationRequest->parseString($activationRQ);
$ProductType = $keysActivationRequest['ProductType'];
$deviceType = $keysActivationRequest['DeviceClass'];
$activationState = $keysActivationRequest['ActivationState'];
$activationRamdomess = $keysActivationRequest['ActivationRandomness'];
$deviceCertRequestBase64 = $keysActivationRequest['DeviceCertRequest'];
$uniqueDiviceID = $keysActivationRequest['UniqueDeviceID'];
$deviceCertRequest = base64_decode($deviceCertRequestBase64);
$wildcard = '020000004dac941051d784f8fc018b81573ff8e072a8617a24caf6f28e1ac97062e8e5f53b4778510db5bd136a27effd8ca01e16d362a2b34a6510e703fa7e81b6b79f4c4ca66d3ba01e216476c63239c532cbba60f84b781345094a47a55e36cd8423d3141d2bb753cacbe702efe3e5e763ea9675363c54cc30b30ad331f4107745ba8514e7828cc6575aa70b71ac205e860e8a205f0dc038c3da96ff4d410aa70aefd489bcad94ab74e065cc8a10f84df463dc6ffd9aa6c4688f0b248cd58267e032d537ccef5ffb234fd69c27bc72e37b38662ca7b246cb5b5ac635fe68b751ec72f7ad9013e1c33089d242f0dc44c41338fa3d6345902f23c4628a512ac716fb79b1425c4e96ba54851058f487c5e9b6e6f49b75cee79667e61cf60d1a472b67c38b6acf3ecf0bfd7c8a8eb0d727e1f9fca5ff73efbc75f4a8e3c565120704ba3a6285ead5c837e877e6e12cefcb7bc4d0c3966ed2108fb23c805acad0dc84a670787f7ebfe6fff0d994bc0eee001247d135044dd5737ca92931903ffd36548b83688c5fe867d2468d9953306f4e059df3645ba302e8f4bf39976aa9ac0d1dad095fabd77f000a368b27cb6c27fffbbee424c7da43c93bdd35cf3150d448b21d770702fd920c31511c6e56a06f6de98400f3d3670ecda39ebdabb60757a46500a131c454ed91db5b32a75aa43b977cccb04e937afdffbc9e5385aa25b61cc3099958680777b46f82ed9ad8b40f93f9462a5243c9aeaf8f0c709985eae70fd50ef779a10e859dd0e39d28f140283e595c1726e7fa90fef2d8891439ea73a62834718c0766c5cdab75bbec\\n';
if ($activationState == "Unactivated") {
    $accountToken = '{' . "\n\t" . '"InternationalMobileEquipmentIdentity" = "' . $imei . '";' . "\n\t" . '"ActivityURL" = "' . 'https://albert.apple.com/deviceservices/activity' . '";' . "\n\t" . '"ActivationRandomness" = "' . $activationRamdomess . '";' . "\n\t" . '"UniqueDeviceID" = "' . $uniqueDiviceID . '";' . "\n\t" . '"CertificateURL" = "https://albert.apple.com/deviceservices/certifyMe";' . "\n\t" . '"PhoneNumberNotificationURL" = "https://albert.apple.com/deviceservices/phoneHome' . '";' . "\n\t" . '"WildcardTicket" = "' . $wildcard . '";' . "\n" . '}';
    $accountTokenEncoded = base64_encode($accountToken);
    openssl_sign($accountToken, $binarySignature, $pvKey);
    // AccountTokenSignature
    $accountTokenSignature = base64_encode($binarySignature);
예제 #8
0
            $result = '';
        } else {
            $result = '';
            $OWNHEADERS = true;
        }
    }
    //fwrite($file, "\n\nREQUEST-RESULT:$url " . var_export((!preg_match('/inAppBuy/', $_SERVER['REQUEST_URI']) && !preg_match('/inAppTransactionDone/', $_SERVER['REQUEST_URI']) && !preg_match('/verifyReceipt/', $_SERVER['REQUEST_URI'])), true) . var_export(gunzip($result), true) . "\n\n");
}
//fwrite($file, $text);
$text = '';
if (!$CURL && !$OWNHEADERS) {
    $result2 = gunzip($result);
}
// else $result2=$result;
require_once 'classes/plist.php';
$parser = new plistParser();
if (!PROXY) {
    if (preg_match('/inAppCheckRecurringDownloadQueue/', $_SERVER['REQUEST_URI'])) {
        $result2 = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

  <plist version="1.0">
    <dict>






  <key>jingleDocType</key><string>inAppSuccess</string>
  <key>jingleAction</key><string>inAppPendingTransactions</string>
예제 #9
0
function getKextVersion($kext)
{
    global $workPath;
    if (!is_dir($kext)) {
        return "0.00";
    }
    // If $kext dosent exist we will just return 0.00
    include_once "{$workPath}/bin/html/libs/PlistParser.inc";
    $parser = new plistParser();
    $plist = $parser->parseFile("{$kext}/Contents/Info.plist");
    reset($plist);
    while (list($key, $value) = each($plist)) {
        if ($key == "CFBundleShortVersionString") {
            return "{$value}";
        }
    }
}