Skip to content

Instantly share code, notes, and snippets.

View P1kachu's full-sized avatar
Working on ECUs and speed limiters

Stanislas Lejay P1kachu

Working on ECUs and speed limiters
View GitHub Profile
@P1kachu
P1kachu / P1kachu.txt
Created August 13, 2015 07:52
P1kachu
$$$$$
$NNN$$$:
$$$N $$$7 7$$$$$$$
$$>>>>$$$$$$$ NNN$
:$$$::::::::>>>NOO$
$: >$$$$
C> $777
$:Q: $ $$$$$$$
$:H: :H $?????$?
@P1kachu
P1kachu / commiter.sh
Created August 13, 2015 11:40
Random commit message
curl http://whatthecommit.com/ 2> /dev/null | sed '40q;d'| cut -c 4-
@P1kachu
P1kachu / shell_me_maybe.c
Created November 18, 2015 22:38
Test shellcode (C)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
const char shelly[] = ""; // Your shellcode
printf("Length: %lu\n", strlen(shelly));
@P1kachu
P1kachu / print_errno.h
Last active February 13, 2016 16:58
Errno printer (C/C++)
#include <errno.h>
#include <string.h>
#define NONE "\033[0m"
#define RED "\033[31m"
# define print_errno() \
{ \
if (errno) \
{ \
@P1kachu
P1kachu / angr-add.md
Last active June 6, 2016 15:13
Things to add/fix in angr's documentation and code

angr-doc

Useful

  • Basic blocks are broken on calls, unlike IDA
  • Pruned path are quite useless

Missing

  • Lots of pathgroup init parameters
  • Analysis techniques and heuristics used in CFGFast (there is a TODO already)

Unclear

@P1kachu
P1kachu / mmap.py
Created January 22, 2017 14:37
ROP mmap + read
#!/usr/bin/env python3
import sys
from v0lt import *
MMAP_SIZE = 0x1000
PERM_RWX = 0x7
def check_stack():
'''
@P1kachu
P1kachu / memosploit.ipynb
Last active March 6, 2017 11:02
First shot at exploiting memo (BKP2017 - pwn 300) (ipynb with gdb and py without)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@P1kachu
P1kachu / installation.sh
Created January 6, 2018 15:10
Installing FFMPEG + FFPYPLAYER + KIVY on Raspberry Pi 3 (Raspbian jessie)
#!/bin/sh
set -x
set -e
# Notes:
# This is how I was able to get a working kivy + ffpyplayer on my Rpi 3 (I can launch a mp4 video, at least)
#
# This script was not ran on a fresh distribution, so details might change.
# It was mainly copied from https://github.com/matham/ffpyplayer/blob/master/.travis.yml#L20
# Other steps required: Increasing the GPU memory (see https://github.com/kivy/kivy/issues/4662)
@P1kachu
P1kachu / hex_to_shellcode.sh
Last active March 22, 2022 05:19
Hexdump to shellcode
#!/bin/bash
# Translate hexdump output to ready_to_send shellcode
# C'EST PAS OPTI
# MAIS JE M'EN FOUS
to_shellcode()
{
hexdump -x $1
@P1kachu
P1kachu / calling_printf_osx.c
Created November 24, 2016 20:30
Calling printf in OSX - The overkill way
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <mach-o/dyld.h>
#include <mach-o/nlist.h>
#include <mach-o/dyld_images.h>
#include <mach/mach_vm.h>
/* Dyld is the OSX Dynamic Linker
* /usr/include//mach-o/loader.h