The cop's thread is here

The robber's task is to find a program of size equal to or less than the cop's program, which, when given an itself as input, produces the same output as the cop's program.

Additionally, even if a cop's answer is provisionally marked Safe and has been revealed, you can still crack it by finding an input that is not the same as the given source code, but still produces the same output.


  • Submissions consist of
    • Language name + flags
    • Username of the cop with a link to the original post
    • The cracked program
  • An explanation would be appreciated
  • Your goal is to crack the most Cop's programs

Some Examples:

brainfuck, xxx's submission


Try It Online!

This program simply reverses the input

Good luck!


Node.js v10.9.0, Arnauld


Try it online!

This outputs this particular permutation of itself when using Node's current sorting algorithm:


An insightful comment by l4m2 gave me a headstart, but I had to write a brute-forcer to figure out which permutation of digits gives the correct output...

  • \$\begingroup\$ Note. Why the output should be unique: input length = output length, the compare function output (and the permutation) is independent of the array elements, and the permutation is invertible. \$\endgroup\$ – user202729 Nov 15 '18 at 4:25

JavaScript Firefox, l4m2


btoa(btoa) encodes the following string (including linefeeds):

function btoa() {
    [native code]

which gives:


Perl 6, donaldh


Try it online!

(This produces the same output for all permutations of the input, for example ().....aabbceggijkmnooorssttvy, but I strongly suspect that this is donaldh's program.)

  • \$\begingroup\$ It's a fair cop. Busted. It really was too crude. \$\endgroup\$ – donaldh Nov 7 '18 at 11:57

A Pear Tree, ais523


Try it online!


Pepe, u_ndefined

Bit late back to this, but this looks to be simply add the character index to the char value


You can try it here. The permalink forces in breaks, but it should still work.

  • \$\begingroup\$ Link: soaku.github.io/Pepe/#TELS1* - you have to click on the "compressed" link and then copy the page URL \$\endgroup\$ – RedClover Dec 13 '18 at 10:12
  • \$\begingroup\$ @RedClover Tried that, but it put additional spaces in the code for me, so I left it for copy paste. \$\endgroup\$ – MickyT Dec 16 '18 at 17:58
  • \$\begingroup\$ That's the expected behavior. I might improve the tool in the future, but I think it's good as it is now. \$\endgroup\$ – RedClover Dec 17 '18 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.