Tuesday 5 February 2013

HackIM Programming 100, 200, 300, 400 Write-up

HackIM Programming 100, 200, 300, 400 Write-up

This is the write-up for Programming Level (100, 200, 300, 400), Nullcon HackIM CTF 2013. All the scripts below are written in quick n' dirty manner.
Authors: Rohit Sharma (SH_Rohit)
              Rahul Binjve (RahulB)

1.    Big Fib
The resultant term was very large, so we used python. The key had 31,348 digits.

Code:
Key: is very large. Run the code to see.


2.    Lazy Baba
This one was very interesting. :)

Code:


And then we put the Crontab entry as:
*/1 * * * * /usr/bin/python script.py >> ~/key.txt
i.e. Run script.py after every 1 minute and redirect its output in key.txt.

Key: ABRAKADABRAGILIGILIGILI

3.    Harmony in Series
C++ never gave us correct answer. So we rewrote it in C and Python. Both gave us answer. Here's the python snippet.

Code:


Key: 311180.65

4.    Funky Text
This one was really confusing. So we used, sed to add a space between each character and our bash script did the calculation. Here's our very raw solution.
We had the funky text in a file named 'text'.
Code:

Key: 557

Kudos to the Madprops, for creating awesome challenges.