Skip to content

Instantly share code, notes, and snippets.

View ptr-yudai's full-sized avatar

Yudai ptr-yudai

  • Japan
View GitHub Profile
@ptr-yudai
ptr-yudai / elf_md5colliding.c
Last active August 28, 2016 14:04
md5colliding - Cryptography - katagaitaiCTF#5 関西med
/* for x86 linux */
#include <stdio.h>
int main(int argc, char** argv)
{
char c = argv[0][2];
if (c == '1') {
puts("All Eindbazen are wearing wooden shoes");
} else if (c == '2') {
@ptr-yudai
ptr-yudai / solve_hashme.py
Last active August 28, 2016 15:31
hashme - Cryptography - katagaitaiCTF#5 関西med
# coding: utf-8
from pwn import *
#
# crypto200.pyからそのまま引用
#
from math import sin
from urlparse import parse_qs
from base64 import b64encode
from base64 import b64decode
@ptr-yudai
ptr-yudai / brainf__k.py
Created August 14, 2016 07:08
brainf**kで文字列を出力するコードを出力するコード
# coding: utf-8
import math
# 出力されるbrainf**kコード
code = ""
# brainf**kから出力したい文字
text = "Furutsuki is a Pro!"
# 1文字ずつ
for c in text:
# coding: utf-8
from z3 import *
s = Solver()
LENGTH = 6
# 6文字のテキスト
text = [BitVec('text[{0}]'.format(i), 32) for i in range(LENGTH)]
@ptr-yudai
ptr-yudai / steak.c
Created February 6, 2016 14:51
beef_steak
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
char cmpdata[0x28] = "\x62\x31\xaa\x85\xbd\xbf\x9f\xf3\x8a\x02\x0c\x75\xac\x23\xab\xe4\x82\xc5\x25\x7a\xef\xbd\xc9\x61\x00\x54\x68\x61";
/* 0x400da6 */
char key[0x28]; /* 0x6020e0 */
char output[0x28]; /* 0x602120 */
unsigned char state[0x100]; /* 0x602160 */