# No Step On Snek

## Challenge

I heard you guys like python pwnables

nc umbccd.io 4000

Author: trashcanna

## Solution

A different board is shown every time.

![](https://3167364547-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX1bWRlBzHpEPe1TYDD%2Fuploads%2Fgit-blob-f1e8feb52f0e9347bd08211ca80a5b0d251d1db4%2F4fcbf20b712648a4ab9ca3646dccbf09.png?alt=media)

`move = input("Make your move: ")`

The output shows us that Python 2 is used -- the code tries to evaluate the input.

![](https://3167364547-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX1bWRlBzHpEPe1TYDD%2Fuploads%2Fgit-blob-3fb7bab9b83863f3ecc1807a5efd76680e176052%2F89f52260155c43f5b3dbe191ed3d5be6.png?alt=media)

We can pass in `eval(open('flag.txt').read())` as the input. In the traceback, we get the flag.

![](https://3167364547-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MX1bWRlBzHpEPe1TYDD%2Fuploads%2Fgit-blob-53f35e83d8f9a2f76fe87caefdf9109cee672dfd%2Fa30e10bbb35b48679c5731acf851ed0a.png?alt=media)
