Skip to content

Instantly share code, notes, and snippets.

View cr0sh's full-sized avatar
🦀

Junghyun Nam cr0sh

🦀
View GitHub Profile
@cr0sh
cr0sh / compile.sh
Last active September 17, 2015 11:49
#!/bin/bash
[ -z "$PHP_VERSION" ] && PHP_VERSION="7.0.0RC3"
PHP_IS_BETA="yes"
ZEND_VM="GOTO"
ZLIB_VERSION="1.2.8"
POLARSSL_VERSION="1.3.8"
LIBMCRYPT_VERSION="2.5.8"

Before reading, please consider I have poor English writing skills. Sorry. :(

What is 'Magenta'?

'Magenta' is Python script, which are made to crash PocketMine-MP servers, exactly PocketMine-Raklib.

How is it possible?

To understand this, you should know how Raklib's session system is working. Raklib creates every session per IP/Port to manage each clients, and these sessions are PHP objects.

They have many properties, such as $messageIndex, $address, $port, etc. What we need to play with is $preJoinQueue[] array. This contains MCPE DataPackets before a server-client handshake, and all stored packets will be processed after the connection process is completed. (See This)

from os import system
from sys import exit
from platform import platform
from random import choice
from time import time
from math import floor
from sys import version_info
if version_info[0] != 3:
print('Python 3 required')
#!/bin/bash
#Needed to use aliases
shopt -s expand_aliases
type wget > /dev/null 2>&1
if [ $? -eq 0 ]; then
if [ "$IGNORE_CERT" == "yes" ]; then
alias download_file="wget --no-check-certificate -q -O -"
else
alias download_file="wget -q -O -"
#!/bin/bash
echo 이 쉘 스크립트는 리눅스에서 MiNET을 쉽게 설치해줍니다
echo 쉘 스크립트 제작자: 푸른곡괭이, MiNET 제작자: NiclasOlofsson님
echo 정말 간단하게 만들어진 쉘 스크립트입니다 정말로 하루만에 만들었습니다
echo $(date) 설치를 시작합니다...
echo Git가 설치되어있나요? \(네/아니요\)
read gitanswer
if [ $gitanswer -eq 네 ]
then
@cr0sh
cr0sh / synopsis-draft.md
Last active March 6, 2016 12:53
Synopsis Language draft(Korean)

Synopsis language

목적: 메모리 오류를 방지하는 동시성 프로그래밍

사전 고찰

동시성 프로그래밍에서의 위험 요소: Race conditionDeadlock

Rust 언어의 해결 방안: move-by-default, ownership, lifetime

  • = 연산자는 변수의 ownership(소유권)을 이동시킴
@cr0sh
cr0sh / synopsis-draft-2.md
Last active March 6, 2016 12:46
Synopsis Language draft #2(Korean)

Synopsis language

목적: 메모리 오류를 방지하는 동시성 프로그래밍

사전 고찰

동시성 프로그래밍에서의 위험 요소: Race conditionDeadlock

Rust 언어의 해결 방안: move-by-default, ownership, lifetime

  • = 연산자는 변수의 ownership(소유권)을 이동시킴
@cr0sh
cr0sh / .vimrc
Last active March 26, 2016 02:53
set nocompatible
filetype off
set hlsearch
set scrolloff=3
set nobackup
set noswapfile
set bs=eol,start,indent
set autoread
set smarttab
" set smartindent
package main
import (
"fmt"
"io/ioutil"
"math/big"
"os"
"strconv"
"time"
)
package main
import (
"fmt"
"io/ioutil"
"math/big"
"os"
"strconv"
"time"
)