148
\$\begingroup\$

Note: This challenge is now closed to new cop submissions. This is to ensure that no one can post submissions that only remain uncracked because there aren't enough robbers interested in the challenge anymore.

In this game of cops-and-robbers, each cop will write a simple program to give a single output. They will then make public four things about their program:

  1. The language
  2. The program length
  3. The desired output
  4. A scrambled-up version of the source code

Then, the robbers must unscramble the source code so that their program functions like the original.


Cop Rules

You are to write a simple program, which the robbers will try to recreate.

Your original program must have a simple functionality: upon execution, it outputs a single string/number and halts. It should give the same output regardless of when/where it is run, and should not depend on extra libraries or the internet.

Your program and output must use printable ASCII (newlines and spaces allowed). The output should be no more than 100 characters long, and the program should take less than about 5 seconds to run on a reasonable machine. You are also not allowed to use hashing (or other cryptographic functions) in your program

Then, you provide a scrambled-up version of the source code and the required output. You can scramble up your source code however you may like, as long as characters are conserved.

Your score is the shortest program you have submitted which hasn't been cracked. After a period of one week, an uncracked submission will become immune. In order to claim this immunity, you should edit your answer to show the correct answer. (Clarification: Until you reveal the answer, you are not immune and can still be cracked.) The lowest score wins.

Simple Example Cop Answers

Perl, 20

ellir"lnto Wo d";prH

Hello World

Or...

Perl, 15

*3i)xp3rn3*x3t(

272727

Robber Rules

Robbers will post their cracking attempts as answers in a separate thread, located here.

You have one attempt at cracking each submission. Your cracking attempt will be an unscrambled version of the source code. If your guess matches the description (same characters, output, and of course language), and you are the first correct guess, then you win a point. It is important to note that your program does not have to exactly match the original, simply use the same characters and have the same functionality. This means there could be more than one correct answer.

The robber with the most points (successful cracks) wins.

Simple Example Robber Answers

Your program was print "Hello World";. (Although print"Hello World" ; could have also worked.)

Your program was print(3**3x3)x3

Safe Submissions

  1. ASP/ASP.Net, 14 (Jamie Barker)
  2. Befunge-98, 15 (FireFly)
  3. GolfScript, 16 (Peter Taylor)
  4. CJam, 19 (DLosc)
  5. GolfScript, 20 (user23013)
  6. Perl, 21 (primo)
  7. Python, 23 (mbomb007)
  8. Ruby, 27 (histocrat)
  9. SAS, 28 (ConMan)
  10. Ruby, 29 (histocrat)
  11. Python, 30 (mbomb007)
  12. JavaScript, 31 (hsl)
  13. Ruby, 33 (histocrat)
  14. Marbelous, 37 (es1024)
  15. Ruby, 43 (histocrat)
  16. PHP, 44 (kenorb)
  17. Ruby, 45 (histocrat)
  18. Marbelous, 45 (es1024)
  19. Python 2, 45 (Emil)
  20. PHP, 46 (Ismael Miguel)
  21. Haskell, 48 (nooodl)
  22. Python, 51 (DLosc)
  23. Python, 60 (Sp3000)
  24. Python 2, 62 (muddyfish)
  25. JavaScript, 68 (Jamie Barker)
  26. Mathematica, 73 (Arcinde)
  27. Haskell, 77 (proudhaskeller)
  28. Python, 90 (DLosc)
  29. C++, 104 (user23013)
  30. ECMAScript 6, 116 (Mateon1)
  31. C++11, 121 (es1024)
  32. Grass, 134 (user23013)
  33. PowerShell, 182 (christopherw)

Unsolved Submissions

In order of time of posting. This list courtesy of many users.

A small tool to verify solutions, courtesy of n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀ĥ̷̳

$(function(){function e(){var e=$("#ignore-space").is(":checked");var t=$("#source").val().split("").sort();var n=$("#editor").val().split("").sort();var r,i=0;for(r=0;r<t.length;){if(t[r]==n[i]){t.splice(r,1);n.splice(i,1)}else if(t[r]>n[i]){i++}else{r++}}$("#display").val(t.join(""));n=n.join("");if(e){n=n.replace(/[\r\n\t ]/g,"")}if(n.length!=0){$("#status").addClass("bad").removeClass("good").text("Exceeded quota: "+n)}else{$("#status").addClass("good").removeClass("bad").text("OK")}}$("#source, #editor").on("keyup",function(){e()});$("#ignore-space").on("click",function(){e()});e()})
textarea{width:100%;border:thin solid emboss}#status{width:auto;border:thin solid;padding:.5em;margin:.5em 0}.bad{background-color:#FFF0F0;color:#E00}.good{background-color:#F0FFF0;color:#2C2}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<h3>Scrambled Source</h3>
<textarea id="source" class="content" rows="10"></textarea>
<h3>Unused Characters</h3>
<textarea id="display" class="content" rows="10" readonly></textarea>
<h3>Your Solution</h3>
<input type="checkbox" id="ignore-space" name="ignore-space"/>
<label for="ignore-space">Ignore space characters</label>
<div id="status" class="good">OK</div>
<textarea id="editor" class="content" rows="10"></textarea>

\$\endgroup\$
32
  • 4
    \$\begingroup\$ @xnor Yes, that's what it means. \$\endgroup\$
    – PhiNotPi
    Nov 4, 2014 at 20:00
  • 3
    \$\begingroup\$ You might want to forbid hashing... codegolf.stackexchange.com/questions/40304/… \$\endgroup\$ Nov 4, 2014 at 20:00
  • 7
    \$\begingroup\$ You should probably specify that the winner must post the original source code after one week. What prevents me from posting gibberish and claiming that none of the robbers got the right answer? \$\endgroup\$ Nov 4, 2014 at 21:54
  • 66
    \$\begingroup\$ I thought "Oh, il just write a malbolge program, scramble it, and win this thing!". But then, i tried to write a malbolge program. \$\endgroup\$
    – vero
    Nov 5, 2014 at 4:56
  • 9
    \$\begingroup\$ Warning: Cops, do not use Ideone to test your submissions, as it stores your programs and other people can see them. \$\endgroup\$
    – vero
    Nov 6, 2014 at 4:48

245 Answers 245

1
2 3 4 5
9
71
\$\begingroup\$

Python 3, size 74 (Cracked)

Python just wasn't the same after being re-educated by Big Brother.

Input:

print(war is peace)
print(freedom is slavery)
print(ignorance is strength)

There are two newlines at the end of lines 1 and 2.

Output:

True
True
True

Note that each True is in its own line.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ What's behind door 101? \$\endgroup\$ Nov 7, 2014 at 0:31
  • 5
    \$\begingroup\$ I originally had 2+2==5 as a fourth statement until I found that the = made it too easy. \$\endgroup\$
    – xnor
    Nov 7, 2014 at 0:32
  • 5
    \$\begingroup\$ Nice 1984 reference. \$\endgroup\$
    – Justin
    Nov 7, 2014 at 0:40
  • 2
    \$\begingroup\$ Cracked. That was excellent. \$\endgroup\$
    – Sp3000
    Nov 7, 2014 at 1:41
55
\$\begingroup\$

Python 3, size 12 (Cracked)

print (abcd)

My program produces no output and no errors.

\$\endgroup\$
6
  • 4
    \$\begingroup\$ Cracked. Nice, the solution is very counter-intuitive. \$\endgroup\$
    – matsjoyce
    Nov 4, 2014 at 20:50
  • 2
    \$\begingroup\$ Very nice, I was going for int for a while. \$\endgroup\$ Nov 4, 2014 at 20:51
  • \$\begingroup\$ @matsjoyce Nicely done. That was my intended solution. \$\endgroup\$
    – xnor
    Nov 4, 2014 at 20:53
  • 1
    \$\begingroup\$ @matsjoyce Yes, I expected someone would do this eventually. Still, I encourage everyone to not spoil themselves and try to solve it by hand. I assure you it's a cute solution. \$\endgroup\$
    – xnor
    Nov 4, 2014 at 20:56
  • \$\begingroup\$ I think I got it. The solution I found does not work if I first type python and then type my solution at the prompt. But it does work, if I put my solution in a file and type python file. \$\endgroup\$
    – kasperd
    Nov 4, 2014 at 22:45
41
\$\begingroup\$

CJam, size 20 (Cracked)

Code

"Stop, Hammer time!"

Output

2.956177636986737
\$\endgroup\$
2
  • 6
    \$\begingroup\$ Cracked. \$\endgroup\$
    – Dennis
    Nov 6, 2014 at 3:06
  • \$\begingroup\$ Wait, are you sure you want force others to stop answering this question, in order to close this challenge single-handedly!? -1 (the code contains Hammer) \$\endgroup\$
    – user96495
    Aug 25, 2020 at 10:29
27
\$\begingroup\$

Python 2, size 50

Cracked

We already know the Answer to the Question, but what's the Question?

Code

print *********************--///222222222222222222

Note that there are no trailing spaces or newlines. The only whitespace character is the single space after print.

Output

42

I've attempted to balance code length and difficulty, but it wouldn't surprise me if I missed it a bit either way. Hopefully it's enough to discourage brute force, at least.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Cracked \$\endgroup\$
    – Ypnypn
    Nov 4, 2014 at 20:34
  • 6
    \$\begingroup\$ This would have been better with size 42. \$\endgroup\$
    – user
    Nov 5, 2014 at 13:52
25
\$\begingroup\$

Pyth - 71 Cracked

Code

C-3P0: "Sir, the possibility,..."* 
Han Solo: "Never Tell Me The Odds!"

Output

3720

*Originally, George Lucas had Han interrupt C3-PO.**

**He called this his greatest idea since Jar-Jar.


Interesting note: despite all the changes that Pyth has gone through, there is still a valid answer here!


Original

ts,*s,y30 l" : : i i Han Solo "eP-C"h"TsrhT

Explanation

The remaining characters go on the next line. Pyth only interprets the first line of a file.

ts, make a 2-tuple and get their sum -1.
* multiply:
s,y30 l"..." sum the 2-tuple containing 2*30 and the length of the string (18).
eP-C"h"T get the largest prime factor of h's ascii value minus 10 (47).
srhT get the sum of numbers from 0-10.

All in all, this basically just computes: (30*2+18)*(47)+55-1. After reading @isaacg's answer I noticed there is an extremely simple solution: *h30tC"y" which is 31*120.

Updated

*h30tC"y" "-P:Sir, e possibilit,...
Han Solo: Never Tell Me The Odds!"
Still works even after all this time...

Sorry for poor explanation formatting, I don't know how to use spoiler blocks :S (@Sp3000 made it a bit nicer for you, though)

Now you can run Pyth online! Try it here. Thanks @isaacg :)

\$\endgroup\$
3
  • 9
    \$\begingroup\$ The above may contain blatantly made-up information about the creation of Star-Wars. \$\endgroup\$ Nov 5, 2014 at 16:49
  • 2
    \$\begingroup\$ cracked \$\endgroup\$
    – isaacg
    Nov 6, 2014 at 3:40
  • \$\begingroup\$ @FryAmTheEggman You can use tags in blocks, e.g. <br> \$\endgroup\$
    – Sp3000
    Nov 7, 2014 at 14:50
23
\$\begingroup\$

CJam, size 51 [SAFE]

Code

main(int argc,char* argv){printf("Hello, World!");}

Output

55
2292213229222231957511222223333751125537511222222135723331131931959319319

You can play around with it in the online interpreter.

This should be more crackable than it looks.

Hint

Start with the second line of the output. A few digits don't appear in it all, and others suspiciously often. Why could that be? If you can decipher that, the rest should almost fall in place.

Solution

"that rrrrraging london Hail!v"{elccimf(;W))},(*,pa

The weather must have been pretty bad when I came up with that anagram...

The hint was supposed to point towards the fact that the second line is made up of squashed-together prime factorisations. I was hoping that from there it would be possible to determine how many and which characters go into the string, leaving only a few characters at the end.

\$\endgroup\$
1
  • 9
    \$\begingroup\$ Wait is this scrambled??? \$\endgroup\$
    – TheDoctor
    Nov 9, 2014 at 21:07
18
\$\begingroup\$

Befunge-98, size 15 [SAFE]

Code

"quick"
*+.@\_j

Output

3314

Original

"u_ji@q.+k*c
"
A curious but somewhat well-known feature of Befunge is that you can terminate a string with the same quote that begins it, which in essence pushes that entire line (except the quote) on the stack. As an extra trick, I re-use the same string again, by making use of u to reverse the instruction pointer. Then it's just some arithmetic: the core idea is to sum up all those values (which is done using k to repeat the + operation).

\$\endgroup\$
5
  • \$\begingroup\$ Which interpreter(s) have you tested it on, and in particular what assumptions do they make about cell bitwidth? \$\endgroup\$ Nov 13, 2014 at 11:52
  • \$\begingroup\$ @PeterTaylor I've tested it on cfunge under x86_64 linux. Some testing seems to indicate it uses signed 64-bit integers, although I can say that my solution doesn't depend on overflow semantics so I'm not sure if it matters. \$\endgroup\$
    – FireFly
    Nov 13, 2014 at 12:37
  • \$\begingroup\$ Ok, so I shouldn't be looking for 8-bit overflows. Shame, that might have simplified it ;) \$\endgroup\$ Nov 13, 2014 at 12:40
  • \$\begingroup\$ Ugh. I made programs to print 3312, 3300, and several others near 3314. So close... \$\endgroup\$
    – Justin
    Nov 16, 2014 at 19:39
  • \$\begingroup\$ @Quincunx excellent... :P \$\endgroup\$
    – FireFly
    Nov 16, 2014 at 20:40
16
\$\begingroup\$

GolfScript (16 bytes) [SAFE]

%%()*../1129n{}~

Expected output:

-117345085515973157874551915956356303213327583847247840186528288852476459638212404362749

Original source:

n)~{.*911%(}./2%

\$\endgroup\$
2
  • \$\begingroup\$ Is this expected output excluding the trailing newline, or will the newline simply not be outputted? \$\endgroup\$
    – ProgramFOX
    Nov 9, 2014 at 18:22
  • \$\begingroup\$ @ProgramFOX, the output will end in a newline. The only ways I know of avoiding that would require :. \$\endgroup\$ Nov 9, 2014 at 23:20
16
\$\begingroup\$

Ruby, 17 (Cracked)

Going for something really short this time.

inprt N=2,*'~~~%'

Output:

2
2
\$\endgroup\$
1
  • 1
    \$\begingroup\$ Cracked. (With some help from Sp3000) \$\endgroup\$ Nov 5, 2014 at 19:11
13
\$\begingroup\$

Python, 69 chars [cracked by grc]

Scrambled:

((((((((((((())))))))))))),,,,accdddiiiiillmmnopprrrrrssssssttttttttu

Output:

1083

This one's just a harmless bit of fun :) Tested on CPython 2.7.8, 3.3.2 and for the heck of it PyPy3 2.3.1.


Explanation

Uses built-in functions str, dict, list to build up a string and then applies map with ord to convert the string to a list of ints, which are then summed.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Cracked. \$\endgroup\$
    – grc
    Nov 5, 2014 at 12:33
12
\$\begingroup\$

Python, size 56 (cracked)

Code

for i in "iprint()".join(([2,3,7,0,9,chr((-7+732^70)])))

Output

hi mom

\$\endgroup\$
3
  • 2
    \$\begingroup\$ Python 2? or 3? \$\endgroup\$
    – Geobits
    Nov 4, 2014 at 21:08
  • 1
    \$\begingroup\$ @Geobits, either one works. \$\endgroup\$ Nov 4, 2014 at 21:12
  • 1
    \$\begingroup\$ Cracked. \$\endgroup\$ Nov 4, 2014 at 23:43
11
\$\begingroup\$

Python 3, 70 chars

Scrambled:

""(((())))****++++222222222;;;;;=======cccccccccceeeiinnpprrttxxxxxxxx

Output (99 chars long):

388626024960000000000026872002432000000000000676169243200000000000007317718780000000000000028820330

Update

It's been a week, so rather than posting the answer, here's a hint:

Try taking the square root of the number and working from there

\$\endgroup\$
0
9
\$\begingroup\$

Pyth, 11

\\,,"$: Ndw

Output:

",input(),"
\$\endgroup\$
1
9
\$\begingroup\$

JavaScript, 94 Cracked by FireFly

alert(' '' '''((()))+++,,,,,,,,,,,,,000111111114444577888;;;;;======[[[]]]aaafhinorrrrvvvxx||)

Output

fun in the sun

Original

a=alert;v='';r=[1,7,8,14,11,8,14,10,0,5,14,4,7,8];for(x in r)v+=('h'+(1==0)+a)[r[x]]||'';a(v);

\$\endgroup\$
5
  • \$\begingroup\$ I have a feeling, this won't work in all browsers/engines. What environment did you test this in? \$\endgroup\$ Nov 10, 2014 at 11:47
  • \$\begingroup\$ Cracked. \$\endgroup\$
    – FireFly
    Nov 10, 2014 at 12:30
  • \$\begingroup\$ Oh... and I was convinced you had alert first, since the indices matched up so well with the needed characters. Interesting coincidence. \$\endgroup\$
    – FireFly
    Nov 10, 2014 at 13:27
  • \$\begingroup\$ I actually had it first too when I started working on it, but I changed it to reduce browser differences. \$\endgroup\$
    – SLuck49
    Nov 10, 2014 at 13:41
  • \$\begingroup\$ Doesn't work on Chrome. I have the latest version. It says Syntax Error: Unexpected String \$\endgroup\$
    – Oliver Ni
    Jan 11, 2015 at 3:57
8
\$\begingroup\$

Ruby, 38 - cracked by Martin Büttner

print(succ(downcase!))$$$..[[]]6e0<><_

Output:

u

Original:

$6.pincdwnca[]rescue$><<$!.to_s[((0))]

\$\endgroup\$
4
  • \$\begingroup\$ Cracked. \$\endgroup\$ Nov 8, 2014 at 14:14
  • 1
    \$\begingroup\$ @MartinBüttner Heh, nowhere near the original indeed. But your solution is possibly even more terrifying than the original. ;) \$\endgroup\$
    – Doorknob
    Nov 8, 2014 at 14:18
  • 1
    \$\begingroup\$ Hey there's a fish \$\endgroup\$
    – TheDoctor
    Nov 9, 2014 at 21:08
  • \$\begingroup\$ So the print and downcase! were red herrings. I expected the answer to use puts, did not think of $><<. \$\endgroup\$
    – kernigh
    Nov 9, 2014 at 23:08
7
\$\begingroup\$

Python 3, size 16 (Cracked)

Code:

help tim__rolo__

Output (with newline at end):

Hello world!
\$\endgroup\$
3
  • 3
    \$\begingroup\$ Cracked. \$\endgroup\$ Nov 4, 2014 at 21:16
  • 1
    \$\begingroup\$ @MartinBüttner I knew someone has seen the easter egg... \$\endgroup\$
    – matsjoyce
    Nov 4, 2014 at 21:18
  • 1
    \$\begingroup\$ I hadn't, but I was quick to google it. ;) To be honest, if I hadn't been in such a hurry, I probably could have seen that the remaining characters after hello were an anagram of import. ^^ \$\endgroup\$ Nov 4, 2014 at 21:18
7
\$\begingroup\$

Perl - 47 (cracked by grc)

Code (there is one space in there too)

 """"$$$$$$((()))**....///;;[[]]~==01finoprrstx

Output:

012345012345012345012345012345

You can run it online here and it does work under strict and warnings.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Is this a valid solution? \$\endgroup\$
    – grc
    Nov 5, 2014 at 5:54
  • \$\begingroup\$ @grc I'd say it is valid! Nice work! It prints the right thing. If you want some hints on the version that runs under strict and warnings let me know. \$\endgroup\$
    – hmatt1
    Nov 5, 2014 at 14:37
7
\$\begingroup\$

Ruby, 33 - cracked by user23013

enpsttux [[[]]]++\-\**????$$$$...

Output:

[*]

Original:

puts ?[+[*?*..?]][$$-$$]+?\\.next

\$\endgroup\$
5
  • \$\begingroup\$ Which version is this? \$\endgroup\$
    – Lynn
    Nov 6, 2014 at 23:07
  • \$\begingroup\$ @nooodl I have 1.9.3, but there's nothing version-specific about this one. \$\endgroup\$
    – Doorknob
    Nov 7, 2014 at 1:14
  • \$\begingroup\$ This is tough. Here's what I have so far: puts is obviously going to be the first thing there, .next is another keyword that can be used, and the rest is some sort of sorcery with ruby $ variables and character array creation.... +1 \$\endgroup\$
    – vero
    Nov 7, 2014 at 1:19
  • \$\begingroup\$ Cracked. \$\endgroup\$
    – jimmy23013
    Nov 7, 2014 at 15:22
  • \$\begingroup\$ @user23013 Nice! Not the original, though; I probably should have output characters that weren't actually in the source ;) \$\endgroup\$
    – Doorknob
    Nov 7, 2014 at 23:39
7
\$\begingroup\$

Python2, 132 characters

____        ,,,,:::''""""""""""((()))[[]]\\\0126aaaabcccceeeeeeeeeEffggiiiiiilllllmmmmnnnnnnooooopppppqqrrrrrrrrrssssStttttttuuvxxyy

Output (with a newline):

chance

Updated version, 96 characters

Answer to original version suggested the exec instead of compile+eval, so here is a simplified version:

____       :::''""(())[[]]\\\0126aaabcccceeeeeeeeEffiimmnnnnooopppqqrrrrrrrrrssStttttttuuxxxxyy

Update: cracked

Fully cracked by Alex Van Liew and KennyTM. The original solutions were (scroll right to reveal the spoiler):

                                                                                                                                eval(compile('try: compile("from __future__ import braces","","single")\nexcept SyntaxError as q:\n\tprint q[0][6:12]',"","single"))
                                                                                                                                exec('try:exec("from __future__ import braces")\nexcept SyntaxError as q:\n\tprint q[0][6:12]')
                                                                                                                                The hint meant "Consider {}, which are not present in the source code".
\$\endgroup\$
5
  • \$\begingroup\$ How many newlines are there? \$\endgroup\$
    – Sp3000
    Nov 6, 2014 at 14:42
  • \$\begingroup\$ None (not counting logical newlines like \n inside strings literals). With newlines the code could be shorter. \$\endgroup\$
    – Vi.
    Nov 6, 2014 at 14:48
  • 2
    \$\begingroup\$ +1 for not giving enough xs and cs for me to do what I want to do :P \$\endgroup\$
    – Sp3000
    Nov 6, 2014 at 15:25
  • 1
    \$\begingroup\$ Shall I think up some hint? Let's start with a vague one: Don't count ones which exist. Count ones which do not exist. \$\endgroup\$
    – Vi.
    Nov 9, 2014 at 23:44
  • \$\begingroup\$ Cracked. \$\endgroup\$
    – kennytm
    Nov 12, 2014 at 23:10
7
\$\begingroup\$

Ruby, 29 [safe]

Trying to see how short I can get in Ruby without getting cracked.

Code

paper view
otool
$()**,.8<<=>

Output

[0][0, 3][0, 3, 6][0, 3, 6, 9][0, 3, 6, 9, 12][0, 3, 6, 9, 12, 16][0, 3, 6, 9, 12, 16, 20]

Original

eval <<p*8 o=*o,$>.write(o) p

Explanation

The first line creates a heredoc that starts on the next line and is delimited by the trailing p, then concatenates the resulting string to itself 8 times. Since it ends in a newline, this effectively creates a loop. The looped code assigns an array to the variable o, consisting of the elements in o.to_a (via the * shorthand), followed by the output of $<.write(o), which converts o to a string, prints it to STDOUT, and returns the number of bytes printed. A variable being assigned to for the first time is nil for the purpose of evaluating the right hand side, so on the first run *o is empty and write outputs nothing and returns 0. Each subsequent round outputs the array of bytes output on previous rounds. Using a p-delimited heredoc creates decoy methods for output, p and $><<, in the scrambled characters, that won't work because you need the bytecount.

\$\endgroup\$
6
\$\begingroup\$

PHP, size 49 [Cracked by Martin Büttner]

Code

sub(print2w, $+expect+$+one+$+str+$+in=$@~main$);

Output

{main}
\$\endgroup\$
4
  • \$\begingroup\$ Would you mind disclosing which PHP version you tested this with? \$\endgroup\$ Nov 6, 2014 at 1:12
  • \$\begingroup\$ @MartinBüttner I won't specify the exact range, but everything from 5.3.0 up will have the correct result. \$\endgroup\$
    – bwoebi
    Nov 6, 2014 at 1:15
  • 3
    \$\begingroup\$ Cracked. Only took like... 4 hours... \$\endgroup\$ Nov 6, 2014 at 1:50
  • \$\begingroup\$ @MartinBüttner wow, congratulations! Didn't expect you to not give up. :-) \$\endgroup\$
    – bwoebi
    Nov 6, 2014 at 1:53
6
\$\begingroup\$

MATLAB, 41 bytes

Cracked by feersum

((((((snowy leopards can like magic))))))

Output

1
\$\endgroup\$
1
  • \$\begingroup\$ Cracked \$\endgroup\$
    – feersum
    Nov 6, 2014 at 6:45
6
\$\begingroup\$

Perl, 36 ← cracked by grc

Code

$$$()++..112279;;<<=__ffiinooprrrt{}

Output

perl

Tested here

\$\endgroup\$
1
6
\$\begingroup\$

Haskell, 100 Chars (Invalid, output too long)

Code

//Sup
tl=[]
while(syn==(+j)) tl+=b.a();
//(: #jquery :)\\
$("#jquery").on("click", j=>alert(j==m))

Output:

"\er\\e\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\"\\\\\\\\\\\\\"\\\\\\\


Original

(#)=(>);(//)=(++)
l=j.show
main=putStr.l.l$l"eer"
j[]="\\"
j(y:u)=let(q,c)=break(#y)u in y:j c//j q
\$\endgroup\$
7
  • 5
    \$\begingroup\$ I thought for a moment that I'm reading "Evolution of Hello World" question. \$\endgroup\$
    – Vi.
    Nov 5, 2014 at 1:45
  • 1
    \$\begingroup\$ @Vi yeah, but I think that the Levenshtein distance is a tiny bit more than 7 in this post. \$\endgroup\$
    – Zaq
    Nov 5, 2014 at 2:05
  • 1
    \$\begingroup\$ Output is longer than 100 chars \$\endgroup\$
    – Lynn
    Nov 6, 2014 at 22:50
  • 1
    \$\begingroup\$ @Zaq: the size limitation is not on code size, it's on output! \$\endgroup\$
    – Lynn
    Nov 7, 2014 at 0:11
  • 1
    \$\begingroup\$ Huh. And I guessed you did something with fix show. Definately uncrackable \$\endgroup\$ Nov 7, 2014 at 11:25
6
\$\begingroup\$

J, 22 bytes

Code

!%()1348:::bbceehorvxx

Output (97 chars)

1226317306651180983274420265228191056569220222873505571155987454033425908908110103433163350999040

I expect this to be practically impossible...

\$\endgroup\$
6
\$\begingroup\$

CJam, 32 bytes (cracked)

Scrambled source

"Beware the Jabberwock, my son!"

Output

4074552392882954617076720538102062920
\$\endgroup\$
4
  • 2
    \$\begingroup\$ Hm, where did you get the idea for using a quote as scrambled CJam code. ;) \$\endgroup\$ Nov 6, 2014 at 10:35
  • 1
    \$\begingroup\$ Cracked \$\endgroup\$
    – jimmy23013
    Nov 6, 2014 at 13:02
  • \$\begingroup\$ @MartinBüttner: That's a line from a poem, not a movie quote. Entirely different! \$\endgroup\$
    – Dennis
    Nov 6, 2014 at 16:47
  • \$\begingroup\$ @Dennis Wait, mine wasn't from a movie either. (Not exactly from a poem, though. :D) \$\endgroup\$ Nov 6, 2014 at 17:32
6
\$\begingroup\$

Pyth - 35 - Cracked

In the spirit of @MartinBüttner:

Code

"Programming Puzzles and Code Golf"

Output

4.459431618637297

Try to decode it online here.

\$\endgroup\$
2
  • \$\begingroup\$ I've cracked it, but in the interest of getting more people to use Pyth, I'm temporarily removing my answer. \$\endgroup\$
    – isaacg
    Nov 7, 2014 at 5:02
  • \$\begingroup\$ Alright, cracked. \$\endgroup\$
    – isaacg
    Nov 8, 2014 at 10:31
5
\$\begingroup\$

TinyMUSH 3.1, 20

Scrambled:

(#ret,#3!#+#2i\2#,@)

Output:

3210
\$\endgroup\$
2
  • 6
    \$\begingroup\$ How are we supposed to run this? Where is the language reference? (The link doesn't help here). \$\endgroup\$ Nov 6, 2014 at 2:18
  • 3
    \$\begingroup\$ @n̴̖̋h̷͉̃a̷̭̿h̸̡̅ẗ̵̨́d̷̰̀h You can run this code by connecting to a MUSH running the appropriate TinyMUSH version. Browse here to find one where Server Type is "MUSH", or download the server source from here and run a MUSH yourself. \$\endgroup\$
    – Muqo
    Nov 6, 2014 at 2:41
5
\$\begingroup\$

Python 3, length 110 [cracked by grc]

Scrambled (\n denotes a newline)

\n\n\n   ""((((())))),.......9::;===IOS[]__addeeegghiiiiiiiiijllmmnnoooooooppprrrrsssssssssstttttttttttuuuuuvwyyy

Output:

The better is Flat dense. break never of be do at never. If bad it honking

Here's another fun one - not meant to be hard, but just something unusual and puzzly. :)


Explanation

The random-looking words are taken from the Zen of Python (PEP 20), which is automatically printed via the easter egg import this. The passage is just every ninth word, as hinted by the 9::[] present.
To extract every ninth word without automatically printing the passage when importing, we redirect sys.stdout to a StringIO().

\$\endgroup\$
1
  • \$\begingroup\$ Cracked \$\endgroup\$
    – grc
    Nov 6, 2014 at 11:19
5
\$\begingroup\$

Javascript, 29 - Cracked

Run in a Chrome browser console

Code

23*47,(no,(.][j,i|i,j][.),on)

Output

181

Original code

[,,,].join(3)|[,4,].join(7)*2

\$\endgroup\$
1
1
2 3 4 5
9

Your Answer

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

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