# Unscramble the Source Code [robber thread for cracking attempts]

This is the companion thread to the main Unscramble the Source Code challenge. If you think you have managed to unscramble one of the cop answers, you should post your solution as the answer to this thread.

As a reminder, 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.

Too many solves

20 solves

15 solves

10 solves

7 solves

5 solves

4 solves

3 solves

2 solves

1 solve

• Perl 5, size 27, by Morot - print'pin'=~tr(a-za)(za-z)r – user15244 Nov 6 '14 at 14:34
• @WumpusQ.Wumbley We've all been there... ;) – Martin Ender Nov 6 '14 at 14:35
• I refuse to waste my time attempting to appease it. – user15244 Nov 6 '14 at 14:35
• Given the two question bodies, it appears that the scrambled/unscrambled answers are reversed – Mooing Duck Nov 6 '14 at 23:31
• Ruby, 23 by MegaTom = p %++.methods[80][1..-1] – histocrat Nov 11 '14 at 22:31

# Python, 37, MrWonderful

print 4123.*3
" +++3:==deefinorsuu"


Probably not intended solution, but this solution is so obvious that I can't help.

Python 2 assumed.

• That was not, in fact, the original code, but it is close enough. I commend your brevity! ;-) – MrWonderful Nov 14 '14 at 17:51

## J, 25, Caridorc

echo 3%##++-/-/i.!/i.3345


There has to be many ways of getting rid of the extra characters...

# C, 19, by Olavi Mustanoja

int main;retunr(){}


# C - size 33, by Olavi Mustanoja

#define p 2+57
main(){return p*p;}


Returns 2 + (57*2) + 57 = 173

# Javascript, 35 (36?), by user3863227

Too easy. After I took out Math and alert, log was the only option.

l=Math.log;alert(l(l(l(1234))));1279


(By the way, I counted 36 characters, not 35.)

# JavaScript, 10, by Jamie Barker

btoa(self)


There weren't that many options...

# PHP, size 46, by Ismael Miguel

$i=az;echo++$i,nd;$i[((E<<H)<=$m&oorrYYz)^$f];  Quite sure this isn't the intended solution. Turning off notices is recommended for running this. $i is first set to az, then incremented, which yields ba.

echo can take a list of strings to print; here it prints $i(ba), and then nd. The rest of the code ($i[((E<<H)<=$m&oorrYYz)^$f];) does nothing.

