Skip to content

Instantly share code, notes, and snippets.

@hhc0null
hhc0null / hex2asc.py
Last active December 10, 2015 18:38
hex2asc.py 0.0.1, a converter to ascii characters from hex strings. Basic Usage: $ hex2asc.py --space 41 41 41 AAA $ hex2asc.py 414141 AAA --- i have to finish a repot of phisics...
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import sys
argc = len(sys.argv)
argv = sys.argv
def ShowUsage():
@hhc0null
hhc0null / result_length_regexdb.txt
Created January 2, 2013 11:05
Result of regex_length.py
Length of strings: 1: 0
Length of strings: 2: 0
Length of strings: 3: 0
Length of strings: 4: 0
Length of strings: 5: 1: 29C3_
Length of strings: 6: 0
Length of strings: 7: 0
Length of strings: 8: 0
Length of strings: 9: 1: Key: None
Length of strings: 10: 2
@hhc0null
hhc0null / regexdb_length.py
Last active December 10, 2015 12:28
CCC CTF, Web100 regexdb
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import urllib
url = 'http://94.45.252.233/'
for i in range(100): # from 0 to 100.
params = urllib.urlencode({'input': '/(^.{'+str(i+1)+'}$)/'}) # search the length of string.
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import sys
# RSA Decipher for SECCON CTF 4(Yokohama)
# Author: Matsukuma Hiroki a.k.a. hhc0null <[email protected]>
# Usage: ./RSA_Decipher < [Crypted Text]
@hhc0null
hhc0null / gist:3884904
Created October 13, 2012 14:57
revstr.py
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
usage = """revstr.py 0.0.1, a reversing tool for common files.
Basic Usage:
revstr.py < [filename]
cat [filename]|./revstr.py
@hhc0null
hhc0null / gist:3065044
Created July 7, 2012 06:19
aoj-0200-Traveling_Alone__One-way_Ticket_of_Youth-Runtime_Error.cpp
// HELP ME!!!!! WHAT'S WRONG!!!!
#include <iostream>
const unsigned int inf = 1 << 26;
const int MAX_OF_INFOMATIONS = 300;
const int MAX_OF_STATIONS = 100;
const int MAX_OF_ENQUIRIES = 200;
int dijk(int m, int n, int s, int g[2][MAX_OF_STATIONS][MAX_OF_STATIONS], int ary[2][MAX_OF_STATIONS][MAX_OF_STATIONS]) {
@hhc0null
hhc0null / gist:2182673
Created March 24, 2012 13:15
aoj-0008-Sum_of_4_Integers.cpp
// AOJ0008
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <stack>
int main() {
int i, j, k, l, n, cnt;
@hhc0null
hhc0null / gist:1964977
Created March 3, 2012 08:22
CTPC-A-Average.cpp
#include <cstdio>
int main() {
int a[4] = {0};
int sum = 0, max = 0;
for(int i = 0; i < 4; i++) {
scanf("%d", &a[i]);
max = (max < a[i])? a[i]: max;
sum += a[i];
@hhc0null
hhc0null / gist:1779341
Created February 9, 2012 11:12
aoj-0007-Debt_Hell.cpp
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <stack>
using namespace std;
int main() {
int week, tmp, rep = 100000;
@hhc0null
hhc0null / gist:1748830
Created February 6, 2012 01:33
vimrc_kuzu
set nocompatible
filetype indent plugin on
syntax on
set autoindent
set nostartofline
set backspace=indent,eol,start