This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!-*-coding:utf-8-*- | |
# H4CK1T CTF 2016 Online | |
# Chad – Ninja Scheme (CRYPTO 195 pts) | |
from m1z0r3.crypro import * | |
import time | |
# ==== Global Variable ==== | |
half_block_len = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
# H4CK1T CTF 2016 Online | |
# India – hash?! (CRYPTO 150 pts) | |
hash_list = """a : TiKCKWCC | |
b : HxPCfbCC | |
c : fJJC+/CC | |
d : blqCgqCC | |
e : ghSCMWCC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from m1z0r3.crypro import * | |
from math import sqrt | |
import time | |
# H4CK1T CTF 2016 Online | |
# Mongolia – HellMath (PPC 100 pts) | |
def do_calc(num): | |
span = 2 | |
b = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import time | |
# H4CK1T CTF 2016 Online | |
# Paraguay – Hex0gator (PPC 250 pts) | |
def do_unzip(target_file_path,source_path): | |
cmd = "unzip %s -d %s"%(target_file_path,source_path) | |
subprocess.call(cmd.split()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
# H4CK1T CTF 2016 Online | |
# Mozambique – 1magePr1son ($TEGO 150 pts ) | |
def main(): | |
img = Image.open("./planet.png") | |
rgb_img = img.convert("RGB") | |
print img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sage.all import * | |
from Crypto.Util.number import long_to_bytes as l2b | |
import json | |
params = json.load(open("param.txt","r")) | |
s = params["s"] | |
n = params["n"] | |
c = params["c"] | |
g = params["g"] | |
p = 531457043239 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding:utf-8 | |
from m1z0r3.crypro import sock, read_until, split_n | |
from itertools import product | |
import string | |
from Crypto.Hash import * | |
from base64 import b64encode, b64decode | |
remoteip = "52.192.29.52" | |
remoteport = 9999 | |
#remoteip = "localhost" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
from m1z0r3.crypro import sock, read_until, b2l, l2b | |
import string | |
from hashlib import sha256 | |
from itertools import product | |
from fractions import Fraction | |
from time import sleep | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding:utf-8 | |
# CODEBLUE CTF 2017 Common Modulus 1 | |
from m1z0r3.crypro import * | |
def main(): | |
ts_data = open("transcript.txt").read() | |
ts_data = ts_data.split("\n") | |
n1, e1 = eval(ts_data[0].split(":")[-1]) | |
c1 = long(ts_data[1].split("=")[-1]) | |
n2, e2 = eval(ts_data[3].split(":")[-1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from base64 import b64decode, b64encode | |
# SECRET:) | |
import config | |
def main(): | |
# ===== 手順 (プログラム外の手順も) ===== | |
# 1. consumer_key, consumer_key_secretの取得 | |
# ==== ここからプログラム ==== |
OlderNewer