Curling

I managed to get a shell uploaded and ran nc to get my shell back, but after uploading it, nothing happens. Have I done something wrong? I know my code needs executed in order to return a shell, but I’m not sure how to get this back… Could anyone who has already rooted provide me with a nudge?

Edit: Stuck on the final stage now… Can’t seem to get this i**** file to do what I want… any hints on this?