Merge branch 'master' of github.com:failedxyz/easyctf

This commit is contained in:
Michael Zhang 2017-02-11 17:20:17 -06:00
commit ecd884e932
6 changed files with 38 additions and 1 deletions

View file

@ -30,4 +30,4 @@ BR
BR
RB
Output: 6
Output: 7

23
library/sol.py Normal file
View file

@ -0,0 +1,23 @@
# http://oeis.org/A001333
mat = [[0,0,1,0],[0,1,0,1],[1,0,2,0],[0,2,0,1]]
mod = 10**9+7
def matmult(mtx_a, mtx_b, mod):
tpos_b = zip( *mtx_b)
rtn = [[ sum( ea*eb for ea,eb in zip(a,b))%mod for b in tpos_b] for a in mtx_a]
return rtn
def trace(A):
return sum(A[j][j] for j in range(len(A)))
def matpow(A, p):
ret = A
for bit in bin(p)[3:]:
ret = matmult(ret, ret, mod)
if bit=='1':
ret = matmult(ret, A, mod)
return ret
x = 2**10240+3
print trace(matpow(mat, x))%mod

View file

@ -0,0 +1 @@
My friend just got back from the plains and he took [this](${lion_jpg}) picture with his new camera. He also told me there's a flag hidden in it - can you check it out for me?

4
mane-event/grader.py Normal file
View file

@ -0,0 +1,4 @@
def grade(autogen, key):
if key.find("pride_in_african_engin33ring") != -1:
return True, "Good job!"
return False, "Sorry, try again."

BIN
mane-event/lion.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

9
mane-event/problem.yml Normal file
View file

@ -0,0 +1,9 @@
author: blockingthesky
title: Mane Event
hint: Wow, JPEGs are such an EXcellent Image Format!
category: Forensics
autogen: false
programming: false
value: 30
files:
- lion.jpg