#Day10 of #100DaysOfSecurity
Woohoo!
Made it to day 10! ![]()
It’s the weekend, and yesterday’s was a bit of a doozy, so let’s do a bit more chill challenge this time: Nice netcat…
(Pro tip: This is NOT the kind of ”net cat” they’re referring to. ![]()

But rather, netcat, which is a computer networking utility for reading from and writing to network connections.)
The challenge directs you to connect to mercury.picoctf.net on port 21135 and decode the bunch of numbers that get returned:
Hint
The numbers have nothing to do with math.
Try and notice patterns. Are the numbers within a certain range? Do any of the numbers repeat? What might those correlate to?
Walkthrough
Under the hood, computers can’t inherently deal with text, only with numbers. So when we want to send a text character, such as the letter “a” or the symbol “_”, that needs to be encoded so that the computer can read and transmit it.
A very common method of encoding is ASCII (abbreviated from American Standard Code for Information Interchange). Each character is assigned a numeric value from 32-126. (Why starting at 32? Because the numbers prior to that are for non-printable control characters such as “end of file” or “line break.”)
Once again, this challenge can be solved by either manual conversion of numbers to characters found in an ASCII table, or, you can use an online tool such as Convert ASCII Codes to Characters.
(Warning: The line breaks between the different numbers can really throw off results in automated converters in my experience. If it ends up a garbled mess in one tool, try another.)
And/or, here’s a simple PHP script to get the job done:
<?php
// Open a connection to the server and store its response.
$fp = fsockopen("mercury.picoctf.net", 21135);
fwrite($fp, "\n");
$numbers = fread($fp, 1000);
fclose($fp);
// Extract numbers from a long vertical string to an array.
$numbers = explode(PHP_EOL, $numbers);
// Loop through each ASCII value and convert to character.
foreach ($numbers as $ascii) {
if (is_numeric($ascii)) {
$ascii = trim($ascii);
echo chr($ascii);
}
}
Bonus
If you made it through this challenge, also pick up what’s a net cat? for a bonus 100 points! ![]()
