Skip to content

Instantly share code, notes, and snippets.

@hhc0null
hhc0null / .gdbinit
Created September 12, 2014 09:50
PEDA使えない環境?
# ~/.gdbinit
# show the 4 instructions include the next instruction to be executed.
display/4i $pc
# show the current EFLAGS.
display/t $ps
display/16wx $ebp - 0x20
display/16wx $esp
display/x $edi
display/x $esi
@hhc0null
hhc0null / un_code.c
Created October 15, 2014 10:45
un_code.c
/*
デフォルトで26.85に設定している.
_is_thermistor_adc_readyは1秒おきにtrueになる.(1秒おきに温度を取得して表示)
それ以外の間はずっと前回取得した値を表示する.
---
なぜか、26.85が表示されて、現在の値が表示されて、26.85が表示されて、現在の値が表示されて。。。という繰り返し
*/
void ControlRoutine(void)
{
@hhc0null
hhc0null / in-case-building-opencv-with-java.memo
Created October 29, 2014 10:28
In case you wanna build OpenCV with Java, set a JAVA_HOME variable.
it's necessary to do `export JAVA_HOME=/usr/lib/jvm/<jvm-directory>'.
@hhc0null
hhc0null / rpisverbose.txt
Last active August 29, 2015 14:08
RP IS VERBOSE!!!
# rp is verbose:( don't you think so?
rp -f [filename] -r 4|sed -r -e 's/\x1b\[[0-9]*m//g' -e 's/\(.*found\)//g'|grep -e 'ret[[:space:]]*;[[:space:]]*'
@hhc0null
hhc0null / q16_filter.c
Created December 6, 2014 05:53
あってるかどうかわからない
int filter(int size, char *shellcode)
{
int b1; // -0x10(%ebp)
int b2; // -0x14(%ebp)
int x; // -0xc(%ebp)
int y; // -0x8(%ebp)
int i; // -0x4(%ebp)
for(int i = 0; i < size; i+=2) {
b1 = (unsigned int)shellcode[i];
#!/usr/bin/env python2
# too sleepy.....it's kimoi.
# N = p*q
# C = M*(M+B) mod N
import binascii
import itertools
import string
@hhc0null
hhc0null / day18.c
Created December 19, 2014 09:07
waiwai
int table[255] = {0};
int mark = 0xdeadbeef;
int index = 0;
void generate_table()
{
for(index; index < 0xff; index++) {
if(table[index] == 0) {
table[index] = mark;
} else if((index+1)&2) {
@hhc0null
hhc0null / vimrc
Created December 23, 2014 09:31
vimrc
" vim: set fdm=marker commentstring=:
" neobundle {{{
set nocompatible
filetype off
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim
call neobundle#begin(expand('~/.vim/bundle/'))
endif
@hhc0null
hhc0null / day17.py
Last active August 29, 2015 14:12
ADCTF2014 Writeups(pwnable only)
#!/usr/bin/env python2
from pwning import *
import sys
if len(sys.argv) != 2:
print "Usage: {} [align]".format(sys.argv[0])
rhp = ("pwnable.katsudon.org", 32100)
#rhp = ("localhost", 32100)
i. identify the version
ii. pwn it!