Version 2 trouvée

This commit is contained in:
Geoffrey Frogeye 2017-04-05 08:40:30 +02:00
parent 54c24457e9
commit bba4b09ee9
6 changed files with 425 additions and 440 deletions

View file

@ -20,7 +20,7 @@ function addRelease($input) {
$url = 'http://s3.amazonaws.com/MinecraftDownload/minecraft.jar';
} else {
$type = 'apr';
$url = 'http://assets.minecraft.net/'.$input.'/minecraft.zip';
$url = 'http://assets.minecraft.net/'.$input.'/minecraft.jar';
}
// Chargement du XML
@ -43,28 +43,13 @@ function addRelease($input) {
// Extraction et copie de minecraft.jar
$directory = $id.' - '.$lastVersions_e[0].' ('.rand(1, 1000).')';
if (!mkdir($directory) OR !copy($url, $directory.'/minecraft.jar')) { return 'ERREUR Impossible de copier le fichier ou de cr<63>er un nouveau dossier.';}
if ($type == 'r') {
$zip = new ZipArchive;
if ($zip->open($directory.'/minecraft.jar') AND mkdir($directory.'/content')) {
$zip->extractTo($directory.'/content');
$zip->close();
}
} else {
$zip = new ZipArchive;
if ($zip->open($directory.'/minecraft.jar') AND mkdir($directory.'/extract')) {
$zip->extractTo($directory.'/extract');
$zip->close();
$zip2 = new ZipArchive;
if ($zip2->open($directory.'/extract/bin/minecraft.jar') AND mkdir($directory.'/content')) {
$zip2->extractTo($directory.'/content');
$zip2->close();
} else {
return 'ERREUR Impossible d\'extraire le fichier ou de cr<63>er un nouveau dossier².';
}
} else {
return 'ERREUR Impossible d\'extraire le fichier ou de cr<63>er un nouveau dossier.';
}
}
$md5 = md5_file($directory.'/minecraft.jar');
directoryConstruct($directory.'/content', $files, $data, directoryOld($release));

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
1336223378|1.2.5|8e8778078a175a33603a585257f28563|12w18a|37d778548796dd95c4d0ea49a015be06|27|12w18a|apr
1341566731|1.2.5|8e8778078a175a33603a585257f28563|UP|ac908492cdfe6c1d81183d2d2d7959a1|34|12w24a|apr

View file

@ -50,7 +50,7 @@ if (substr($lastVersions_e[3], 0, 2) == substr(date('Y'), 2, 2) AND substr($last
if (true) {
// if (((date('D') == 'Thu') AND $nextAPR_firstOfWeek AND time()-$lastVersions_e[0] >= 5) OR time()-$lastVersions_e[0] >= 10) {
debug('nextAPR check 1');
if (@fopen('http://assets.minecraft.net/'.$nextAPR.'/minecraft.zip', 'r')) {
if (@fopen('http://assets.minecraft.net/'.$nextAPR.'/minecraft.jar', 'r')) {
include_once('addrelease.php');
echo addRelease($nextAPR);
exit();
@ -70,7 +70,7 @@ if (true) {
if (true) {
//if ((time()-$lastVersions_e[0] <= 20 AND !$nextAPR_firstOfWeek) OR (time()-$lastVersions_e[0] >= 60)) {
debug('lastAPR re-check');
if (@md5_file('http://assets.minecraft.net/'.$lastVersions_e[3].'/minecraft.zip') != $lastVersions_e[4]) {
if (@md5_file('http://assets.minecraft.net/'.$lastVersions_e[3].'/minecraft.jar') != $lastVersions_e[4]) {
include_once('addrelease.php');
echo addRelease($lastVersions_e[3]);
exit();