26
\$\begingroup\$

This is the cops' thread. The robbers' thread goes here.

Write a program or function consisting only of printable ASCII characters (that excludes tab and newline) that outputs at least 5 printable ASCII characters in ascending order (from space to tilde / 32 to 126). Characters can be outputted several times, as long as they are adjacent to each other. A single trailing newline is accepted. You must provide the full output, and for every 6 characters in your code you must provide one character in your code, at the position it appears. If your code has 5 or less characters, then you have to reveal only the length. You shall not reveal more than 1 character per 6 in your code.

So if your code alphaprinter outputs the alphabet from a-z, then you need to reveal 2 characters of your code (use underscore for the others), for instance:

al__________  // or
__p__p______  // or
__________er

Rules / specifications:

  • You cannot append trailing white spaces that doesn't have a function.
  • You can not use comments (but the robbers can use comments when cracking the code)
  • Built-in cryptographic primitives (includes any rng, encryption, decryption, and hash) aren't allowed.
  • In languages where the default output are like in MATLAB: ans =, then that's accepted, as long as it's clearly stated and shown that ans = is outputted. It should also be clearly stated whether this is part of the "ascending output" or not.
  • The output must be deterministic
  • Using a non-free language is not accepted
  • The output doesn't have to be consecutive characters. Both abcde and abcdg are valid outputs.
  • The characters do not need to be distinct as long as the output contains at least 5 characters. aaaaa and aaacc are valid.
  • Answers that assumes a REPL environment are not considered to be valid programs or functions and are therefore not allowed.
  • STDERR is not considered valid output, but data may written to STDERR.

If the revealed characters are underscores, then you must identify it as shown below. In this case, the second and sixth character are revealed underscores, while the others are unknown.

_____________
 |   |

Note: The robbers only need to find a code that produces the same output. The language, the length of the robbers solution, and the position of the revealed characters must also match.

Your score is the number of characters in your code. The winner will be the submission with the lowest score that hasn't been cracked in 7 days. Only submissions that are posted in 2015 (UTC) are eligible for the win. Submissions that are posted later than this are welcome, but can not win.

In order to claim the win you need to reveal the full code (after 7 days).

Your post should be formatted like this (nn is the number of characters):


Language, nn characters

Output:

abcdefghijklmnopqrstuvwxyz

Code (12 characters):

al__________

If the code is cracked, insert [Cracked](link to cracker) in the header. If the submission is safe, insert "Safe" in the header and reveal the full code in your answer. Only answers that have revealed the full code will be eligible for the win.

\$\endgroup\$
  • 1
    \$\begingroup\$ Does this mean that if my code is print ( "abcde" ), I can reveal three whitespaces? \$\endgroup\$ – Adnan Dec 26 '15 at 12:07
  • \$\begingroup\$ @Adnan, technically yes, you can. \$\endgroup\$ – Stewie Griffin Dec 26 '15 at 12:15
  • \$\begingroup\$ When somebody makes a seed answer, we might not even know the length of the code. \$\endgroup\$ – wizzwizz4 Dec 27 '15 at 9:03
  • \$\begingroup\$ @wizzwizz4 Seed isn't allowed \$\endgroup\$ – Adnan Dec 27 '15 at 10:03
  • \$\begingroup\$ @Adnan I suppose it doesn't require any brainpower, only brute-force power. \$\endgroup\$ – wizzwizz4 Dec 27 '15 at 10:15

54 Answers 54

6
\$\begingroup\$

Hexagony, 8 characters, safe

_______.

prints

123456

You can try Hexagony online

Solution

`&)!."@.

The ` is just misdirection to make the code look like it requires side-length 3. Unless the interpreter is executed with -d the backtick is simply stripped from the source code before determining the layout. Afterwards, the code fits into side-length 2:

 & )
! . "
 @ .

This moves the memory pointer (MP) around one hexagon of the memory grid, while copying the value to the next edge, incrementing it and printing it.

This is what the memory grid looks like, with the MP starting the marked position:

enter image description here

