Skip to content

Instantly share code, notes, and snippets.

# CODEGATE 2014 web500 writeup (泣いている)
use 5.016;
use warnings;
use utf8;
use LWP::UserAgent;
# 150ワードあたりの文字出現数
# a: 303
# b: 115
# c: 153
@akiym
akiym / amida.py
Last active August 29, 2015 14:04
あみだくじ (akiym, xrekkusu)
# -*- coding: utf-8 -*-
import os
import sys
import time
import re
from pwn import *
s = process('amida')
# thanks~~ http://arc006.contest.atcoder.jp/submissions/140243
dump.bin: file format binary
Disassembly of section .data:
00000000 <.data>:
_start:
0: 40 1e 00 00 movhi 0, r0, sp
4: 23 1e 80 17 movea 6016, sp, sp
@akiym
akiym / explicit.py
Last active August 29, 2015 14:06
No cON Name CTF Quals 2014 - eXPLicit
# -*- coding: utf-8 -*-
import os
import sys
import time
import re
from pwn import *
from libformatstr import *
REMOTE = 0
@akiym
akiym / exploit2.py
Created July 6, 2015 08:25
魔改造ropasaurusrex writeup #katagaitaiCTF
# -*- coding: utf-8 -*-
import os
import sys
import time
import re
import struct
import socket
p = lambda x: struct.pack("<I", x)
u = lambda x: struct.unpack("<I", x)[0]
@akiym
akiym / gist:525295
Created August 15, 2010 09:37
Gyazo
#!/usr/bin/env perl
use Mojolicious::Lite;
use Mojo::Asset::File;
use Digest::MD5 qw(md5_hex);
use File::Spec;
use IO::File;
my $dir = app->home->rel_dir('images');
@akiym
akiym / gist:794857
Created January 25, 2011 12:28
Furl
use strict;
use warnings;
use Furl;
use LWP::UserAgent;
my $url = 'http://blog.livedoor.jp/dqnplus/';
{
my $furl = Furl->new;
my $res = $furl->get($url);
@akiym
akiym / _cpanm
Created March 31, 2011 05:54
zsh autcompletion for plackup / cpanm / dzil
#compdef cpanm
#autoload
typeset -A opt_args
local context state line
_arguments -C \
'(-h)'{-h,--help}'[prints help]' \
'(-v --verobse)'{-v,--verbose}'[turn on chatty output.]' \
'(-q --quiet)'{-q,--quiet}'[turn off the most output.]' \
@akiym
akiym / markdown.pl
Created April 2, 2011 08:00
preview in real-time.
use Mojolicious::Lite;
use Text::Markdown qw/markdown/;
get '/' => sub {
my $self = shift;
$self->render('index');
};
post '/markdown' => sub {
my $self = shift;
@akiym
akiym / realtime.pl
Created April 2, 2011 16:10
preview in real-time 2.
use Mojolicious::Lite;
use feature qw/switch/;
use utf8;
use Text::Markdown qw/markdown/;
use Text::Xatena;
use Pod::Simple::XHTML;
get '/' => 'index';
my $xatena = Text::Xatena->new();