Skip to content

Instantly share code, notes, and snippets.

View Romain-P's full-sized avatar
🈴
/home

- Romain-P

🈴
/home
View GitHub Profile
@Romain-P
Romain-P / internal.cpp
Last active March 28, 2019 23:29
segfault
namespace utf8
{
// The typedefs for 8-bit, 16-bit and 32-bit unsigned integers
// You may need to change them to match your system.
// These typedefs have the same names as ones from cstdint, or boost/cstdint
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
// Helper code - not intended to be directly called by the library users. May be changed at any time
environment buildCgiEnvironment(Request &request) {
boost::process::environment cgi_env = boost::this_process::environment();
cgi_env["SCRIPT_FILENAME"] = "." + request.uri;
cgi_env["SERVER_PROTOCOL"] = request.protocol;
cgi_env["REQUEST_METHOD"] = request.method;
cgi_env["GATEWAY_INTERFACE"] = "CGI/1.1";
cgi_env["REDIRECT_STATUS"] = "200";
return cgi_env;
@Romain-P
Romain-P / CMakeLists.cmake
Created March 7, 2019 08:08
Cmake php-cgi install on UNIX
if (UNIX)
execute_process(
COMMAND bash "-c" "bash ${CMAKE_SOURCE_DIR}/sources/modules/php/dist/php-cgi/linux/install.sh"
RESULT_VARIABLE
RET
)
if(RET EQUAL "1")
message(FATAL_ERROR "Error while installing php-cgi, please install it manually")
endif()
endif(UNIX)
@Romain-P
Romain-P / LibraryLoader.h
Created March 7, 2019 06:35
win/unix library loader
//
// Created by romain on 3/4/19.
//
#ifndef ZIA_DYNAMICLIBRARY_H
#define ZIA_DYNAMICLIBRARY_H
#ifdef _WIN32
#include "windows.h"
#else
if not credentials then
function Credentials()
return "romain", "romainpass"
end
end
local lIlII11liI1IlliiiiIli = assert local lIlIlli1ii1liI1lli1 = tonumber local li11lIIIlIi1iiIIIII = unpack local lIlliii11iIl1i11i1l1I = pcall local lIlIiIllillii1IlI1i = setfenv local ilil1ii11lilIli11Il = setmetatable local lIII1l1Ii11IlllIIii = type local i1il111ll1lIiliII1I = getfenv local i1Iillllil111I1i1ll = tostring local iIllilI1llllI1iiI11 = error local l1l1iiI1iiIIl1I1ll1 = 1 local function IllI11ii1liii11IIii(II1ill1iilili11IIIi, i1li1IllIii1iiIlliI) local IIiili1111l1l1IIliI II1ill1iilili11IIIi = II1ill1iilili11IIIi:sub(5):gsub("..", function(lill1iIIli11iiiI1ll) if lill1iIIli11iiiI1ll:byte(2) == 71 then IIiili1111l1l1IIliI = lIlIlli1ii1liI1lli1(lill1iIIli11iiiI1ll:sub(1, 1)) return "" else local liIlIl1l1li1lIi111l = lill1iIIli11iiiI1ll.char(lIlIlli1ii1liI1lli1(lill1iIIli11iiiI1ll, 16)) if IIiili1111l1l1IIliI then local i1l1i11lliiI1lii1i1 = liIlIl1l1li1lIi111l:rep(IIiili1111l1l1IIliI) IIiili1111l1l1IIliI
@Romain-P
Romain-P / segfault.json
Created December 8, 2018 13:22
segfault
==17091== Block was alloc'd at
==17091== by 0x455FAB: void std::vector<std::unique_ptr<GameEngine::GameObject, std::default_delete<GameEngine::GameObject> >, std::allocator<std::unique_ptr<GameEngine::GameObject, std::default_delete<GameEngine::GameObject> > > >::_M_realloc_insert<std::unique_ptr<GameEngine::GameObject, std::default_delete<GameEngine::GameObject> > >(__gnu_cxx::__normal_iterator<std::unique_ptr<GameEngine::GameObject, std::default_delete<GameEngine::GameObject> >*, std::vector<std::unique_ptr<GameEngine::GameObject, std::default_delete<GameEngine::GameObject> >, std::allocator<std::unique_ptr<GameEngine::GameObject, std::default_delete<GameEngine::GameObject> > > > >, std::unique_ptr<GameEngine::GameObject, std::default_delete<GameEngine::GameObject> >&&) (vector.tcc:427)
==17091== by 0x455EB5: emplace_back<std::unique_ptr<GameEngine::GameObject, std::default_delete<GameEngine::GameObject> > > (vector.tcc:109)
==17091== by 0x455EB5: GameEngine::Scene::addObject(GameEngine::GameObjec
@Romain-P
Romain-P / CBC release
Last active October 31, 2018 18:55
warrior-script-AES
GJHKBr+JGruPt+xvZxksSWEcQj22nb9KwbNJXnjJUljIB3aZ7a5m7w3fCVLu4OdJqvN3Hj9b6j/MsPN1kta7rglq6lJi6ShjLLWJO+TTuCICMwQMClEsGYivhPQ8QbWNVMyfh3Biz8lgJ3rXXp+p+0a4+LItcfnkJ4fXomaES9hLfrMMw51SKGR8gvAzKiEUS2S4Tkz1A8aNYJD6jUJfcVxdK2Ld2A40sfXEq5kxyoeF2PeGSLpllxh8IYyFYmzlPiRnj5mbTGTbGzayIXZyP0JHwVinrCwF+e+5iJ3/caP2k3EMOTNPwtsIwFSDt4P8Tdw1EunBSB2jslSBrjyh6GrvLjKxVhSPH+ghbQj3+J7Ezrdz3OuV+5npw4i0pFGsdmaZE3A10gnfBCuzL3hfzzeKw6DHRIIXMTgiT8v2f2y99ycqdy4SAA95IFDOP20sdD6TveyYrkMUKW3rdY8QVvUQpXbhX4ghbbiwWXTGGaFjA9xsFKK2IXS5Igd94rQtbM57Ar6A6zEsadUpOGjxvvqSmWDNfngSIWwTY/RxGTrA2srUMbLc32TWO+LSgC7PE53bYrtN5u5dRjck6jEvvjl1y1HneRYqd7LgayIqdhAa4br14OzFQ5vEe+nsX129neSnqywQu+0XD5zyBj8I1oen/885J9CW/NqeUdkkKeSbWKjgBbT4M18IMlXf0ZDzfXwDl7E8LIe9YYO+esLCZPGRz79dNjNyis9psnC7w6ZLLgFKxNCIXspVfYeplf9Mg5+pAq03ZudOF+jDyPfLyFxMYsw3c/0t/oqComysDEOlBtVeiUzQBRHL26i7v5KkavPdN50m04azeymcqT3H55yd+aN1AA+ymRAkXHTjbBRIphaEHSVKYdAqvhZwjI5d9K/WS6te1qN8qA7tayTLAG7LDX2bkDSW89L+r6aHXLzYa15UR0/1VzhtnxRTJzc2ISeDQHbtUs35UG52iSD+qbeAdnSe2/ZWg2CW9GaRBvF1epcUgWgdrvkp75Pm17+C
@Romain-P
Romain-P / HelloConnectMessage.h
Created October 4, 2018 06:20
sample protocol msg
//
// Created by romain on 01/10/18.
//
#ifndef SERVER_HELLOCONNECTMESSAGE_H
#define SERVER_HELLOCONNECTMESSAGE_H
#include "../shared/BinaryWriter.h"
#include "../shared/BinaryReader.h"
#include "../shared/hook/NetworkMessage.h"
@Romain-P
Romain-P / server.py
Last active September 28, 2018 09:20
import SimpleHTTPServer
import SocketServer
import re
def encrypt(plaintext):
#TODO: encryption AES-128-ECB
cypher = 'cyphertext should be returned here as base64'
if not ui_defined then
ui_defined = true
target = "target"
player = "player"
player_object = GetObjectWithGUID(UnitGUID(player))
focus = "focus"
arena1 = "arena1"
arena2 = "arena2"
arena3 = "arena3"