예제 #1
0
     $logger->critical("Please use the installer provided at BukkitPE.net, or recompile PHP again.");
     $logger->shutdown();
     $logger->join();
     exit(1);
     //Exit with error
 }
 if (file_exists(\BukkitPE\PATH . ".git/refs/heads/master")) {
     //Found Git information!
     define("BukkitPE\\GIT_COMMIT", strtolower(trim(file_get_contents(\BukkitPE\PATH . ".git/refs/heads/master"))));
 } else {
     //Unknown :(
     define("BukkitPE\\GIT_COMMIT", str_repeat("00", 20));
 }
 @define("ENDIANNESS", pack("d", 1) === "?ð" ? Binary::BIG_ENDIAN : Binary::LITTLE_ENDIAN);
 @define("INT32_MASK", is_int(0xffffffff) ? 0xffffffff : -1);
 @ini_set("opcache.mmap_base", bin2hex(Utils::getRandomBytes(8, false)));
 //Fix OPCache address errors
 if (!file_exists(\BukkitPE\DATA . "server.properties") and !isset($opts["no-wizard"])) {
     new Installer();
 }
 if (\Phar::running(true) === "") {
     $logger->info("§c{--------------------====================--------------------}");
     $logger->info("§6BukkitPE - MCPE Server Software");
     $logger->info("§9- §eYou may use on production");
     $logger->info("§9- §ePlugins: Forums.BukkitPE.net/plugins (Being work on)");
     $logger->info("§9- §eSite: BukkitPE.net (Being work on)");
     $logger->info("§9- §eBugs?: https://github.com/BukkitPE/BukkitPE/issues");
     $logger->info("§9- §3BukkitPE was made by: AndreTheGamer , DelxHQ");
     $logger->info("§c{---------------------====================--------------------}");
 }
 ThreadManager::init();
예제 #2
0
 private function networkFunctions()
 {
     $config = new Config(\BukkitPE\DATA . "server.properties", Config::PROPERTIES);
     echo "[!] " . $this->lang->query_warning1 . "\n";
     echo "[!] " . $this->lang->query_warning2 . "\n";
     echo "[?] " . $this->lang->query_disable . " (y/N): ";
     if (strtolower($this->getInput("n")) === "y") {
         $config->set("enable-query", false);
     } else {
         $config->set("enable-query", true);
     }
     echo "[*] " . $this->lang->rcon_info . "\n";
     echo "[?] " . $this->lang->rcon_enable . " (y/N): ";
     if (strtolower($this->getInput("n")) === "y") {
         $config->set("enable-rcon", true);
         $password = substr(base64_encode(@Utils::getRandomBytes(20, false)), 3, 10);
         $config->set("rcon.password", $password);
         echo "[*] " . $this->lang->rcon_password . ": " . $password . "\n";
     } else {
         $config->set("enable-rcon", false);
     }
     /*echo "[*] " . $this->lang->usage_info . "\n";
     		echo "[?] " . $this->lang->usage_disable . " (y/N): ";
     		if(strtolower($this->getInput("n")) === "y"){
     			$config->set("send-usage", false);
     		}else{
     			$config->set("send-usage", true);
     		}*/
     $config->save();
     echo "[*] " . $this->lang->ip_get . "\n";
     $externalIP = Utils::getIP();
     $internalIP = gethostbyname(trim(`hostname`));
     echo "[!] " . $this->lang->get("ip_warning", ["{{EXTERNAL_IP}}", "{{INTERNAL_IP}}"], [$externalIP, $internalIP]) . "\n";
     echo "[!] " . $this->lang->ip_confirm;
     $this->getInput();
 }
예제 #3
0
 public function regenerateToken()
 {
     $this->lastToken = $this->token;
     $this->token = @Utils::getRandomBytes(16, false);
 }