Skip to content

Instantly share code, notes, and snippets.

View seadog007's full-sized avatar
:octocat:

尤理衡 (Li-Heng Yu) seadog007

:octocat:
View GitHub Profile
@seadog007
seadog007 / baha.sh
Last active September 3, 2016 08:50
Auto Cracking Bahamut Quiz
#!/bin/bash
for i in {$1..$2}
do
echo $i
echo "\n"
for j in {1..4}
do
curl -X GET "http://forum.gamer.com.tw/ajax/quiz_answer.php?sn=$i&o=$j" \
-H "Cookie: BAHAID=$3; BAHARUNE=$4;" \

Keybase proof

I hereby claim:

  • I am seadog007 on github.
  • I am seadog007 (https://keybase.io/seadog007) on keybase.
  • I have a public key whose fingerprint is 70A8 F68E 2934 D4B2 EFD0 BFD0 F85E C40B C49D 4040

To claim this, I am signing this object:

@seadog007
seadog007 / task.sh
Last active December 15, 2015 06:44
#!/bin/bash
# If you are using OSX, you can use `brew install jq` to install jq library
# If you are using Debian, Ubuntu, or something, then you can use `sudo apt-get install jq`
# I don't use yum and rpm system, so XDDDD Google it!
# Oh, Windows user? Sorry, you need a unix system.
[ -z "$1" ] && echo "Usage: ./task.sh taskid" && exit 1
res=`curl -s "https://codein.withgoogle.com/api/program/2015/taskdefinition/$1/"`
detail=`echo $res | jq .detail`
if [ "$detail" = '"Not found."' ]
#!/bin/bash
# If you are using OSX, you can use `brew install jq` to install jq library
# If you are using Debian, Ubuntu, or something, then you can use `sudo apt-get install jq`
# I don't use yum and rpm system, so XDDDD Google it!
# Oh, Windows user? Sorry, you need a unix system.
while read input
do
res=`curl -s "https://codein.withgoogle.com/api/program/2015/taskdefinition/$input/"`
detail=`echo $res | jq .detail`
@seadog007
seadog007 / misc3.py
Last active September 3, 2016 08:21
AIS3 Pre-Exam Misc 3
import subprocess
import time
from pwn import *
def getSize(fileobject):
fileobject.seek(0,2) # move the cursor to the end of the file
size = fileobject.tell()
return size
try:
@seadog007
seadog007 / crypto2.sh
Created July 14, 2016 04:56
AIS3 Pre-Exam Crypto 2
#!/bin/bash
for i in `seq 1 60`
do
res=`hashpump --data 'expire=1467328034' -k $i -a '&expire=1567327189' -s 35bacfa31f73d6403a99b524cbfc5b0c76193472 | sed 's/\\\x/%/g'`
auth=`echo $res | head -n1`
data=`echo $res | tail -n1`
curl -s "https://quiz.ais3.org:8014/?$data&auth=$auth" | grep 'id="flag"'
done
@seadog007
seadog007 / palindrome.py
Last active September 17, 2016 13:13
Tokyo Westerns / MMA CTF 2nd 2016 [Warmup][PPC][20+30pts]Make a Palindrome!
# -*- coding:utf-8 -*-
# Server connection example file for Python 2
import socket
import sys
import itertools
# From http://stackoverflow.com/questions/9952753/single-word-palindrome-checker-true-or-false
def is_palindrome(s):
return s == s[::-1]
@seadog007
seadog007 / lights_out_100.py
Last active September 17, 2016 13:12
Tokyo Westerns / MMA CTF 2nd 2016 [Warmup][PPC][100pts]Lights Out!
# coding: utf-8
from operator import add
from itertools import chain, combinations
import json
from textwrap import wrap
import numpy as np
from scipy import ndimage
class GF2(object):
@seadog007
seadog007 / coinslot.py
Last active September 19, 2016 06:52
CSAW CTF Qual 2016 [Misc][25pts]Coinslot
from pwn import *
def check(current):
global amount
count = 0
current = int(current*100)
while True:
if amount < current:
print count
break
@seadog007
seadog007 / regexpire.py
Created September 17, 2016 14:43
CSAW CTF Qual 2016 [Misc][100pts]Regexpire
import rstr
from pwn import *
def genstr(re):
print re
res = rstr.xeger(re)
print res
print ''
return res