[SSCTF Qual 2016] [Misc 300 – Hungry Game] Write Up

Description

Let’s Play Hungry Game
http://socket.lab.seclover.com
http://socket2.lab.seclover.com

Resolution

The script used in the video:

function sleep(milliseconds) {
  var start = new Date().getTime();
  for (var i = 0; i < 1e7; i++) {
    if ((new Date().getTime() - start) > milliseconds){
      break;
    }
  }
}
ws.send("[{\"act\":\"next\",\"data\":{}}]");
sleep(200);
ws.send("[{\"act\":\"next\",\"data\":{}}]");
sleep(200);
ws.send("[{\"act\":\"wood\",\"data\":{\"time\":9999000}}]");
sleep(1000);
ws.send("[{\"act\":\"next\",\"data\":{}}]");
sleep(200);
for (i = 0; i < 200; i++) { ws.send("[{\"act\":\"diamond\",\"data\":{\"count\":50}}]"); }
sleep(2000);
ws.send("[{\"act\":\"next\",\"data\":{}}]");

Flag is: SSCTF{8d8fc8b0fa382a5bf84dd05466e9f5a8}

Leave a Reply

Your email address will not be published. Required fields are marked *