Initially all edges are zero. The first & is a no-op, but ) increments the edge and ! prints the 1. Then " moves back to the left (the edge labelled 2). There, & copies a value. Since the edge is currently zero, the left neighbour (in the direction of the MP) will be copied which is the 1 we just printed. ) increments it, ! prints the 2. This continues as long as we're visiting new edges and we print all digits up to 6. When we hit the edge we started on, & will copy the right neighbour instead (because the edge value is positive), so the edge becomes 0 again, and control flow jumps to the last row, where @ terminates the program.

Try it online.

\$\endgroup\$
  • \$\begingroup\$ I got 123456, but it only doesn't stop running and needs to be killed. Is that allowed? \$\endgroup\$ – Adnan Dec 28 '15 at 22:16
  • \$\begingroup\$ @Adnan I don't think it is. My program terminates. \$\endgroup\$ – Martin Ender Dec 28 '15 at 22:56
13
\$\begingroup\$

Perl, 46 characters (safe)

Output:

((()))*++,---../00011123445556667779::;;<<==??@@AAACEFGHHHIKKMMNOOOPPQQQRRSSSVWXXYY[[[\]]]^^^```aaeeffggghjjjnpppqqrttuwxxyzz{{{

Code:

print _______________________________________;

I somehow managed to delete the original in the space of a week, but I think this is right:

print chr()x(($i=($i*41+7)%97)&3)for(40..123);

\$\endgroup\$
  • 9
    \$\begingroup\$ Well done. You turned it into a mystery string printer. ಠ_ಠ +1 \$\endgroup\$ – Addison Crump Dec 26 '15 at 14:13
  • 2
    \$\begingroup\$ watch it include some homebrew random number generator :P \$\endgroup\$ – quintopia Dec 26 '15 at 19:25
  • \$\begingroup\$ I strongly suspect the output is sorted characters from a short list of error messages from eval'ing something. \$\endgroup\$ – Sparr Dec 30 '15 at 18:07
11
\$\begingroup\$

Brainfuck, 48 characters, cracked by Mitch Schwartz

I made this one for the robbers. It is definitely not going to be the winning submission :)

____[_____[_______]__]___[___________]___[_____]

This outputs:

ABCDEFGHIJKLMNOPQRSTUVWXYZ

Solution:

++++[>++++[>++++<-]<-]+++[>++++++++<-]>++[>+.<-]

I tested it here.

Hint: Don't try to find programs generated by online generators haha. This was handwritten and can only be solved by logical thinking :)

\$\endgroup\$
7
\$\begingroup\$

CJam, 13 characters

_____________
  ||

prints

7LLMYahnsuv

You can try CJam online.

Solution

{`__Jf^er$}_~

I thought basing a cop on a generalised quine was pretty clever and novel. The moment I posted this, I realised that __ and er are completely useless, which is why I posted the 8-byte CJam cop for a more competitive score. Pietu cracked that one rather quickly, so I was afraid he'd figure out this one as well. I suppose the unnecessarily convoluted character transliteration saved it.

Anyway, the code takes its own characters (except the _~), XORs each one with 19 for obfuscation and then sorts them.

This cop led me to the "discovery" of xorting, although I'm not actually using it here (and it would probably be near impossible to make use of it with a short generalised quine).

\$\endgroup\$
7
\$\begingroup\$

Noisy 3SP, 89 characters (safe)

0 _____________________________ _ _ _ _ _ _ _ _ _ __2_2__________________________________

Original program:

0 0 0 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 0 3 2 2 2 2 0 3 0 1

This program prints

 !"#$$

(note the leading space), and nothing else!

Explanation (*n refers to the nth cell in memory):

0 0 0                                Increment *0 to 3 (via the 0s in *0, *1, and *2)
2 (32 times)                         Increment *3 to 32 (via the 0 in *2 and the 3 in *0)
                                      (Note that *3 mod 256 is the character that prints)
0                                    Increment *32 (via the 3 in *0 and the 32 in *3)
3                                    Increment *1 (via the 32 in *3 and the 1 in *32)
                                      (Note that printing is on when *1 mod 2 is 1,
                                       which means " " prints right here)
2 (4 times)                          Increment *3 to 36 (printing '!"#$')
0                                    Increment *36 (via *3) (printing "$" again)
3                                    Increment *1 to 2 (via *36) (printing turns off)
0                                    Increment *36 to 2 (via *3)
1                                    Increment *0 to 4 (via *2)

