Skip to content

Instantly share code, notes, and snippets.

Haruka Hoshino 73spica

Block or report user

Report or block 73spica

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View twitter_user_authentication.py
from urllib.parse import urlencode, quote, quote_plus
import hashlib
import hmac
import base64
from operator import itemgetter
import time
import requests
import os # for nonce
@73spica
73spica / get_user_timeline.py
Last active Jul 2, 2018
Using twitter api without python library.
View get_user_timeline.py
import requests
from base64 import b64decode, b64encode
# SECRET:)
import config
def main():
# ===== 手順 (プログラム外の手順も) =====
# 1. consumer_key, consumer_key_secretの取得
# ==== ここからプログラム ====
@73spica
73spica / common_modulus_1_solver.py
Last active Nov 23, 2017
CODEBLUE CTF 2017 Common Modulus 1~3
View common_modulus_1_solver.py
# 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])
@73spica
73spica / paillier_oracle_solver.py
Last active Nov 16, 2017
CODEBLUE CTF 2017 Paillier Oracle
View paillier_oracle_solver.py
# 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
@73spica
73spica / secret-server-revenge_solver.py
Last active Nov 15, 2017
HITCON CTF 2017 Secret Server Revenge
View secret-server-revenge_solver.py
# 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"
@73spica
73spica / dj_solver.py
Created Apr 26, 2017
Damgard-Jurik暗号の復号の練習
View dj_solver.py
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
View 1magepr1son_solver.py
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
View hex0gator_solver.py
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())
View hellmath_solver.py
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
@73spica
73spica / hash_solver.py
Last active Oct 4, 2016
Frankly, It's low accuracy...
View hash_solver.py
import sys
# H4CK1T CTF 2016 Online
# India – hash?! (CRYPTO 150 pts)
hash_list = """a : TiKCKWCC
b : HxPCfbCC
c : fJJC+/CC
d : blqCgqCC
e : ghSCMWCC
You can’t perform that action at this time.