IceCTF Pwn - dear_diary Writeup
This challenge is part of IceCTF - a wonderful jeopardy style CTF event organized by the Reykjavík University for a span of 15 long days. Had a very good experience of participating in a good CTF after a long time. I will be posting writeups on some of the interesting challenges, I came across. Here is the challenge file - dear_diary with md5sum : 45ecfd320d3b8236d3adece3041edb0f Running file on dear_diary shows
LabyREnth CTF Unix Level1 Writeup
This is the writeup for ievel 1 challenge in Pan Labyrenth CTF - Unix track. Download the original challenge file The given file is an obfuscated perl script. There are chunks of base64 strings which are decoded and appended to $a and then at last a huge chunk 0f base64 string is decoded and then eval-ed. Decoding the string to be evaluated, we can find more eval statements in it.
My First Pull Request
My first pull request to libgit2 project. It was this particular issue #3817, I chose to resolve. It was a bug in git_config_parse_int64() function in parsing MIN_INT64 (-9223372036854775808) It is a minor bug, which occurs in the rarest of the cases. Neverthless, it was fun to debug and fix this one. A cursory look at the code tells the following. Check if the number is positive or negative if (*p == '-' || *p == '+') if (*p++ == '-') neg = 1; ovfl - overflow flag nn - number n - assign after overflow Code:
Pelican Markdown Exception Fix
I got this particular error while trying to run Pelican to output HTML on the imported articles from Wordpress. | File "/usr/lib/python3.5/site-packages/markdown/extensions/attr_list.py", line 35, in _handle_double_quote | k, v = t.split(‘=’) | ValueError: too many values to unpack (expected 2) After some digging around, I found out that the problem is with the Markdown library used in Pelican. Specifically, in the attr_list extension. After careful examination, I found out that presence of \n characters in the inline attribute list produced by pandoc (which is used by pelican-import to convert HTML documents to markdown for editing) is responsible for the problem.
I recently updated my blog from Wordpress to Pelican. This is partly for a reason that my new VPS has a pretty low end configuration and I didn’t feel like installing PHP and then walk the whole deal. Time for trying out something new :) Enter Pelican. Written in Python and totally awesome! For the uninitiated, it is a static blog generator. You write the blog articles offline, and using Pelican you generate the entire blog as static HTML and then push it to your server for updating.