6
$\begingroup$

You are a wrongly-accused prisoner in a high-security prison, where you have been sentenced for life. However, one of the guards believes your story, and has given you a single chance to escape. He has told you that there is a special word you can say to the man at the gate, and he will gladly open the way out for you. The same day, you found a cryptic bit of paper underneath your bed. The paper reads as follows:

47697665206d652035210d0a0d0a2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2d2f2f2f2f2b2b2b2b2b2b2b2b2f2f2f2f0d0a2f2b2b2b2b2b2b2b2b2b2f2b2b2b2b2b2b2b2b2b2b2b2b2b2f2b2b2b2b2f2d2f2f2f2f2a2f0d0a2e2f2d2d2d2e2b2b2b2b2b2b2b2e2e2b2b2b2e2f2e2f2f2f2f2f2f2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2e2f2e2b2b2b2e2d2d2d2d2d2d2e2d2d2d2d2d2d2d2d2e2f2b2e0d0a0d0a49276d20737475636b206f6e207468652066656e6365206265747765656e203320747261696e20747261636b73210d0a0d0a546774203368402e682072333167707635746577792e33336e4020202e

You realise this must be the guard trying to give you a clue of how to escape, or what the secret word is, but you have no idea what it means. You also know that the man at the gate will not hesitate to kill anyone who speaks the incorrect password.

You get one shot at this, so you walk up to the gatekeeper. What should you say to him?

$\endgroup$

2 Answers 2

1
$\begingroup$

To finish off the great work done by ABcDexter and f''

You should say to the guard:

Hello World!

These lines:

Give me 5!
-----------------------------------////++++++++////
/+++++++++/+++++++++++++/++++/-////*/
./---.+++++++..+++././/////+++++++++++++++./.+++.------.--------./+.

Are a hint to use the:

Esoteric programming language HighFive

I wrote the following interpreter:

#include <iostream>
using namespace std;

string s;
int a[256][5], seg, ptr, lastmod;

int main() {
    cin >> s;
    for(int i = 0; i < s.size(); i++) {
        if(s[i] == '+') {
            a[seg][ptr]++;
            lastmod = a[seg][ptr];
        }
        else if(s[i] == '-') {
            a[seg][ptr]--;
            lastmod = a[seg][ptr];
        }
        else if(s[i] == '/')
            ptr = (ptr + 1) % 8;
        else if(s[i] == '*') {
            if(lastmod != 0) {
                i += a[seg][ptr];
                i--;
            }
        }
        else if(s[i] == '.')
            cout << (char)a[seg][ptr];
        else
            cout << "oops" << endl;
    }
    cout << endl;
}

It's not exactly accurate as the memory size of int is bigger than a byte, but for this purpose it's ok.

$\endgroup$
6
  • $\begingroup$ Took me the longest time to figure out how the '*' worked. Once I figured out it was keeping an extra variable for the last modified value, then I had it. $\endgroup$
    – LeppyR64
    Commented Jun 10, 2016 at 15:40
  • $\begingroup$ I did the segmenting wrong. Oh well. When I get some time I might update it. $\endgroup$
    – LeppyR64
    Commented Jun 10, 2016 at 16:07
  • 1
    $\begingroup$ ... Well now I don't understand how OP said the answer is one word yet still accepted this? $\endgroup$ Commented Jun 11, 2016 at 3:50
  • $\begingroup$ @feelinferrety It's possible that he didn't execute the code segment that he copied from the Wiki page. The caption for it is HELLO. $\endgroup$
    – LeppyR64
    Commented Jun 11, 2016 at 3:52
  • $\begingroup$ @feelinferrety I was going to answer with that but my inner-nerd took over and saw that there were more than 5 full stops in the code. $\endgroup$
    – LeppyR64
    Commented Jun 11, 2016 at 3:57
2
$\begingroup$

A simple

HEX to ASCII

conversion shows this

Give me 5!
-----------------------------------////++++++++////
/+++++++++/+++++++++++++/++++/-////*/
./---.+++++++..+++././/////+++++++++++++++./.+++.------.--------./+.
I'm stuck on the fence between 3 train tracks!
Tgt [email protected] r31gpv5tewy.33n@ .

As f'' hinted in comments:

There is hint of Rail fence cipher

in this

I'm stuck on the fence between 3 train tracks!

In this

I used the rail fence decoder and with 3 as the key

The result is:

..Th3 gr33t1ng p@v35 the w@y.

So, my final(hopefully) answer is:

As in the first line Give me 5! as high-five, but here it's $5!$ i.e. $120$.
So, I will say 120 or just give a high-five.

$\endgroup$
18
  • $\begingroup$ I suggest you look at the Hex to ASCII more closely, it isn't that simple. $\endgroup$
    – user21703
    Commented Jun 9, 2016 at 14:52
  • $\begingroup$ Also, the guard said that it was a single word... $\endgroup$
    – user21703
    Commented Jun 9, 2016 at 14:53
  • 1
    $\begingroup$ Nope, it's one word. $\endgroup$
    – user21703
    Commented Jun 9, 2016 at 14:54
  • 2
    $\begingroup$ "fence" and "train tracks" is an obvious clue for a railfence cipher. $\endgroup$
    – f''
    Commented Jun 9, 2016 at 15:07
  • 1
    $\begingroup$ Let us continue this discussion in chat. $\endgroup$
    – user21703
    Commented Jun 9, 2016 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.