Writeups

Programming Solutions

Maze Buster

Statement:

Hello younglings! Welcome to maze busters!
Rush through these mazes.
nc <ip> <port>

The output of the nc looked like

*.........
#########.
#####.....
#####.####
#####...##
#######.## 
###.....## 
###.......
#########. 
#......... 
..######## 
.......... 
##........ 
...####### 
.........$

and the problem asked to solve the maze from starting point * to end point $ where . was the available path and # was the block.

The output required the comibnation of characters w,a,s and d, where w referred to Move Up, a referred Go Left, s referred Go Down and d referred Go Right.

This was similar to shortest path finding and could be solved using algorithms like A* and Dijkstra's Shortest Path Finding Algorithms.

At first the input was parsed into matrix, and I used A* algorithm to solved the parsed Matrix. Then, the solved value was again parsed into the required output form of w, a, s and d.

Socket Programming was used to maintain a connection with the server and ask for more input of the maze. Finally, when all the problems were solved, the flag was captured.

Code: Here

Mega Mind

Statement:

Are you really fast at math???

nc <ip> <port>

The output to nc looked like:

		Greetings! Are you fast enough? ^_<

28 * ((96 - 27) * (62 * 133 - 84 + 179))
>

where, the mathematical problem was to be solved in split seconds should be sent to the server.

For this, I used python socket to establish a connection into the server and get the output, then parsed the output to store the mathematical expression into a string. Later evaluated the string to get the output and finally send the output to the server.

Cleverly, at some point in time, the server returned a value which when evaluated changed the script and disrupted the process. But, bypassing that required little to no effort, as some minor change in the parsing process easily helped me gain the access to the server.

Code: Here