The last two commands turn out to be sufficient to prevent 1 from ever being incremented again on subsequent passes through the program, which means nothing is ever again printed, though it will go on setting all memory addresses from *36 onward to the value 36 forever.

\$\endgroup\$
  • 2
    \$\begingroup\$ an esolang in which structured programming is impossible and every program has to be written from scratch. 0_0 plus one from me. \$\endgroup\$ – Conor O'Brien Dec 27 '15 at 17:15
  • \$\begingroup\$ Don't be intimidated. It does go on to say This is probably not that language. If you sit down and try to write a program that gives that output, you'll probably get something very similar. \$\endgroup\$ – quintopia Dec 27 '15 at 22:00
  • \$\begingroup\$ Thanks, but no thanks ^_^ the specs made me lose my mind. It's like brainf*** all over again, except worse, \$\endgroup\$ – Conor O'Brien Dec 28 '15 at 0:56
  • 1
    \$\begingroup\$ Looking forward to seeing your program revealed. I can't think of a way to modify my answer so that I get 2's in those places instead of 5's. You've bested me! Cool language :) \$\endgroup\$ – Emigna Dec 30 '15 at 17:09
  • \$\begingroup\$ Aww...always sad to see someone give up :/ \$\endgroup\$ – quintopia Dec 30 '15 at 17:45
6
\$\begingroup\$

JavaScript (ES6), 60 characters, Cracked by user81655

Not promising to win, but hopefully fun to crack:

e_e_______a__a____e___e________e__o___________o______o______

This is a function that returns:

    :ERacddeeeeeeffiinnnoorrrrst
^^^^ -> 4 whitespaces

Edit

user81655 cracked it character by character:

e=e=>{try{a}catch(e){return[...e.toString()].sort().join``}}

\$\endgroup\$
5
\$\begingroup\$

Matlab Octave, 27 characters, safe

Challenge

Regarding the new language restrictions: It also works in Octave.

____________3_3___4_3______

Output (in Octave): (ans = is not part of the output, the first character of the output is ")

ans = """""""""""""""""""""""""""""""""""""""""""########$$$$$$%%%%&&&&'''(()))**++,,-../001223456789:;<=>?@BCDFGHJKMNPRTUWY[]_acehjloq

Output (in Matlab): (ans = \n\n is not part of the output, the output is just the last line)

ans =

"""""""""""""""""""""""""""""""""""""""""""########$$$$$$%%%%&&&&'''(()))**++,,-../001223456789:;<=>?@BCDFGHJKMNPRTUWY[]_acehjloq

Solution

[fix((0:.07/3:3).^4+34),'']

We are basically looking at this function, converted to ASCII values. enter image description here

\$\endgroup\$
  • 1
    \$\begingroup\$ Could this be the floored y-values of a quintic? \$\endgroup\$ – LegionMammal978 Dec 26 '15 at 18:42
  • \$\begingroup\$ meta.codegolf.stackexchange.com/a/7212/8478 \$\endgroup\$ – Martin Ender Dec 26 '15 at 20:48
  • \$\begingroup\$ @LegionMammal978 I do not understand what you mean, but because you are asking I think it might very well be=) \$\endgroup\$ – flawr Dec 26 '15 at 21:16
  • \$\begingroup\$ @MartinBüttner I was not aware of this recent restriction, should perhaps be pointed added to the question. \$\endgroup\$ – flawr Dec 26 '15 at 21:18
  • 1
    \$\begingroup\$ +1 for It also works in Octave. \$\endgroup\$ – Conor O'Brien Dec 26 '15 at 21:42
4
\$\begingroup\$

R, 60 bytes, cracked by plannapus

Output:

0123456789ABCDEFGHTUVWXYZdefghijklmnopqrstuvw

Code:

___(_(_:_____________]_____________6]_______s_4_____,___=___

I think this will not be so hard. We will see.

\$\endgroup\$
  • 1
    \$\begingroup\$ Cracked \$\endgroup\$ – plannapus Dec 28 '15 at 11:09
  • \$\begingroup\$ @plannapus Good job! :) \$\endgroup\$ – Fax Machine Dec 31 '15 at 5:03
4
\$\begingroup\$

Jolf, 27 characters, Cracked by Adnan

________W___________--_____
                         |

prints

abcdefghijklmnopqrst

Interpreter.

