Monday, September 15, 2014

MISCall

MISCall (solved by kami)

I deploy the git, then it's applying the changes to be committed (we get a s.py)

# git stash pop

# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       new file:   s.py
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#       modified:   flag.txt
#
Dropped refs/stash@{0} (1f824bb78af66d27d88d6b0de8a58e975061665e)
# ls
flag.txt  s.py
root@ks3283938:/var/www/kami.ma/web/ctf# cat s.py
#!/usr/bin/env python
from hashlib import sha1
with open("flag.txt", "rb") as fd:
    print "NCN" + sha1(fd.read()).hexdigest()

python s.py
NCN4dd992213ae6b76f27d7340f0dde1222888df4d3

No comments:

Post a Comment