• Nice one! At the moment, I don't have the solution I had. The coma (, char) was my mistake on this one. I used it to make a "pretty" runnable scrambled code. In 40m I post the intended answer. – Ismael Miguel Nov 10 '14 at 12:55
• I'm sorry for the delay in providing the answer I had. I completely forgot when I went home for lunch. – Ismael Miguel Nov 10 '14 at 16:10
• This was the intended code: for($z=rand,$i=H<<EY;$i<(m^Y);)echo$z[$i++]&o;. – Ismael Miguel Nov 10 '14 at 20:29 • Greetings dude. After all this time, I've noticed you misspelled my name. Can you please fix it? – Ismael Miguel Jan 11 '15 at 22:59 • @IsmaelMiguel Sorry about that, fixed. – es1024 Jan 11 '15 at 23:01 # Lua, size 18, by user3155415 print(3<math.huge)  I actually haven't tested this, but it should work. # CJam, size 52, by user23013 33,33,33f+:cm*33)%",,,:::')@\&++++3333333333cfffff";  Test it here. Thanks for providing "...";. ;) • The intended solution was 33,33,33f+:c)",,,fffff:::'&"+;+33*33%33\33@33)m33++c. (Note that it has two redundant 3s.) Using m instead of - seemed to be a bad choice. And yes, those ,:fs are supposed to be only misleading. – jimmy23013 Nov 5 '14 at 9:19 # PHP, size 13, by kenorb @die(_(abc));  I have no idea what _(...) does. Now I do. • Me either (re: _). The org was: die(_(@abc));, you're too quick. – kenorb Nov 5 '14 at 14:44 # Python 2, size 57, by FryAmTheEggman print''.join(map(chr,(40+58,90+4+10+0b100,113+4,101++0)))  The ++ is a lazy way to get rid of a +. • Nice work! This was the original: print''.join(map(chr,(0140+0b10,0143+9,0105+48,++++101)) – FryAmTheEggman Nov 5 '14 at 21:08 # Mathematica, size 35, by Tally $PrePrint=$Pre=e=p=esPrint&'' ;a  Definitely not unique. Basically, I'm creating a constant function, take the second derivative (which is a constant-0 function) and make sure that function is applied to any expression that is evaluated or printed. Then I evaluate a. • Yeah, I figured it probably wasn't unique... Still it was fun to try and mess with parts of mathematica I hardly understand. My code was:$PrePrint = e = s' &; $PrePrint = p = e' – Tally Nov 6 '14 at 2:26 # Brainfuck, size 118, Sp3000 +++[->++++<]>[->+++[->>+++>+>++>+>+++>++>+[<]<]>>>>+>+>+>+<<<<<<<<]>>>+++++>>++>++++>+[>]+++[-<-<->>]<[<]>[.>]<<<++++>  Brainfuck is really not so bad, as long as it's not golfed too much. Since the alphabet is so limited, you can write whatever program you want as long as it's shorter than the original, and then make slight adjustments to balance the symbol counts. • Indeed :) Maybe I should have made the string longer, but I'm not sure how much that would have helped. Didn't want the program to be too long though. – Sp3000 Nov 6 '14 at 9:58 # JavaScript, size 25, by Cris alert.apply(self,[alert])  # JavaScript, size 29, by Cris new Event("flushPs15").CHANGE  Works in the console. # PHP, size 27, by kenorb $_=hex2bin(7069);die($_());  (hex2bin(7069) evaluates to "pi" which is then called) • @kenorb woops, that was badly copied. – bwoebi Nov 6 '14 at 17:14 # Mathematica, size 29, by Fox Wilson $PrePrint=Function[{x},5];
2+2


Learned something new today! :) ($PrePrint) • You're missing a pair of curly braces, but it's pretty obvious where they go (around the x in the Function definition) -- hopefully OP won't mind. – Fox Wilson Nov 4 '14 at 22:05 • @FoxWilson Oh, sorry, thanks for letting me know! (They can also go around anything in the final line, or the entire first statement.) – Martin Ender Nov 4 '14 at 22:09 • todat? today? – TRiG Nov 6 '14 at 18:05 • @TRiG I have no idea what you're talking about. ;) – Martin Ender Nov 6 '14 at 18:06 # C, size 28, Mig main(s){s=2189640;puts(&s);}  Depends on the endianness of the system. • Lorem ipsum dolor sit what now? – squeamish ossifrage Nov 6 '14 at 16:11 • Validated here : ideone.com/xpokuO – Michael M. Nov 6 '14 at 16:13 • @squeamishossifrage It's probably Bayesian poisoning. – kenorb Nov 6 '14 at 19:37 • @feersum If you don't pasting any rubbish into your posts intentionally, please check your computer for any viruses or adwares. – kenorb Nov 6 '14 at 19:45 • @kenorb He was probably trying the avoiding rivers problem as well :D – Optimizer Nov 6 '14 at 19:53 # JavaScript, size 26, by Cris eval("new function$(){}")


Tested in Chrome's console.

# Python 3, size 46, hosch250

(print("'(otlotb)'")
==
'bffiilnnoopprrrr01*')


I don't think the idea is to let me simply print the output string in a plain literal...

• This is my original program: f=bool;prin="'(otlotb)'"*f('01');print(prin). Replace the ; with newlines. – 23fc9a62-56de-47fb-97b4-737890 Nov 7 '14 at 2:02
• BTW, user23013 is correct - you need to move your parenthesis from the garbage statement to the output statement. – 23fc9a62-56de-47fb-97b4-737890 Nov 7 '14 at 2:03