Original code:

on*2toHEWn)oH+H `pl$--$n}_H
on                          set n
  *2t                        to twenty
     oHE                    set H to the empty string
        Wn)                 while(n){
           oH+H             append to H
                `pl$--$n     get the nth character of the alphabet, decrement n before
                        }   }
                         _H print H reversed

Congrats to Adnan! You scare me.


Here, you can test your submission, to see how many characters must be removed.

setInterval(function(){r=document.querySelector("textarea").value;document.getElementById("output").innerHTML=r.length/6-r.split("").filter(function(x){return x=="_"}).length|0},20)
*{font-family:Consolas,monospace}textarea{width:100%;resize:none;height:auto;min-height:1.2em;}b{color:red;}
<textarea>Example Program</textarea><div>You must reveal <b id="output">n</b> characters.</div>

\$\endgroup\$
4
\$\begingroup\$

Fortran, 45 characters, safe

Complete Output:

 !"$)0<Ka|

Cat attempted to cracked it here

Code (45 characters):

pr_gr_m____________________/___3____________

Program code:

program t;print*,(char(i**3/8+33),i=1,9);end

\$\endgroup\$
  • \$\begingroup\$ Cracked. \$\endgroup\$ – cat Dec 27 '15 at 0:44
  • \$\begingroup\$ @Cat No, not cracked. Incorrect output: there is no trailing /! \$\endgroup\$ – Alexander Vogt Dec 27 '15 at 7:29
  • \$\begingroup\$ Evidently, I am blind, sorry. \$\endgroup\$ – cat Dec 27 '15 at 13:49
  • \$\begingroup\$ This is quite a challenge. (Well, I don't know Fortran, but it's a fairly easy language to get the hang of) \$\endgroup\$ – cat Dec 27 '15 at 16:18
  • \$\begingroup\$ @cat I'm glad you like it ;-) \$\endgroup\$ – Alexander Vogt Dec 27 '15 at 16:36
4
\$\begingroup\$

PHP, 46 characters, safe

Source:

for(_______________________=________________);

Outputs a 84 characters long string:

!!"#$%&'()*+,-./0123456789::;<=>?@AABCDEEFGHIIJKLLMNNOPPQRRSTTUUVWWXXYYZZ[[\\]]^^__`

Hint

What'd you say? My cousine is involved?

Revealed code

This method is relatively simply as it prints up to 64 characters starting at chr(32). The obscuring part is, that the iterator i is not incremented linearly. It's incremented by it's own cosine value which will result in repeated and missing characters.

for(;$i<64;)echo chr(32+$i+=cos(deg2rad($i)));
for(_______________________=________________);

\$\endgroup\$
3
\$\begingroup\$

CJam, 8 bytes, Cracked by Pietu1998

__:_____

prints

%*;a|~

You can try CJam online.

\$\endgroup\$
3
\$\begingroup\$

05AB1E, 13 characters, cracked by quintopia

I'm an idiot. I forgot to implement power function (-_-。). Here is the obfuscated code:

__D____<_____

My original code was:

99DF2}r<F*}bR

Explanation:

99DF2}r<F*}bR

99            # Pushes 99
  D           # Duplicates the top item
   F }        # Creates a for loop: For N in range(0, 99)
    2         # Pushes 2 (this will be done 99 times)
      r       # Reverses the stack
       <      # Decrement on the last item
        F }   # Creates a for loop: For N in range(0, 98)
         *    # Multiplies the last two item of the stack, which now looks like
              # [2, 2, 2, 2, 2, 2, 2, 2, ...]. Basically we're calculating 2^99
           b  # Converts the last item to binary
            R # Reverses the last item of the stack

This will output:

0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001

Yes, that is 99 zeroes followed by a 1.


Note, I have a power function implemented right now. So this could be done in six bytes:

