Convert Port Numbers to picoCTF Key
Screen capture of one of the Python scripts used to solve the 'Nice netcat...' practice challenge.

Convert Port Numbers to picoCTF Key

I solved picoCTF's Nice netcat... practice challenge which involved converting port numbers into the characters of the picoCTF key.

I wrote two Python scripts which solve Nice netcat...:

  1. the first script uses the GNU netcat networking utility to get a list of port numbers, then redirects that stdout to a file named ports.txt.
  2. the second script opens ports.txt, iterates through its port numbers, and converts them to characters using the Python built-in function named chr(). Then it calls the join() string method to join the characters, and finally prints the picoCTF key to the terminal emulator.

The two Python scripts can be found at this gist.

To view or add a comment, sign in

More articles by Nicholas T

  • PicoGym GET aHEAD Practice Challenge

    I solved the picoCTF/picoGym GET aHEAD challenge. The problem involved the HTTP methods GET, POST and HEAD, since HEAD…

  • 'Stonks' Format String Attack

    I solved the picoGym Stonks practice challenge which featured binary exploitation of code written in C in order to…

  • Translated Pictograms to picoCTF Key

    I solved the picoGym challenge titled Transformation, which involved the translation of encoded Chinese pictograms to a…

  • Found Key Hidden in JPEG File

    Today, solved the picoGym ethical hacking challenge titled Information, which challenged users to find a picoCTF key…

  • Decoding ROT13-Encoded Strings

    My first cryptographic practice challenge in picoGym involved decoding a string encoded with the ROT13 cypher. A cypher…

  • I Broke Pi-Hole

    As a way to gain more experience with cybersecurity software, I installed Pi-hole in my desktop computer. Pi-hole is a…

  • First CTF Flag Submission

    Tonight, my first flag was submitted to Carnegie Mellon University's picoGym Practice Challenges—a challenge titled…

Insights from the community

Others also viewed

Explore topics