picoCTF General Skills Guide

here's how to solve 2Warm

Back to the General Skills Guides

2Warm

Name: 2Warm
Description: Can you convert the number 42 (base 10) to binary (base 2)?
Author: Sanjay C/Danny Tunitis
Tags: Easy, General Skills, picoCTF 2019
Challenge from: picoCTF 2019
Hints:
1. Submit your answer in our competition's flag format. For example, if your answer was '11111', you would submit 'picoCTF{11111}' as the flag.

Theory

According to the description, to get the flag we have to convert the number 42 to binary. It's really simple, just gotta get our byte, 00000000, which ressembles the exponents of 2, 128 64 32 16 8 4 2 1 respectively. The nearest number that we can substract from 42 is 32, which gets us 00100000, leaving with 10, which can be 8 and 2, making it 00101010.

Solution

Now let's submit that with the flag format we have to check:

Submit Flag: picoCTF{00101010}

Check: Incorrect!

Oh, I almost forgot! We don't need those zeros at the beginning, it's like saying 0000042 instead of 42, so let's round it to 101010:

Submit Flag: picoCTF{101010}

Check: Correct!

There we go! That's the flag.

I rated this level as "good"! :3


https://play.picoctf.org/practice/challenge/86