Skip to content

Instantly share code, notes, and snippets.

@ibnux
Created September 22, 2015 00:23
Show Gist options
  • Save ibnux/9082ee6f24c61240012f to your computer and use it in GitHub Desktop.
Save ibnux/9082ee6f24c61240012f to your computer and use it in GitHub Desktop.
hasil compile waruga menjadi phar membutuhkan file ini agar waruga.phar bisa digunakan
<?php
/* Waruga installer
aplikasi untuk Install Waruga
http://ibnux.github.io/Waruga/
Untuk PC atau laptop jalankan di webserver PHP
Untuk Android install aplikasi Server for PHP
https://play.google.com/store/apps/details?id=com.esminis.server.php
jalankan aplikasi untuk install server
untuk keamanan, pilih IP 127.0.0.1
simpan file ini di internal memory /www/
Created by @iBNuX
*/
if(file_exists("waruga.phar") && !isset($_GET["upgrade"]))
require "waruga.phar";
else{
$manifest = "ew0KICAibmFtZSI6ICJXYXJ1Z2EiLA0KICAiaWNvbnMiOiBbDQogICAgew0KICAgICAgInNyYyI6ICIuLz9maWxlJmFwYT1pbWFnZXMvd2FydWdhLWljb24tMC03NXgucG5nIiwNCiAgICAgICJzaXplcyI6ICIzNngzNiIsDQogICAgICAidHlwZSI6ICJpbWFnZS9wbmciLA0KICAgICAgImRlbnNpdHkiOiAiMC43NSINCiAgICB9LA0KICAgIHsNCiAgICAgICJzcmMiOiAiLi8/ZmlsZSZhcGE9aW1hZ2VzL3dhcnVnYS1pY29uLTF4LnBuZyIsDQogICAgICAic2l6ZXMiOiAiNDh4NDgiLA0KICAgICAgInR5cGUiOiAiaW1hZ2UvcG5nIiwNCiAgICAgICJkZW5zaXR5IjogIjEuMCINCiAgICB9LA0KICAgIHsNCiAgICAgICJzcmMiOiAiLi8/ZmlsZSZhcGE9aW1hZ2VzL3dhcnVnYS1pY29uLTEtNXgucG5nIiwNCiAgICAgICJzaXplcyI6ICI3Mng3MiIsDQogICAgICAidHlwZSI6ICJpbWFnZS9wbmciLA0KICAgICAgImRlbnNpdHkiOiAiMS41Ig0KICAgIH0sDQogICAgew0KICAgICAgInNyYyI6ICIuLz9maWxlJmFwYT1pb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joicGFzc3dvcmQ9IiwiU01TX1N1Y2Nlc3NfUGFyYW1ldGVyIjoiTWVzYWdlIFNFTlQhIiwiU01TX0plZGFfUGVuZ2lyaW1hbiI6IjE1IiwiU01TX0p1bWxhaF9QZW5naXJpbWFuIjoiNSIsInNlcGFyYXRvcjIiOiJzZXBhcmF0b3IiLCJHdW5ha2FuX0Jsb2siOiJ0cnVlIiwiR3VuYWthbl9MYWJlbCI6InRydWUiLCJHdW5ha2FuX0RlbmFoIjoidHJ1ZSIsInNlcGFyYXRvcjMiOiJzZXBhcmF0b3IiLCJTYW5kaV9TaW5rcm9uaXNhc2kiOiJ3YXJ1Z2EiLCJVbmdnYWhfRm90b19LVFBfS0siOiJ0cnVlIiwiQm9sZWhfSGFwdXNfRGF0YV9LYXMiOiJ0cnVlIn0=";
if(!file_exists("manifest.json"))
file_put_contents("manifest.json",base64_decode($manifest));
if(!file_exists("config.json"))
file_put_contents("config.json",base64_decode($config));
set_time_limit(0);
$fp = fopen (dirname(__FILE__) . '/waruga.phar', 'w+');//This is the file where we save the information
$ch = curl_init(str_replace(" ","%20","http://ibnux.github.io/Waruga/unduh/waruga.phar"));//Here is the file we are downloading, replace spaces with %20
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt($ch, CURLOPT_FILE, $fp); // write curl response to file
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch); // get curl response
curl_close($ch);
fclose($fp);
$fp = fopen (dirname(__FILE__) . '/versi.txt', 'w+');//This is the file where we save the information
$ch = curl_init(str_replace(" ","%20","http://ibnux.github.io/Waruga/unduh/versi.txt"));//Here is the file we are downloading, replace spaces with %20
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt($ch, CURLOPT_FILE, $fp); // write curl response to file
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch); // get curl response
curl_close($ch);
fclose($fp);
if(isset($_GET["upgrade"]))
header("location: ./?");
else
header("location: ./?apa=settings");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment