Skip to content

Instantly share code, notes, and snippets.

@potetisensei
potetisensei / 5.cpp
Created December 15, 2013 07:26
Source上げるゾ
#include <cstdio>
#include <vector>
#include <utility>
#include <algorithm>
#include <queue>
#define INF 0xfffffff
using namespace std;
@potetisensei
potetisensei / decompile.cs
Last active December 28, 2015 23:49
bin100 source
public void check_password(string password) {
string environmentVariable = MyProject.Application.GetEnvironmentVariable("USERNAME");
string s = "_P4d11n9_" + environmentVariable + "_P4d11n9_";
MD5CryptoServiceProvider cryptoServiceProvider = new MD5CryptoServiceProvider();
byte[] hash1 = cryptoServiceProvider.ComputeHash(Encoding.UTF8.GetBytes(s));
int[] numArray = new int[6] {1310, 1450, 1435, 1316, 1302, 1439};
int index1 = 0;
int num1 = 0;
int num2 = hash1.Length - 1;
int index2 = num1;
@potetisensei
potetisensei / script.py
Last active December 28, 2015 23:39
bin 150
flag = "jV[\036xR_Y\036WM\004\036]\006\017\b_\006[_\\\r\r_\b\t\a\n\t]Z\b\n\t_\tX]\aX\\\f\v\n"
print "".join(chr(ord(c) ^ (0x37+7)) for c in flag)
@potetisensei
potetisensei / script.py
Last active December 28, 2015 23:39
CSCamp bin100
from hashlib import md5
from sys import exit
def check(s):
vals = [1310, 1450, 1435, 1316, 1302, 1439]
return all(ord(s[i*3])^1337 == vals[i] for i in range(6))
chars = ["", "_"] + [chr(i) for i in range(ord("A"), ord("Z")+1)] + [chr(i) for i in range(ord("a"), ord("z")+
1)]
password = "6sZh2HZCx3DI66Xs"
@potetisensei
potetisensei / exception.h
Created October 27, 2013 16:04
動くか知らん
#include <setjmp.h>
#include "stack.h"
#include "queue.h"
#include "template.h"
#define _tmp_var(name) \
__tmp_var(name, __LINE__)
#define __tmp_var(name, line) \
___tmp_var(name, line)