Beispiel #1
0
function ungzlog($file)
{
    $logs = explode("\n", gunzip($file));
    $lcnt = count($logs);
    for ($i = 0; $i < $lcnt; $i++) {
        $logs[$i] .= "\n";
    }
    return $logs;
}
$FTPUSER = "******";
$FTPPASS = "";
$FTPPATH = "/pub/idb/nighty-ver/";
// HTTP Download Info
$HTTPURL = "http://download.berlios.de/idb/";
// File Name Info for both FTP and HTTP
$TARGZFILE = "iDB.tar.gz";
$TARFILE = "iDB.tar";
require_once "./untar.php";
$mydir = addslashes(str_replace("\\", "/", dirname(__FILE__) . "/"));
$conn_id = ftp_connect($FTPURL, 21, 90);
$login_result = ftp_login($conn_id, $FTPUSER, $FTPPASS);
if (!$conn_id || !$login_result) {
    $tarhandle = fopen("./" . $TARGZFILE, "a+");
    fwrite($tarhandle, file_get_contents($HTTPURL . $TARGZFILE));
    fclose($tarhandle);
    chmod("./" . $TARGZFILE, 0777);
} else {
    ftp_pasv($conn_id, true);
    ftp_chdir($conn_id, $FTPPATH);
    ftp_get($conn_id, "./" . $TARGZFILE, "./" . $TARGZFILE, FTP_BINARY);
    ftp_close($conn_id);
}
gunzip("./" . $TARGZFILE, "./" . $TARFILE);
unlink("./" . $TARGZFILE);
unlink("./LICENSE");
untar("./" . $TARFILE, "./");
unlink("./" . $TARFILE);
unlink("./untar.php");
unlink("./webinstall.php");
header("Location: ./install.php");
Beispiel #3
0
    if (preg_match('/bank/', $_SERVER['REQUEST_URI'])) {
        $result = gzencode('{ "status": 1, "error": "", "data": "[\\"170000030704571\\"]", "signature": "15b7d0e8b239a44a7f04c3ec4fae1c11" }');
    } elseif (preg_match('/sync/', $_SERVER['REQUEST_URI'])) {
        die;
    } elseif (preg_match('/metric/', $_SERVER['REQUEST_URI'])) {
        die;
    } else {
        $result = file_get_contents($url, false, $context);
    }
    // UNCOMMENT THIS TO FETCH PURCHUASE LISTS FROM APPSTORE
} else {
    $result = file_get_contents($url, false, $context);
}
// UNCOMMENT THIS TO FETCH PURCHUASE LISTS FROM APPSTORE
$text = '';
$result_out = $result;
$text .= "response_raw:{$result}\n\n";
$text .= "to_out:{$result_out}\n\n";
$text .= "response:" . var_export(gunzip($result), true) . "\n\nresponse_headers:" . var_export($http_response_header, true);
$text .= "\n=======================================================\n";
write_log($text);
//fclose($file);
//file_put_contents('iapcracker.txt', $result);
if ($OWNHEADERS || !$http_response_header) {
    $http_response_header = array(0 => 'HTTP/1.1 200 OK', 1 => 'Server: nginx/1.1.14', 2 => 'Date: Sat, 28 Jul 2012 13:46:50 GMT', 3 => 'Content-Type: text/html', 4 => 'Connection: keep-alive', 5 => 'Content-Encoding: gzip', 6 => 'Date: ' . gmdate('D, M Y G:i:s \\G\\M\\T'));
}
foreach ($http_response_header as $header) {
    // if (preg_match('/Cookie/',$header)) continue;
    header($header);
}
echo $result_out;
    if (PROXY) {
        $result = file_get_contents($url, false, $context);
    } else {
        if (!preg_match('/inAppBuy/', $_SERVER['REQUEST_URI']) && !preg_match('/inAppTransactionDone/', $_SERVER['REQUEST_URI']) && !preg_match('/verifyReceipt/', $_SERVER['REQUEST_URI']) && !preg_match('/offerAvailabilityAndInfoDialog/', $_SERVER['REQUEST_URI']) && !preg_match('/verifyReceipt/', $_SERVER['REQUEST_URI']) && !preg_match('/inAppCheckRecurringDownloadQueue/', $_SERVER['REQUEST_URI'])) {
            $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>