Y99mbR
\$\endgroup\$
  • \$\begingroup\$ Is it pronounced like "Osabie"? \$\endgroup\$ – cat Dec 26 '15 at 15:32
  • 3
    \$\begingroup\$ @cat Some say "Osabie", others say "Usable", they're all correct haha :) \$\endgroup\$ – Adnan Dec 26 '15 at 15:34
  • 3
    \$\begingroup\$ @Adnan Sorry, you forgot me. I say it like "three hundred seventy-one thousand, four hundred eighty-six" ;) \$\endgroup\$ – ev3commander Dec 26 '15 at 20:37
  • \$\begingroup\$ String times number doesn't work as string repetition. :( \$\endgroup\$ – Conor O'Brien Dec 26 '15 at 22:01
  • \$\begingroup\$ @CᴏɴᴏʀO'Bʀɪᴇɴ Hehehe :) (that's for cases when the string itself is also a number, e.g. "4"3* = 12) \$\endgroup\$ – Adnan Dec 26 '15 at 22:06
3
\$\begingroup\$

Python 3.4, 127 characters

This is my first coppers-post. I think/hope it's not too hard or too obvious.

The obfuscated code:

_______inspect__________________getsource_____________________________________________print__________c*s_______________________

creates this output (there are 5 spaces at the beginning; total length is 7740 characters):

     """"""""""""(((((((((((((((((((((((((((((((((((((((((((((((((((((((()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))**********************...................................................................................................................;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;==============================[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiijjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooopppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppprrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
\$\endgroup\$
3
\$\begingroup\$

Pyth, 17 characters, cracked by Pietu1998

Output:

""''''''''''''''''''''0000000000111111111122222222223333333333XXXXXXXXXX[[[[[[]]]]]]

Code:

___________#____1

My solution:

Sjkm^dT%"'%#X"291

Pietu1998's solution:

S`u]G6*T`t"#X0231
\$\endgroup\$
  • \$\begingroup\$ Cracked. \$\endgroup\$ – PurkkaKoodari Dec 29 '15 at 19:40
  • \$\begingroup\$ I really like your code. I was thinking about hexadecimal for some time when cracking this, but I didn't know enough about Python's string formatting to get the same code. (Particularly, the # alternate form was new to me.) \$\endgroup\$ – PurkkaKoodari Dec 30 '15 at 11:09
3
\$\begingroup\$

Malbolge, 254 characters, cracked by Adnan

Code:

_____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ __

Output:

`AB\cd`

I kinda cheated by putting a space for every 6th character. Oh well...


Adnan's cracked code:

('&%: ^"!65 4Xzyx w4-Qs rpo'K mlk"' ~Dfdc ba}v< ::8[Z XnVlq }0/mO ,*MbK JH^6# 4`C|0 ?U=Sw uPsaq L4on2 Mjjh, ged)c '<$$p ]!};Y WiVxS eRQ>= ).K]l Ij"Fh gfedc b,=;z L\q%H X3E2C /ng-k N*KJI 8%6#D ~2^Ai >g<<d tUr`6 oJ"!1 /|{CU f)d>b <A_^! \};Yj yUxTS dtsr` ML

The original code:

bCBA@ ?>=<; :9876 54321 0/.-, +*)(' &%$#" !~}|{ zyxwv utsrq ponml kjihg fedcb a`_^] \[ZYX WVUTS RQPON MLKJI HGFED CBA@? >=<;: 9y165 43210 /.-,+ *)('& }C#"! ~wv<z \xwvu tsrqp onmlk jihgf e^$ba `_^W\ UyYXW VUTSR QPONM FKJIH GFEDC BA@9] =<;:9 27654 3210) M:

I cheated again by using a text-to-Malbolge generator for this code.

\$\endgroup\$
  • \$\begingroup\$ Cracked \$\endgroup\$ – Adnan Dec 30 '15 at 19:26
3
\$\begingroup\$

Mathematica 10.1, 98 characters, safe

Output is here. The entire output has 838,316 characters and a trailing newline.

Code:

Print[""<>Chara__________________________________________________________________________________]

Yes, this must be run in 10.1. (hint) The original program:

Print[""<>Characters@ToCamelCase@ExampleData@{"Text","DonQuixoteIEnglish"}~SortBy~ToCharacterCode]
\$\endgroup\$
  • \$\begingroup\$ At first I was quizzical as to which ASCII standard contains a hundred thousand codepoints, but now I understand, \$\endgroup\$ – cat Dec 26 '15 at 22:45
  • \$\begingroup\$ Since when is Mathematica free? \$\endgroup\$ – mbomb007 Jan 5 '16 at 20:00
  • \$\begingroup\$ @mbomb007 You would have to ask Martin Buettner. \$\endgroup\$ – LegionMammal978 Jan 5 '16 at 21:58
  • \$\begingroup\$ @LegionMammal978 no need to. You can use the Wolfram Cloud. \$\endgroup\$ – user48538 Jan 6 '16 at 12:34
3
\$\begingroup\$

MATL, 8 characters, safe

Stable version of the compiler working in Octave hopefully coming soon. Meanwhile, this GitHub commit works, and in particular runs the original code that produces the indicated output

This submission counts as posted on December 28, 2015, 15:30 UTC

Output:

$**0016688??@HHQ

Code (8 characters):

_:______

Solution

6:9tX*Sc

What it does:

6:9          % numeric vector [6 7 8 9]
t            % duplicate
X*           % Kronecker tensor product
S            % sort in ascending order 
c            % convert to char. Implicit display
\$\endgroup\$
  • 4
    \$\begingroup\$ I'm not sure this is legitimate, since MATL seems to require Matlab to be interpreted. (meta.codegolf.stackexchange.com/a/7212/8478) \$\endgroup\$ – Martin Ender Dec 26 '15 at 20:48
  • 2
    \$\begingroup\$ @cat I suppose the question is whether the interpreter works in Octave. \$\endgroup\$ – Martin Ender Dec 26 '15 at 23:20
  • 1
    \$\begingroup\$ @LuisMendo well, normally interpreter changes after the challenge are disallowed, but since this doesn't actually affect how the language works, making an exception might be fine. Ultimately, it's Stewie's call. But I think at the very least the deadline for cracking this should be extended. \$\endgroup\$ – Martin Ender Dec 28 '15 at 8:17
  • 1
    \$\begingroup\$ Yes, it should count as newly posted. What do you think, @StewieGriffin? \$\endgroup\$ – Luis Mendo Dec 28 '15 at 12:20
  • 1
    \$\begingroup\$ @Luis i agree. It can be counted as newly posted. :-) \$\endgroup\$ – Stewie Griffin Dec 28 '15 at 14:28
2
\$\begingroup\$

Labyrinth, 5 bytes, Cracked by Adnan

_____

prints

000000

My original code was:

<!!@ 

Note the trailing space.

I suppose I should have gone for more characters and revealed one of the !, because Adnan's solution only grows linearly when adding more !, while mine grows quadratically.

\$\endgroup\$
  • 2
    \$\begingroup\$ Cracked \$\endgroup\$ – Adnan Dec 26 '15 at 14:25
2
\$\begingroup\$

PHP, 28 characters

<?=________________________;

Outputs the string

abcdefghijklmnopqrstuvwxyz
\$\endgroup\$
  • 3
    \$\begingroup\$ You should add that this was cracked. \$\endgroup\$ – LegionMammal978 Dec 26 '15 at 20:39
  • 3
    \$\begingroup\$ @LegionMammal978 How would the OP know that if you delete your comment linking to the crack? \$\endgroup\$ – Martin Ender Dec 26 '15 at 20:56
  • 4
    \$\begingroup\$ @MartinBüttner My crack was a duplicate. \$\endgroup\$ – LegionMammal978 Dec 27 '15 at 1:08
2
\$\begingroup\$

ES6, 17 characters, cracked by Cᴏɴᴏʀ O'Bʀɪᴇɴ

__=____=_________

This is a function that will return the string

11233
\$\endgroup\$
  • \$\begingroup\$ I assume you mean JavaScript? \$\endgroup\$ – Conor O'Brien Dec 26 '15 at 20:25
  • \$\begingroup\$ Cracked? \$\endgroup\$ – insertusernamehere Dec 26 '15 at 20:28
  • \$\begingroup\$ FYI the original code was (i=106)=>i*i-3+'' \$\endgroup\$ – Neil Dec 26 '15 at 23:26
2
\$\begingroup\$

JavaScript, 83 chars, Cracked by Martin Büttner

Output

Hi~~~

Code

_=____r____=u____=__s__=_________=__________________u_______A__________e______"_~_"

Output is in the JS console of a browser like Chrome/Firefox.
Original code (which might be invalid):

q=w=e=r=t=y=u=i=o=p=s=d=f=g=h=j=k=l=z=x=c=v=b=n=m="Huh"[0]+"Alarms in here"[7]+"~~~"
\$\endgroup\$
2
\$\begingroup\$

Pyth, 6 characters, cracked by Pietu1998

Code:

S_____

Output:

.0113345678888999

You can try Pyth here

\$\endgroup\$
2
\$\begingroup\$

JavaScript ES6, 134 characters

Huh boy, that was fun. Good luck!

_=_=_____l____.______.________(___}__;___=______ru____"_____+_[________]______!____]__[_________e________.__U_________)__________\_____

Outputs:

((((((()))))))+...000000000000000000002233=>AAAAAAAAAAABBBBBCCCCCCCCCCCCCCCCCCDDDDDDDEEEEEEEEEEEEEEEEEEEFFFFFFFGHIIIIIIIIIIIIIIIIJJJJLLMMNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOPRRRRRRRSSSSTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUVVVVVVXXY[[[[[[[[]]]]]]]]````ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeffffffffffffffffffffffffffffffffffffffffffffffffffffffffiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiinnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu{{{{{{}}}}}}
\$\endgroup\$
2
\$\begingroup\$

CJam, 12 characters, Cracked by jimmy23013

Output

#$%&'()*+,-./:;<=>?@[\]^_`

Code

_:____#_____
\$\endgroup\$
2
\$\begingroup\$

Seriously, 7 bytes, Cracked by Martin Büttner

______S

Output:

   deeknnoow

Shouldn't be too difficult, even if the result is not exactly what you'd expect.

\$\endgroup\$
2
\$\begingroup\$

Python 3, 58 characters, cracked by Mitch Schwartz

Code:

______________print(_______(_______________________)_____)

import string;print(''.join(sorted(string.printable))[5:])

Output:

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
\$\endgroup\$
  • \$\begingroup\$ Cracked. \$\endgroup\$ – Mitch Schwartz Dec 28 '15 at 19:56
  • \$\begingroup\$ Cracked. \$\endgroup\$ – cat Dec 29 '15 at 0:32
  • \$\begingroup\$ Oh, wait, Mitch's comment never loaded for me till now... that makes me really sad. \$\endgroup\$ – cat Dec 29 '15 at 0:32
2
\$\begingroup\$

Befunge, 11 characters, cracked (in funge-98) by MegaTom

Output:

1223788

Obfuscated code:

________.__

All one line, since the rules prohibit newlines. Tested using http://www.quirkster.com/iano/js/befunge.html .

Edit: This is legally cracked since I didn't specify a version, but note that there's a Befunge-93 solution still out there.

\$\endgroup\$
  • \$\begingroup\$ Cracked \$\endgroup\$ – MegaTom Dec 29 '15 at 22:36
2
\$\begingroup\$

Perl 5, 30 bytes, cracked by Adnan

Code:

print_________________________

Output:

9:;@AFGHLMNRSTYZ_`a

Cracked:

Adnan found a trivial crack: obviously, I didn't think this puzzle through well enough. I've composed another instead.

\$\endgroup\$
2
\$\begingroup\$

Python 2, 62 chars, Cracked by Adnan

______________________________________________________________
         | |   ||                  |  |  ||

It kinda looks like a table.

This outputs the string abcde.

Adnan's code:

print "ab_c_de___".replace("_","")#___________________________

My code:

f=lamda _,__,___:"abcde"+'f'*sum(_,__,___)*000;print f(1,2,3);

\$\endgroup\$
  • \$\begingroup\$ Cracked \$\endgroup\$ – Adnan Dec 30 '15 at 23:01
  • \$\begingroup\$ I am allowed to use comments, right? \$\endgroup\$ – Adnan Dec 30 '15 at 23:28
  • \$\begingroup\$ I don't know. I specifically said when I posted it there were no comments. I don't know if I can do that though. I commented on the OP and asked. We'll see what he says. \$\endgroup\$ – Rɪᴋᴇʀ Dec 30 '15 at 23:50
  • 1
    \$\begingroup\$ You can not use comments (but the robbers can use comments when cracking the code) (CC @Adnan) \$\endgroup\$ – Dennis Dec 31 '15 at 1:28
  • \$\begingroup\$ Awww. @Rikerw is sad now. \$\endgroup\$ – Rɪᴋᴇʀ Dec 31 '15 at 1: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.