h4ck1t 2016: North Korea - Fucking Russian Programmers, PPC 100pts

Description:
The program has gone crazy and outputs completely unbalanced answers :( Help to correct the error and send the correct data until they not obsolete...
http://91.231.84.36:9200/
Flag:
7h@nk_y0u_f0r_7h3_b@l@nc1n8_v@r1@bl3s

For this problem, the website gave you bunch opening and closing brackets, ("(",")","[","]","{", and "}") which you then had to balance out so there were no unending brackets or ones without a beginning. I wrote a fairly simple script that took an input of the brackets and kept count of how many opening and closing brackets there were. If there got to be more closing than opening brackets, the script would insert an opening bracket the space before. And if the script finished reading the string and there were too many opening brackets, ti would add the appropriate amount of closing brackets. The script can be viewed here. Thus to solve it I just copied and pasted the result from the script into the website and got the flag.

This post was originally uploaded on aaroncook.xyz