Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
#!/bin/bash | |
function gendata(){ | |
for i in `seq 1 $1` | |
do | |
echo $(( ( RANDOM % $2 ) + 1 )) >> data_$$ | |
done | |
} | |
echo '##Generate Datas##' |
This file contains hidden or 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 rstr | |
from pwn import * | |
def genstr(re): | |
print re | |
res = rstr.xeger(re) | |
print res | |
print '' | |
return res |
This file contains hidden or 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 pwn import * | |
def check(current): | |
global amount | |
count = 0 | |
current = int(current*100) | |
while True: | |
if amount < current: | |
print count | |
break |
This file contains hidden or 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 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): |
This file contains hidden or 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 -*- | |
# 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] |
This file contains hidden or 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
#!/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 |
This file contains hidden or 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 | |
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: |
This file contains hidden or 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
#!/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` |
This file contains hidden or 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
#!/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."' ] |