Live data from Hacker News

Coding Challenge for MI5

mi5.gov.uk

11–20 of 43 posts

Re: Coding Challenge for MI5

#11
post #10

Earlier quoted context omitted.

It's but read the edit, the solution isn't much more complicated than that either :) this is very basic steganography.

I did, my comment is about the edit. It feels that there should be more to it than that. I would at least expect the result to point to something you can't get at by just browsing around. Perhaps I'm just hoping for more than there is to it :).

Well the full message is

"436F6E67726174756C6174696F6E732C20796F7520736F6C766564207468652070757A7A6C65212057687920646F6E927420796F75206170706C7920746F206A6F696E206F7572207465616D3F206D69352E676F762E756B2F6361726565727320"

"Congratulations, you solved the puzzle! Why don�t you apply to join our team? mi5.gov.uk/careers "

So i doubt there is much more to it ;)

Re: Coding Challenge for MI5

#12
post #10

Earlier quoted context omitted.

It's but read the edit, the solution isn't much more complicated than that either :) this is very basic steganography.

I did, my comment is about the edit. It feels that there should be more to it than that. I would at least expect the result to point to something you can't get at by just browsing around. Perhaps I'm just hoping for more than there is to it :).

[deleted]

Re: Coding Challenge for MI5

#13
1. Open PNG in text editor, see comment:

    As I read, numbers I see. 'Twould be a shame not to
    count this art among the great texts of our time
2. Threshold so some of the pixels are black and others are white. Save as ASCII PBM.

3. Strip the PBM header lines and remove newlines so that it's just 0's and 1's.

4. Now feed it through this program:

    #include 
    main() {
      int c, l=0, n=1;
      while(EOF != (c=getchar())) {
        if(c == l) n++;
        else {
          putchar(n);
          n=1;
        }
        l = c;
      }
      putchar('\n');
      return 0;
    }
Output is the following:

    43-6F-6E-67-72-61-74-75-6C-61-74-69-6F-6E-73-2C-20-79-6F-75-20-73-6F-
    6C-76-65-64-20-74-68-65-20-70-75-7A-7A-6C-65-21-20-57-68-79-20-64-6F-
    6E-92-74-20-79-6F-75-20-61-70-70-6C-79-20-74-6F-20-6A-6F-69-6E-20-6F-
    75-72-20-74-65-61-6D-3F-20-6D-69-35-2E-67-6F-76-2E-75-6B-2F-63-61-72-
    65-65-72-73-20
5. This smells like ASCII, let's decode it with tr -d - | xxd -p -r

> Congratulations, you solved the puzzle! Why dont you apply to join our team? mi5.gov.uk/careers

From: https://archive.rebeccablacktech.com/g/thread/52888920#p5289...

Re: Coding Challenge for MI5

#14

1. Open PNG in text editor, see comment: As I read, numbers I see. 'Twould be a shame not to count this art among the great texts of our time 2. Threshold so some of the pixels are black and others are white. Save as ASCII PBM. 3. Strip the PBM header lines and remove newlines so that it's just 0's and 1's. 4. Now feed it through this program: #include main() { int c, l=0, n=1; while(EOF != (c=getchar())) { if(c == l…

Well done!

Re: Coding Challenge for MI5

#15
A few minutes fun diversion.

A bit of guess work and trial and error, and I have the following bash one-liner:

pngtopnm puzzle.png | pnmtoplainpnm | tail -n +4 | sed -e 's/232 3 138/A/g' -e 's/58 185 229/B/g' | tr -d ' \n' | sed -e 's/AB/A\nB/g' -e 's/BA/B\nA/g' | awk '/.*/ { printf "%x", length(); }' | xxd -r -p | sed -e 's/-//g' | xxd -r -p

I'm not sure the "sed -e 's/AB/A\nB/g'" bit is optimal, but it was the first thing I thought of...

...and I definitely have a tendency to use sed when I should be using tr.

Re: Coding Challenge for MI5

#16

Clearly the horizontal span lengths , between each fixed height step, encode a useful sequence. Numbers. Or an offset sequence. If it's a simple cipher recovery should be quick. Somehow this whole thing reminds me of Egyptian fractions How long will hn take to solve if we work together Okay what if rearranging the red strips so their edges are flush encodes a transposition. Key for the cipher. I'm betting hn will sol…

Close enough... 43 minutes

Re: Coding Challenge for MI5

#17

1. Open PNG in text editor, see comment: As I read, numbers I see. 'Twould be a shame not to count this art among the great texts of our time 2. Threshold so some of the pixels are black and others are white. Save as ASCII PBM. 3. Strip the PBM header lines and remove newlines so that it's just 0's and 1's. 4. Now feed it through this program: #include main() { int c, l=0, n=1; while(EOF != (c=getchar())) { if(c == l…

Huh. So who benefits from you posting the solution here?

Re: Coding Challenge for MI5

#18

1. Open PNG in text editor, see comment: As I read, numbers I see. 'Twould be a shame not to count this art among the great texts of our time 2. Threshold so some of the pixels are black and others are white. Save as ASCII PBM. 3. Strip the PBM header lines and remove newlines so that it's just 0's and 1's. 4. Now feed it through this program: #include main() { int c, l=0, n=1; while(EOF != (c=getchar())) { if(c == l…

I'm a little disappointed that I was able to solve it so quickly, I thought it was going to be a big multi-stage puzzle where the color values and image dimensions/row boundaries would all be important factors...

Still, my solution (in JS) was a little more verbose than yours...

  
  

  /*
  Pink (white) 232,3,138
  Blue (black) 58,185,229
  */

  window.addEventListener("load", function() {
    var image = document.getElementById("puzzle-image"),
      canvas = document.createElement("canvas"),
      context = canvas.getContext("2d");
    canvas.width = image.width;
    canvas.height = image.height;
    context.drawImage(image, 0, 0, image.width, image.height);
    
    // Test 1  - rle
    (function() {
      var rle = [], prev = null, count = 0;
      for (let y = 0; y 
(Where puzzle2.png is the image in black & white)

(Edited to fix indentation...)

Re: Coding Challenge for MI5

#19
post #10

Earlier quoted context omitted.

I did, my comment is about the edit. It feels that there should be more to it than that. I would at least expect the result to point to something you can't get at by just browsing around. Perhaps I'm just hoping for more than there is to it :).

Well the full message is "436F6E67726174756C6174696F6E732C20796F7520736F6C766564207468652070757A7A6C65212057687920646F6E927420796F75206170706C7920746F206A6F696E206F7572207465616D3F206D69352E676F762E756B2F6361726565727320" "Congratulations, you solved the puzzle! Why don�t you apply to join our team? mi5.gov.uk/careers " So i doubt there is much more to it ;)

I got that far too. I don't believe it - there has to be more to it than that. There'll be something else in that file that's better hidden, for sure, and I'm pretty sure it won't be plain ASCII and hex. :)

Re: Coding Challenge for MI5

#20
I'm always of the opinion that these tests are not necessarily to find someone that can solve the puzzle, it's to find those that can solve it and aren't egotistical enough to brag that they solved it online.
Post reply on HN