# Java, size 226, nhhhhtdh

enum
u{u;public
static
void
main(String...a){


A quick search revealed that it was easy to generate a PatternSyntaxException with the message Unmatched closing ')', but it proved to be unnecessary as the abundance of backslashes, us and digits allowed me to create any character I didn't have via escapes.

# Python 2, size 89, Beta Decay

   ''''''''((()))*,,,,...12;;=BFGGIIIILPRaaaaaabceeeeeeffgggggiiiiiklmmmmmmnnoopprrrsttvw


Really I would recommend to output something........

# JavaScript, size 30, by Qwertiy

with(Math)alert(max^min)


Interesting use for with. :)

# JavaScript, 41 bytes, by Ismael Miguel

(function(){return this})('ccnoorrsttu.')


Tested in Chrome's console.

• This wasn't what I had in mind, but was this function(){}.constructor('return this')(). I guess it was too easy. – Ismael Miguel Nov 8 '14 at 11:43

# PHP, size 80, by Ismael Miguel

priNt(a^Z^P^Q);$A^=$A^=$C+=$F.=($I^$I^$O<$PTTUWWXX______________aaabffjkory);;;;


There are many ways to get a short output like :.

• Well, I had this source code: $__=NZrkPi^jAtFbW^TIOCfX;for($_=aa^WU;$_<AIa^pyQ;$_+=a^P)$___.=$_^T^X;$__($___);. Completely forgot to remove the priNt chars :/ This was a serious breach. I will have more careful next time. But nice one! – Ismael Miguel Nov 9 '14 at 7:27

# QBasic, 43 bytes, by DLosc

DATA?
DIM P AS STRING
?P;P;CEEEEH36\$


# ECMAScript, 90 bytes, by Cris

(function(t){t.n=t;t.n(t.n.FFFbcdeehhiiiinooopprrrsstuuy)}) ((function(){alert(this+"")}))


The original solution is probably (based on Martin Büttner's work in the chat):

Function.prototype.F=function(){return this.bind(this)()};(function(){alert(this+"")}).F()

• Lol, nice workaround! :) – Martin Ender Nov 9 '14 at 18:59

# PHP, 33 bytes, by Ismael Miguel

echo  0X1^BXcdeilnu08DFHTTTgk467;


Tested on ideone.

This might actually also work on Windows. All it does is xor a hexadecimal 1 with an undefined constant which yields 0.

For the Windows one you can use

echo  7^'6cdeilnudBXX4';


which should also work on both platforms, because the string is simply coerced into an integer (being 6), and then we xor that with 7.

I'm curious what those were supposed to be.

• Linux: PHP Parse error: syntax error, unexpected 'Xdeilnu0018DFHTTTgk' (T_STRING), expecting ',' or ';' in /home/gn2Uey/prog.php on line 2 but the windows is correct. But really nice try! – Ismael Miguel Nov 9 '14 at 22:24
• @IsmaelMiguel sorry, the link is wrong, but if you use the code in my answer it works. I've fixed the link now. – Martin Ender Nov 9 '14 at 22:28
• writecodeonline.com/php -> runs fine here. But yeah, you cracked it. My mistake was leaving the 1 in the code. The code I has is this: Linux: echo include H010D67XT^gTTFkXB48;. Windows: echo include '67X'^XB4; – Ismael Miguel Nov 9 '14 at 22:31
• @IsmaelMiguel Wow, I must have been blind, I did not see that the lowercase letters spell include. – Martin Ender Nov 9 '14 at 22:37
• And I didn't see I left that 1 behind. But it was really a nice catch! – Ismael Miguel Nov 9 '14 at 22:43

# QBasic, 79 bytes, by DLosc

print"Iodine"
if f then scReen         BLaaabbefgghhhiiiiiiiikkllnnossstt,u-u.u


# Python, 60, f.rodrigues

print(60132)