Weekend coding challenge

This is a small coding challenge for everybody in community. The rule is simple: you can use any programming language. The answer is decrypted message and the key was used.

There are 2 different messages. First messages has a hint for second messages. Everything was written as spy’s messages style as a part of the game (Check this image to see what i meant https://www.fbi.gov/image-repository/hello_ed_letter.jpg/@@images/10778778-6116-48a0-9173-c5830209e926.jpeg).

The game

A family was killed in a small town. Police has captured 2 encrypted messages and they believe a spy did it. Help them decrypt the messages, find the killer and protect the town.
First message:

Nudp fa Zqef.
Ftq nudp ue uz ftq ewk.
Ewk ue oxqmd.
Ufe iuzse mdq emrq.
Ogddqzf xai ue ea xai. Fdk xagpqd zqjf fuyq.
Mxx wqke mdq az gbbqd tuxx.
Fa ymwq egdq kag mf dustf bxmoq:
Ftqdq mdq nxgq daeqe az eqoazp iuzpai mzp itufq daeqe az ftudp iuzpai.

Second message:

Xyppb, Pyio.
V riykuj vpyr hiwif viv Wvcir'w thurhcq. Mli yepiw vj.
C epfe aezr Icqsa oiyv jxcxi eemiw ndx xsyt bmq leo wiaj.
C amyb pmwvj Zviq'i zeqvbs rikj Gsrqqs erq Wysvtu fexrh.
Mmqbd xmha'j mec jxi mw xuytmaw ssye icwxrh'm gpbse.
M'py wyx mg qm wsbd uw tbimmfyu.
Assq bogo,

Ok, so is it ok to submit the decrypted message here? along with the key?

yeah it is just for fun.

First message is

The bird is in the sky.
Sky is clear.
Its wings are safe.
Current low is so low. Try louder next time.
All keys are on upper hill.
To make sure you at right place:
There are blue roses on second window and white roses on third window.

The key is: mmmmmmmmmmmmmmmmmmmm

Second message is:

Hello, Zeek.
I bought blue roses for Simon's grandpa. She loves it.
I also gave Simon your white roses and told him you sent.
I will visit Fred's family next Monday and George later.
Simon didn't say who is keeping your sister's clock.
I'll get it as soon as possible.
Good luck,

The Key is: queen

Nice one dude. Hope you enjoyed the challenge.
Can you share your code? Because the point of this challenge is coding skills so we can learn solution from each other :smiley:

:grin: i did it like this

So no code :confused: it is coding challenge :frowning:

Well to be honest, at first, seeing the encrypted messages, I thought they were vigenere ciphers.
So, to decrypt it, I immediately went to here and decrypted.
Later on, I saw it is a coding challenge.
Then I tried to do so, but damn hard. Not much of a coder guy.
But looking here and there, asking help from some of the friends, I got this code written in Java

import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.Scanner;
import java.util.stream.Stream;


public class Main {


    public static void main(String[] args) throws IOException {
        String toDec = "Nudp fa Zqef.\n"+
        "Ftq nudp ue uz ftq ewk.\n"+
        "Ewk ue oxqmd.\n"+
        "Ufe iuzse mdq emrq.\n"+
        "Ogddqzf xai ue ea xai. Fdk xagpqd zqjf fuyq.\n"+
        "Mxx wqke mdq az gbbqd tuxx.\n"+
        "Fa ymwq egdq kag mf dustf bxmoq:\n"+
        "Ftqdq mdq nxgq daeqe az eqoazp iuzpai mzp itufq daeqe az ftudp iuzpai.\n";
        int offset = 0;
        while(offset != 15){

    public static String decrypt(String msg, int offset) {
        msg = msg.toLowerCase();
        String something = "";
        for(int i=0;i<msg.length();i++){
            if(msg.charAt(i) >= 'a' && msg.charAt(i) <= 'z'){
                if(msg.charAt(i) < ('a' + offset)){
                    something+=""+(char)('z' - (offset + 'a'-msg.charAt(i)- 1));
        return something;

and damn. It’s hard.

Yes it is. It took me whole day to fix the small bugs and i have to read code from internet to fix problems.

are we making a bruteforcer tool to put on Parrot OS?haha

There are many brute force tool. And if anybody wants to do it, that person should do it personally. For security expert, you know… :smiley:

1 Like

sure, anyway the challenge was fun hope to see like that more (easier ones, lol)

1 Like