Skip to content

Instantly share code, notes, and snippets.

View MakStashkevich's full-sized avatar
🍀
believe on the best

Maksim Stashkevich MakStashkevich

🍀
believe on the best
View GitHub Profile
@dktapps
dktapps / run.php
Last active February 15, 2023 04:52
A basic UDP proxy used to bypass client-side Xbox Live authentication in MCPE 1.2.
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
@Frago9876543210
Frago9876543210 / Gui.cs
Created September 7, 2017 12:59
inv menu
using MiNET.Items;
using MiNET.Net;
using MiNET.Plugins;
using MiNET.Plugins.Attributes;
using MiNET.Utils;
using TestPlugin.Player;
namespace GuiPlugin
{
[Plugin]
@Frago9876543210
Frago9876543210 / info.php
Last active July 11, 2018 11:17
Get server info
<?php
/**
* Script for get info from target server
* @link https://github.com/Frago9876543210
* @author Frago9876543210
*/
declare(strict_types=1);
<?php
declare(strict_types=1);
namespace test;
use pocketmine\entity\Skin;
use pocketmine\event\Listener;
use pocketmine\event\player\PlayerChatEvent;
<?php
class Skin{
public static function getTextureFromFile(string $filename) : string{
$im = imagecreatefrompng($filename);
list($width, $height) = getimagesize($filename);
$bytes = "";
for($y = 0; $y < $height; $y++){
for($x = 0; $x < $width; $x++){
$code = imagecolorat($im, $x, $y);
$bytes .= chr(($code >> 16) & 0xff) . chr(($code >> 8) & 0xff) . chr(($code >> 16) & 0xff) . ($code >> 24) & 0xff;
2017-12-26 10:30:10,034 DEBUG MiNET.Client.MiNetClient - PlayerEquipment: Entity ID: 19, Selected Slot: 9, Slot: 0, Item ID: 0
2017-12-26 10:30:10,034 DEBUG MiNET.Client.MiNetClient - > Receive: 13 (0x0d): McpeAddEntity
2017-12-26 10:30:10,048 DEBUG MiNET.Client.MiNetClient - McpeAddEntity Entity ID: -4294967290
2017-12-26 10:30:10,048 DEBUG MiNET.Client.MiNetClient - McpeAddEntity Runtime Entity ID: 4
2017-12-26 10:30:10,048 DEBUG MiNET.Client.MiNetClient - Entity Type: 2118423 - 0x205317
2017-12-26 10:30:10,048 DEBUG MiNET.Client.MiNetClient - Entity Family: 83 - 0x53
2017-12-26 10:30:10,048 DEBUG MiNET.Client.MiNetClient - Entity Type ID: 23 - 0x17 Horse
2017-12-26 10:30:10,048 DEBUG MiNET.Client.MiNetClient - X: 781.3013
2017-12-26 10:30:10,048 DEBUG MiNET.Client.MiNetClient - Y: 4
2017-12-26 10:30:10,048 DEBUG MiNET.Client.MiNetClient - Z: 11.02353
@Encritary
Encritary / Trading.php
Created December 27, 2017 05:09
Trading example for GenisysPro or Prismarine server softwares
<?php
namespace Encritary;
use pocketmine\entity\Entity;
use pocketmine\entity\Villager;
use pocketmine\event\Listener;
use pocketmine\event\player\PlayerInteractEvent;
use pocketmine\event\player\PlayerQuitEvent;
use pocketmine\event\server\DataPacketReceiveEvent;
@Encritary
Encritary / Trading.php
Created December 27, 2017 05:30
Trading example for Prismarine 1.2; to use this on pmmp you have to rewrite this a bit
<?php
namespace Encritary;
use pocketmine\entity\Entity;
use pocketmine\entity\Villager;
use pocketmine\event\Listener;
use pocketmine\event\player\PlayerInteractEvent;
use pocketmine\event\player\PlayerQuitEvent;
use pocketmine\event\server\DataPacketReceiveEvent;
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
@ijortengab
ijortengab / mysqldump.sh
Created February 7, 2018 05:20
Synchronize database MySQL - Gak Pake Lama
#!/bin/bash
# Filename: mysqldump.sh
# Author: IjorTengab (http://ijortengab.id)
# Last Update: 2018-02-07
#
# Variables. Set by your own value.
HOST=
USER=
PASSWORD=
DATABASE=