35
\$\begingroup\$

This is the robber's thread of a challenge. You can view the cop's thread here

A pretty common beginner style question is to print some string, but, there's a catch!, you need to do it without using any of the characters in the string itself!

For this challenge we will find out who is the best at printing X without X. There are two threads to this, a cop's thread and a robber's thread.

In the cop's thread users will choose a language (which we will call Y) and a string (which we will call X) and write a program in language Y which takes no input and outputs X without using any of the characters in X. The cop will then post both X and Y without revealing the program they have written.

Robbers will be select cop answers and write programs in language Y which take no input and output X. They will post these "cracks" as answers in this thread. A crack need only work not be the intended solution.

Once a cop's answer is one week old, so long as it has not been cracked, the cop may reveal their program and mark it as "safe". Safe answers can no longer be cracked

Robbers will be scored by the total number of successful cracks with more cracks being better.

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Congrats on an excellent challenge with high 'replay value'. I've had a lot of fun participating on both sides, digging into a couple of languages for the first time along the way. \$\endgroup\$ – Dingus Aug 20 '20 at 3:22

98 Answers 98

2
\$\begingroup\$

Rust, cracks madlaina's (edited) answer

extern "C" {
    fn system(x: &str) -> &str;
}

fn main() {
    unsafe {
        system("echo -en '\x70\x77'");
    }
}

Relies on undefined behavior (C string != &str) but it seems to work.

Try it online!

\$\endgroup\$
1
  • \$\begingroup\$ That's very creative! Not the solution I had in mind though, so I'll post an updated version. \$\endgroup\$ – madlaina Aug 2 '20 at 8:44
2
\$\begingroup\$

Perl 5, cracks @Gilles 'SO- stop being evil''s answer 10359 bytes

Note that the link below includes /, but the code for Perl 5.20.3 uses ? instead to meet the rules. TIO has a newer Perl and doesn't support the ?...? syntax.

[$_=[$?..$=]]&[$__=$$_[//]]&[$_=[$__..$=]]&[$___=$$_[//]]&[$_=[$___..$=]]&[$____=$$_[//]]&[$_=[$____..$=]]&[$_____=$$_[//]]&[$_=[$_____..$=]]&[$______=$$_[//]]&[$_=[$______..$=]]&[$_______=$$_[//]]&[$_=[$_______..$=]]&[$________=$$_[//]]&[$_=[$________..$=]]&[$_________=$$_[//]]&[$_=[$_________..$=]]&[$__________=$$_[//]]&/./&[$_=[$&.._]]&[$___________=$$_[$?]]&[$_=[$___________.._]]&[$____________=$$_[//]]&[$_=[$____________.._]]&[$_____________=$$_[//]]&[$_=[$_____________.._]]&[$______________=$$_[//]]&[$_=[$______________.._]]&[$_______________=$$_[//]]&[$_=[$_______________.._]]&[$________________=$$_[//]]&[$_=[$________________.._]]&[$_________________=$$_[//]]&[$_=[$_________________.._]]&[$__________________=$$_[//]]&[$_=[$__________________.._]]&[$___________________=$$_[//]]&[$_=[$___________________.._]]&[$____________________=$$_[//]]&[$_=[$____________________.._]]&[$_____________________=$$_[//]]&[$_=[$_____________________.._]]&[$______________________=$$_[//]]&[$_=[$______________________.._]]&[$_______________________=$$_[//]]&[$_=[$_______________________.._]]&[$________________________=$$_[//]]&[$_=[$________________________.._]]&[$_________________________=$$_[//]]&[$_=[$_________________________.._]]&[$__________________________=$$_[//]]&[$_=[$__________________________.._]]&[$___________________________=$$_[//]]&[$_=[$___________________________.._]]&[$____________________________=$$_[//]]&[$_=[$____________________________.._]]&[$_____________________________=$$_[//]]&[$_=[$_____________________________.._]]&[$______________________________=$$_[//]]&[$_=[$______________________________.._]]&[$_______________________________=$$_[//]]&[$_=[$_______________________________.._]]&[$________________________________=$$_[//]]&[$_=[$________________________________.._]]&[$_________________________________=$$_[//]]&[$_=[$_________________________________.._]]&[$__________________________________=$$_[//]]&[$_=[$__________________________________.._]]&[$___________________________________=$$_[//]]&[$_=[$___________________________________.._]]&[$____________________________________=$$_[//]]&[$_=$#_]&/./&[$_______________________________________________________________=$&]&[$________________________________________________________________=$_______________________________________________________________&$$__.$__]&[$_=$$________________________________________________________________=$_____]&/...$/&[$_=$&]&/./&[$_____________________________________=$&]&[$_=[$_____________________________________.._]]&[$______________________________________=$$_[//]]&[$_=[$______________________________________.._]]&[$_______________________________________=$$_[//]]&[$_=[$_______________________________________.._]]&[$________________________________________=$$_[//]]&[$_=[$________________________________________.._]]&[$_________________________________________=$$_[//]]&[$_=[$_________________________________________.._]]&[$__________________________________________=$$_[//]]&[$_=[$__________________________________________.._]]&[$___________________________________________=$$_[//]]&[$_=[$___________________________________________.._]]&[$____________________________________________=$$_[//]]&[$_=[$____________________________________________.._]]&[$_____________________________________________=$$_[//]]&[$_=[$_____________________________________________.._]]&[$______________________________________________=$$_[//]]&[$_=[$______________________________________________.._]]&[$_______________________________________________=$$_[//]]&[$_=[$_______________________________________________.._]]&[$________________________________________________=$$_[//]]&[$_=[$________________________________________________.._]]&[$_________________________________________________=$$_[//]]&[$_=[$_________________________________________________.._]]&[$__________________________________________________=$$_[//]]&[$_=[$__________________________________________________.._]]&[$___________________________________________________=$$_[//]]&[$_=[$___________________________________________________.._]]&[$____________________________________________________=$$_[//]]&[$_=[$____________________________________________________.._]]&[$_____________________________________________________=$$_[//]]&[$_=[$_____________________________________________________.._]]&[$______________________________________________________=$$_[//]]&[$_=[$______________________________________________________.._]]&[$_______________________________________________________=$$_[//]]&[$_=[$_______________________________________________________.._]]&[$________________________________________________________=$$_[//]]&[$_=[$________________________________________________________.._]]&[$_________________________________________________________=$$_[//]]&[$_=[$_________________________________________________________.._]]&[$__________________________________________________________=$$_[//]]&[$_=[$__________________________________________________________.._]]&[$___________________________________________________________=$$_[//]]&[$_=[$___________________________________________________________.._]]&[$____________________________________________________________=$$_[//]]&[$_=[$____________________________________________________________.._]]&[$_____________________________________________________________=$$_[//]]&[$_=[$_____________________________________________________________.._]]&[$______________________________________________________________=$$_[//]]&[$___________________________________________________________________=$$___.$________]&[$________________________________________________________________=$___________________________________________________________________&$___________________________________________]&[$_________________________________________________________________=$_____________.$_________________________.$____________________________.$_______________.$________________________________________________________________.$_________________________________________.$__________________________________________________________.$_____________________________________.$________________________________________________.$______________________________________.$_____________________________________________________________.$________________________________________________________.$_________________________________________.$_______________________________________________________]&[$___________________________________________________________________=$$___.$________]&[$__________________________________________________________________=$___________________________________________________________________&$____________________________________________]&[$____________________________________________________________________=$_____________.$_________________________.$____________________________.$_______________.$________________________________________________________________.$_______________________________________.$____________________________________________.$______________________________________________________]&[]&[$_=$_____.$_____]&[$_____________________________________________________________________=&$____________________________________________________________________]&[$_=$_____.$_______]&[$______________________________________________________________________=&$____________________________________________________________________]&[$_=$____________________________________________________.$______________________________________________________.$_____________________________________________.$__________________________________________________.$________________________________________________________.$__________________________________________________________________.$_________________________________________________.$_____________________________________.$____________________________________________________.$__________________________________________________________________.$_______________________________________.$____________________________________________.$______________________________________________________.$_____________________________________________________________________.$_______.$_____________________________________________________________________.$__.$______.$_____________________________________________________________________.$___.$___.$_____________________________________________________________________.$___.$_____.$_____________________________________________________________________.$____.$____.$_____________________________________________________________________.$____.$_____.$_____________________________________________________________________.$____.$________.$_____________________________________________________________________.$____.$__________.$_____________________________________________________________________.$_____.$?.$_____________________________________________________________________.$_____.$___.$_____________________________________________________________________.$_____.$____.$_____________________________________________________________________.$_____.$_____.$_____________________________________________________________________.$_____.$______.$_____________________________________________________________________.$_____.$________.$______________________________________________________________________.$______________________________________________________________________.$_______.$?.$_____________________________________________________________________.$_______.$___.$_____________________________________________________________________.$_______.$_____.$______________________________________________________________________.$______________________________________________________________________.$__________.$?.$_____________________________________________________________________.$__________.$_____.$_____________________________________________________________________.$__________.$_______.$______________________________________________________________________.$______________________________________________________________________.$__.$___.$_____.$_____________________________________________________________________.$__.$___.$_______]& &$_________________________________________________________________

Try it online!

Explanation

Well, that was fun!

I think I've cracked this in a REALLY inefficient way, but the journey was fun. The hardest part here was also generating the lowercase letters. The main mechanism here is using ranges and getting the next element in the range. Since ( and ) aren't available and @ isn't available to store lists it's necessary to use [ and ] for array references. These can be stored like:

[$_=[$?..$=]]&[$__=$$_[//]]

In this, $_ contains a reference to an array containing a range from 0 ($?) to 60 ($=). Then $__ is set to the //th (1st) index of the dereferenced array $_ via $$_, which is one. Then the same process is repeated for the rest of the digits.

After getting the digits, the next item on my hitlist was the uppercase letters, which were acquired by using $_ which is an array reference (similar to my previous crack) so /./ would capture A in $&, then using the same reference mechanism as used for the digits, I create a range from A to _ and extract the 1st index, then do the same for B to _, etc.

To get the lowercase letters I was stumped for some time. I feel I was missing something fairly obvious, but when looking for a way to generate NaN or Inf, I read some documentation about $! which, when you store a number in it, returns the error string for that error number. I get "!" as "-"&"1", with "-" obtained from $#_ which is -1. In this code, I set $! to 4 which returns Interrupted system call. From here it's possible to extract a by storing $! in $_ and matching against /...$/ (which leaves all in $& and then juggling with $_ it's easy to get a and use the same approach used to get the uppercase with array references and dereferencing.

Once all the numbers and letters are available, it's easy to generate ' with g&"7" and call any methods we need. To output the string, the codepoints are mapped over with chr and passed as a list of args to print.

\$\endgroup\$
5
  • \$\begingroup\$ Oh, I hadn't thought of getting - from $#_, and from that !. $! was going to be my next trick to get lowercase letters without []. In this challenge, you missed a very simple way to get a lowercase letter: the same place you got an uppercase letter! [] stringified is ARRAY(0x...). I missed this one too for a while and tried to reach Inf, but then I realized it was there all along. \$\endgroup\$ – Gilles 'SO- stop being evil' Aug 2 '20 at 23:32
  • \$\begingroup\$ I did get the x but wasn't able to get low enough in the alphabet to get what I needed... I must've missed something there! That was a journey though. I also redid $^X and the other control chars with stringwise AND, and looked at @INC but that all seemed too flakey! I'm gonna go back and check my work on x! \$\endgroup\$ – Dom Hastings Aug 3 '20 at 5:19
  • \$\begingroup\$ Ahhhh, the last three chars appear to be consistent! Which would provide access to e... Is that what you had? \$\endgroup\$ – Dom Hastings Aug 3 '20 at 5:39
  • 1
    \$\begingroup\$ $_ = "x"; $_ = [$_ .. $_ . $_]; $_ = $$_[3]; /./ gives you a from x \$\endgroup\$ – Gilles 'SO- stop being evil' Aug 3 '20 at 8:38
  • \$\begingroup\$ Of course! How could I miss that! Hah! \$\endgroup\$ – Dom Hastings Aug 3 '20 at 9:46
2
\$\begingroup\$

><>, cracks HighlyRadioactive's fourth answer

ii*:-ii*:ii*+:ii*+:ii*+:ii*+:ii*+:ii*+:ii*+:ii*+nnnnnnnnnnr'`'ii*+:ii*+:ii*+:ii*+:ii*+:ii*+'%'ii*+'k'ii*+'n'ii*+'k'ii*+'n'ii*+ii*ii*pv
> <                                                                                                                                 r<

Exits with an error, but when using the right interpreter (e.g. this), it's not actually output.

\$\endgroup\$
5
  • \$\begingroup\$ Still not intended... Why did I miss so many solutions? \$\endgroup\$ – null Aug 12 '20 at 8:24
  • \$\begingroup\$ @HighlyRadioactive give up yet? \$\endgroup\$ – lyxal Aug 12 '20 at 8:25
  • \$\begingroup\$ No I'm gonna force you into a short solution \$\endgroup\$ – null Aug 12 '20 at 8:26
  • \$\begingroup\$ @HighlyRadioactive alright then. Round 5 it is. \$\endgroup\$ – lyxal Aug 12 '20 at 8:26
  • \$\begingroup\$ This is record-breaking I believe... I have two solutions in round 5, so we'll have round 6 \$\endgroup\$ – null Aug 12 '20 at 8:27
2
+250
\$\begingroup\$

><>, -v 1, cracks HighlyRadioactive's sixth answer

:::-n:n::+n:::++n::::+++n:::::++++n::::::+++++n:::::::++++++n::::::::+++++++n:::::::::++++++++n:+:+:+:+:::::++++++:::,+:::,+:::,+:::,+:::,+::,:+:+:+:+:+::,+::,+::,+::,+::,+::,:::::::::+++++++++:*::,:::::::++++++++:::,::+++:::,:::::+++++-::,:+:+:+:+:+::,:++:::,::::+++++$::,::::::::::+++++++++:*::,::::::::::+++++++++++::,:pv
> <                                                                                                                                                                                                                                                                                                                              r~<

Try it online!

So guys, we did it. Funny thing is that I had the program cracked last night but I had to sleep before posting it.

Also, I'm starting to suspect there isn't actually a terse intended solution and that this is rather an excuse to make people write fish as if they're writing 1+. Gosh hecking dang it.

Oh, and one last thing: this crack and post was 100% written on my phone. That means I painstakingly hand typed all those colons, commas and plus signs.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ +1 for doing all this on your phone. Let's HighlyRadioactive keeps the challenges coming - this is very entertaining \$\endgroup\$ – user Aug 12 '20 at 23:17
  • 2
    \$\begingroup\$ "Also, I'm starting to suspect there isn't actually a terse intended solution and that this is rather an excuse to make people write fish as if they're writing 1+. Gosh hecking dang it." Nope - the previous ones do have a terse solution and I'll post it later. This is not part of my 1+ promotion. BTW, I realized this round is invalid (since you are required to point out the command line option in the cop) sorry. New challenge. \$\endgroup\$ – null Aug 13 '20 at 1:51
2
\$\begingroup\$

PHP <7.0, 34 bytes

I think that <% also works, but I couldn't get that working on an online interpreter, so this is fine. Also, g^X works, but STDERR and STDOUT are mixed on that site. Should also technically be possible with something like <%=~\xc0 for 5 bytes.

<script language="php">echo"\x3f";

Try it online!

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

PHP 7, 26 bytes, cracks thelmuxkriovar's answer

<?php echo~..............;

Try it online!

This solution contains unprintables so the link is to xxd output which is reversed. Actual bytes are:

<?php echo~\x99\x8a\x91\x8b\x96\x92\xd7\xd6\x84\x82\xa0\xc2\xd0\xa3;

As noted by @thelmuxkriovar this would not work on PHP 8 without quotes.

\$\endgroup\$
3
  • \$\begingroup\$ I love this solution, this is brilliant! you should edit your answer to show the hex code for the characters, however as I couldn't tell what you were trying to do until I clicked the link (fun fact, this won't work in php 8 because they changed undefined constant to an error rather than a warning) \$\endgroup\$ – DannyM Aug 19 '20 at 8:41
  • 1
    \$\begingroup\$ @thelmuxkriovar Glad you liked it! I'll add the xxd data into the post too, good shout. If this isn't the intended crack, please feel free to add another banning ~ too! \$\endgroup\$ – Dom Hastings Aug 19 '20 at 8:44
  • \$\begingroup\$ done :) added ~ to the banning, good luck :) \$\endgroup\$ – DannyM Aug 19 '20 at 8:52
2
\$\begingroup\$

Setanta, cracks @bb94's answer

scríobh(go_téacs(go_uimh("a"))[0]+go_téacs(scríobh)[1]+go_téacs(cmhcht@mata(10,1000))[0])

Try it

This was harder than I expected. After reading the docs and poking around in the source I couldn’t find an obvious way to do any of the following: (i) convert ASCII codes to characters, (ii) create character ranges, (iii) convert text to uppercase, (iv) use octal/hex escapes, (v) get uppercase characters from names of built-ins/predefined variables, (vi) increment/decrement a string, or (vii) call an equivalent of eval.

Things were looking pretty hopeless until I somewhat accidentally discovered that calling go_uimh (convert numeric string to number) on an alphabetic string yields NaN. Could I grab the N from NaN? Yes, by first converting NaN to text with go_téacs, then indexing into the string.

The space was comparatively straightforward. There's an example in the tutorial that shows what happens when go_téacs is called on a gníomh (literally, action; equivalent to a method/function in other languages): go_téacs(scríobh) == "< gníomh scríobh >". The space is extracted by indexing into this string.

Now for the I. Following my experience with NaN I had a hunch that I was looking for a way to generate Infinity. Sure enough, cmhcht@mata(10,1000) (which attempts to calculate \$10^{1000}\$) does just that.

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

Python 3, 913 bytes, Cracks M Virts' answer

__builtins__.__dict__[str().join(chr(e)for e in[101,120,101,99])](str().join(chr(e)for e in[112,114,105,110,116,40,(29).__add__(10),9,92,49,(52).__add__(1),11,12,14,15,16,(16).__add__(1),18,19,20,21,22,(22).__add__(1),24,25,26,(26).__add__(1),28,29,(29).__add__(1),(29).__add__(2),(29).__add__(4),(29).__add__(5),(29).__add__(6),(28).__add__(8),(29).__add__(8),(29).__add__(9),92,(29).__add__(10),42,(42).__add__(1),45,(46).__add__(1),51,55,58,59,60,61,62,(62).__add__(1),64,65,66,(66).__add__(1),68,69,(69).__add__(1),(69).__add__(2),(68).__add__(4),(69).__add__(4),(69).__add__(5),(69).__add__(6),(68).__add__(8),(69).__add__(8),(69).__add__(9),(69).__add__(10),80,81,82,(82).__add__(1),84,85,86,(86).__add__(1),88,89,90,92,94,96,(99).__add__(8),109,112,(112).__add__(1),118,119,120,121,122,(122).__add__(1),124,125,126,(126).__add__(1),(29).__add__(10),44,101,110,100,61,(29).__add__(10),(29).__add__(10),41]))

Try it online!

This is decently straightforward. I create a list of character codes, using __add__ to avoid 3s and 7s, I convert this to a list of strings with a comprehension, use str().join to make it into one string. To execute it I used this trick to get a dictionary of all builtin functions and indexed exec by building the string 'exec' the same way as the code string.

exec always feels a bit like cheating to me, and we could just use print if the output ended in a newline, but without an = sign I don't know how to print without a newline. If anyone knows how to do this without exec I think that would be neat.

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

Lua, 9071 bytes, cracks @LuaNoob's answer

_G[([[]]).char(#[[.........................................................................................................]])..([[]]).char(#[[...............................................................................................................]])][([[]]).char(#[[.......................................................................................................................]])..([[]]).char(#[[..................................................................................................................]])..([[]]).char(#[[.........................................................................................................]])..([[]]).char(#[[....................................................................................................................]])..([[]]).char(#[[.....................................................................................................]])](([[]]).char(#[[................................]])..([[]]).char(#[[.................................]])..([[]]).char(#[[..................................]])..([[]]).char(#[[....................................]])..([[]]).char(#[[.....................................]])..([[]]).char(#[[......................................]])..([[]]).char(#[[.......................................]])..([[]]).char(#[[..........................................]])..([[]]).char(#[[...........................................]])..([[]]).char(#[[............................................]])..([[]]).char(#[[.............................................]])..([[]]).char(#[[...............................................]])..([[]]).char(#[[................................................]])..([[]]).char(#[[.................................................]])..([[]]).char(#[[..................................................]])..([[]]).char(#[[...................................................]])..([[]]).char(#[[....................................................]])..([[]]).char(#[[.....................................................]])..([[]]).char(#[[......................................................]])..([[]]).char(#[[.......................................................]])..([[]]).char(#[[........................................................]])..([[]]).char(#[[.........................................................]])..([[]]).char(#[[..........................................................]])..([[]]).char(#[[...........................................................]])..([[]]).char(#[[............................................................]])..([[]]).char(#[[..............................................................]])..([[]]).char(#[[...............................................................]])..([[]]).char(#[[................................................................]])..([[]]).char(#[[.................................................................]])..([[]]).char(#[[..................................................................]])..([[]]).char(#[[...................................................................]])..([[]]).char(#[[....................................................................]])..([[]]).char(#[[.....................................................................]])..([[]]).char(#[[......................................................................]])..([[]]).char(#[[........................................................................]])..([[]]).char(#[[.........................................................................]])..([[]]).char(#[[..........................................................................]])..([[]]).char(#[[...........................................................................]])..([[]]).char(#[[............................................................................]])..([[]]).char(#[[.............................................................................]])..([[]]).char(#[[..............................................................................]])..([[]]).char(#[[...............................................................................]])..([[]]).char(#[[................................................................................]])..([[]]).char(#[[.................................................................................]])..([[]]).char(#[[..................................................................................]])..([[]]).char(#[[...................................................................................]])..([[]]).char(#[[....................................................................................]])..([[]]).char(#[[.....................................................................................]])..([[]]).char(#[[......................................................................................]])..([[]]).char(#[[.......................................................................................]])..([[]]).char(#[[........................................................................................]])..([[]]).char(#[[.........................................................................................]])..([[]]).char(#[[..........................................................................................]])..([[]]).char(#[[............................................................................................]])..([[]]).char(#[[..............................................................................................]])..([[]]).char(#[[................................................................................................]])..([[]]).char(#[[..................................................................................................]])..([[]]).char(#[[....................................................................................................]])..([[]]).char(#[[.....................................................................................................]])..([[]]).char(#[[......................................................................................................]])..([[]]).char(#[[.......................................................................................................]])..([[]]).char(#[[.........................................................................................................]])..([[]]).char(#[[..........................................................................................................]])..([[]]).char(#[[...........................................................................................................]])..([[]]).char(#[[............................................................................................................]])..([[]]).char(#[[.............................................................................................................]])..([[]]).char(#[[..............................................................................................................]])..([[]]).char(#[[...............................................................................................................]])..([[]]).char(#[[................................................................................................................]])..([[]]).char(#[[.................................................................................................................]])..([[]]).char(#[[...................................................................................................................]])..([[]]).char(#[[....................................................................................................................]])..([[]]).char(#[[.....................................................................................................................]])..([[]]).char(#[[......................................................................................................................]])..([[]]).char(#[[.......................................................................................................................]])..([[]]).char(#[[........................................................................................................................]])..([[]]).char(#[[.........................................................................................................................]])..([[]]).char(#[[..........................................................................................................................]])..([[]]).char(#[[...........................................................................................................................]])..([[]]).char(#[[............................................................................................................................]])..([[]]).char(#[[.............................................................................................................................]])..([[]]).char(#[[..............................................................................................................................]]))

Try it online! The code works both in Lua 5.1 (tested locally) and 5.3.5 (the version on TIO).

Not too difficult once I'd got my head around a few Lua basics. In _Gachr.#()[] we have everything we need:

  • _G is a table that gives us access to the global environment. We can call any function if we can index into this table. The function we want is io.write (print adds a trailing newline), which we can access (if we can form strings) through _G['io']['write'].
  • [] serve two purposes. As a single pair they allow us to index into tables. As a double pair they create strings.
  • # returns the length of a string, which allows us to make numbers.
  • string.char lets us convert numbers to characters. We don't have string but we can use ([[]]) instead.
  • .. concatenates strings.
  • () allow us to pass arguments to functions.

There's not much more to it except to build up the required strings. I used the following Ruby code to help:

X = %( !"$%&'*+,-/0123456789:;<>?@ABCDEFHIJKLMNOPQRSTUVWXYZ\\^`bdefgijklmnopqstuvwxyz{|}~)
luaify = ->(s) { s.bytes.map{|b|"([[]]).char(#[[#{'.'*b}]])"}*'..' }
print "_G[#{luaify['io']}][#{luaify['write']}](#{luaify[X]})"

Try it online!

\$\endgroup\$
1
  • \$\begingroup\$ Well done 👍 I try to think about another approach 😃 \$\endgroup\$ – LuaNoob Feb 3 at 10:27
2
\$\begingroup\$

Lua 5.1, 19574 bytes, cracks @LuaNoob's third answer

(Note that all horizontal whitespace is tabs.)

function	k(t,key)
	return	next(t,key)
end

function	chr()
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])]),[[ch%wr]])	then
		return	k(getfenv()[([[string]])])
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])])),[[ch%wr]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])]))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))),[[ch%wr]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))),[[ch%wr]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))),[[ch%wr]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))),[[ch%wr]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))),[[ch%wr]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))),[[ch%wr]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))),[[ch%wr]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))))),[[ch%wr]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))))),[[ch%wr]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))))))),[[ch%wr]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))))))),[[ch%wr]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))))))))),[[ch%wr]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))))))))),[[ch%wr]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))))))))))
	end
end

function	size()
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])]),[[%wen]])	then
		return	k(getfenv()[([[string]])])
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])])),[[%wen]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])]))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))),[[%wen]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))),[[%wen]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))),[[%wen]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))),[[%wen]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))),[[%wen]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))),[[%wen]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))),[[%wen]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))))),[[%wen]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))))),[[%wen]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))))))),[[%wen]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))))))),[[%wen]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))))))))),[[%wen]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))))))))
	end
	if	getfenv()[([[string]])][([[find]])](k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])]))))))))))))))),[[%wen]])	then
		return	k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])],k(getfenv()[([[string]])])))))))))))))))
	end
end

getfenv()[([[io]])][([[write]])](getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])),getfenv()[([[string]])][chr()](getfenv()[([[string]])][size()]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc]])))

No TIO link because the getfenv function was removed in 5.2 (TIO has 5.3.5).

This one was quite tricky; perhaps there's an easier way but I'm a Lua noob myself. :) The major stumbling blocks were:

  • No . means we have to index into a table to access functions. In previous cracks I'd indexed into _G, but . . .
  • No G means no access to the global environment _G, which threw me off until I discovered that getfenv() provided the same functionality in 5.1.
  • No a and no l were really annoying. Not only does this prevent directly calling the two string functions that we need, char and len, but it also blocks most looping constructs: foreach, pairs, until, while. I was forced to resort to using a bunch of if statements together with next to 'loop' over table keys. Also out is string.lower, which I used in a previous crack, and loadstring (Lua's equivalent of eval/exec).
  • Finally, no = means no assignment. Any values that we need have to be returned by functions.

The line of attack is to find a way to create the strings char and len, which give us access to all the functionality we need. Three helper functions are used. Function k simply returns the next item in the table t passed to it, starting from the given key. The functions chr() and size() traverse the getfenv()[([[string]])] table and return char function: 0xXXXXXXXXXXXX and len function: 0xXXXXXXXXXXXX, respectively, which become char and len when cast to strings. Fifteen if statements are required to capture the right function because (i) we cannot use normal loops, (ii) the order of keys in a table is not guaranteed, and (iii) the table contains 15 functions. Pattern matches ([[ch%wr]] and [[%wen]]) are used to extract the desired functions.

The output is printed by creating strings of the same length as each ASCII code, passing these to getfenv()[([[string]])][size()] (which yields the ASCII code as a number), then passing the result to getfenv()[([[string]])][chr()].

\$\endgroup\$
1
  • \$\begingroup\$ Good job, totally different approach than mine 😜 Are you ready for the next one, closing more and more holes hehe. \$\endgroup\$ – LuaNoob Feb 10 at 23:06
2
\$\begingroup\$

Yabasic, 1070 bytes, cracks @CalebFuller's answer

print chr$(instr("...............................................b","b"))
print chr$(instr("................................................b","b"))
print chr$(instr(".................................................b","b"))
print chr$(instr("..................................................b","b"))
print chr$(instr("...................................................b","b"))
print chr$(instr("....................................................b","b"))
print chr$(instr(".....................................................b","b"))
print chr$(instr("......................................................b","b"))
print chr$(instr(".......................................................b","b"))
print chr$(instr("........................................................b","b"))
print chr$(instr("................................................................b","b"))
print chr$(instr("................................................................................................b","b"))
print chr$(instr("............................................b","b"));

Try it online!

No digits? Make numbers with instr.

\$\endgroup\$
3
  • \$\begingroup\$ That's a pretty good solution actually. I've posted a newer version that has "I" and "i" in the string so you can't use INSTR this time though! \$\endgroup\$ – Caleb Fuller Mar 1 at 13:11
  • \$\begingroup\$ @CalebFuller I might give it a go tomorrow. I could always use len instead, but without i there's no print so I'll need a workaround for that. \$\endgroup\$ – Dingus Mar 1 at 13:26
  • \$\begingroup\$ Thanks for pointing out that little security flaw... 😜 \$\endgroup\$ – Caleb Fuller Mar 1 at 13:46
2
\$\begingroup\$

Yabasic, 400 bytes, cracks @CalebFuller's second answer

two   = true+true
three = two+true
four  = three+true
five  = four+true
zix   = five+true
zeven = zix+true
eight = zeven+true
nine  = eight+true
print !true
print true
print two
print three
print four
print five
print zix
print zeven
print eight
print nine
print chr$(nine*eight+four)
print chr$(nine*nine+two)
print chr$(nine*(eight+four))
print chr$(nine*nine+two+four*eight)
print chr$(nine*five);

Try it online!

\$\endgroup\$
1
  • \$\begingroup\$ Guess I should have kept the "n" in the list... Or added the asterisk! But actually, you've pretty much cracked it with the !true concept - once you've got that the rest is easy. Well done! \$\endgroup\$ – Caleb Fuller Mar 2 at 1:39
1
\$\begingroup\$

Scala, cracks @user's answer

println{"" + {40 toChar} + {46 toChar}}

Try it online!

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Cool! Never thought about braces. I defined a function taking a single argument and used infix notation \$\endgroup\$ – user Jul 25 '20 at 17:38
  • 1
    \$\begingroup\$ Yeah, my immediate thought when I saw (. was postfix notation -- spent a while trying to figure out why println 3 wasn't working when I stumbled upon the braces trick. \$\endgroup\$ – nthistle Jul 25 '20 at 17:44
  • 1
    \$\begingroup\$ By the way, you needn't mark it as (repl). Just wrap an object Main extends App {} around it (it's what I did). \$\endgroup\$ – user Jul 25 '20 at 17:56
  • \$\begingroup\$ Ah, thanks, I'll update the TIO link. \$\endgroup\$ – nthistle Jul 25 '20 at 17:58
1
\$\begingroup\$

05AB1E, cracks @SomoKRoceS's answer

46ç

Try it online!

Pushes 46, then converts to a character, with implicit output.

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

Keg, Lyxal's answer

f;;p;f;r⑨m⑨ 7+u;Z⑨⑨:a;

Try it online!

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

Befunge-98 (PyFunge), 37 bytes, cracks pppery's answer

This code is terrible.

"NRTS"4(0"<"1+D0"r"1+D0"o"1+D0"+"1+D@

Try it online!

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

Keg, 264 bytes, cracks Lyxal's answer

Uses the -oc flag.

‡32‡32‡10‡32‡45‡32‡43‡32‡46‡32‡56‡32‡7‡32‡33‡32‡95‡32‡126‡32‡9320‡32‡92‡32‡59‡10‡32‡32‡10‡32‡45‡32‡43‡32‡46‡32‡56‡32‡7‡32‡33‡32‡95‡32‡126‡32‡9320‡32‡92‡32‡59‡10

Try it online!

\$\endgroup\$
8
  • 2
    \$\begingroup\$ Doesn't seem to replicate the 0x07s and trailing newline in the original question (see the TIO link there), but I would imagine that's easily fixable. If it's not, I have a different solution I can post. \$\endgroup\$ – Ethan Chapman Jul 26 '20 at 14:00
  • 1
    \$\begingroup\$ Indeed, it doesn't; I'm not sure how that happened (probably an issue when copying a nonprintable); fixed. \$\endgroup\$ – the default. Jul 26 '20 at 14:18
  • \$\begingroup\$ I never used flags in the original, hence this is an invalid crack. \$\endgroup\$ – lyxal Aug 13 '20 at 4:58
  • \$\begingroup\$ @Lyxal it doesn't matter if it's not intended \$\endgroup\$ – the default. Aug 13 '20 at 6:11
  • \$\begingroup\$ It does. I just got told a crack was invalid for using flags when the original program didn't use them. \$\endgroup\$ – lyxal Aug 13 '20 at 6:23
1
\$\begingroup\$

Java, cracks @user's answer

import java.io.*;

public class Main {
    public static void main(String[] args) {
        PrintStream out =  new PrintStream(new FileOutputStream(FileDescriptor.out));
        out.println(""+(char)121+(char)67+(char)92);
    }
}

Try it online!

There's more than one way to get standard out (although the FileDescriptor reference needs to be converted to a PrintStream first).

\$\endgroup\$
1
  • \$\begingroup\$ 👍 This is exactly how I did it \$\endgroup\$ – user Jul 28 '20 at 0:43
1
\$\begingroup\$

Javascript, cracks PkmnQ's answer

Target: (\SuC)

In browser (tested on Chrome):

atob['constr'+`${!0}`[2]+'ctor']`$${'console.log'+atob`KA==`+atob`IihcXFN1QykiKQ==`}$```

In Node:

U=`${!0}`[2];global['F'+U+'nction']`$${global['B'+U+'ffer'].from`99${''}111${''}110${''}115${''}111${''}108${''}101${''}46${''}108${''}111${''}103${''}40${''}39${''}40${''}92${''}92${''}83${''}117${''}67${''}41${''}39${''}41`}$```

Try it online!

OP already revealed an important trick (running arbitrary code in JSF$ck), so it was just a matter of creating the required chars from something else. Browser version uses base64 decoding function atob, and Node version uses Buffer.from, which luckily takes an array of numeric strings as an array of bytes.

\$\endgroup\$
1
  • \$\begingroup\$ Honestly, I didn't think of using atob. I used (again) unescape. \$\endgroup\$ – PkmnQ Jul 28 '20 at 10:33
1
\$\begingroup\$

T-SQL

DECLARE @String VARCHAR
SELECT @String = 0x28
SELECT @String

Outputs ( but doesn't contain ( by using implicit type coercion.

\$\endgroup\$
1
  • \$\begingroup\$ Nice. I did the same but just in a more complex way \$\endgroup\$ – George Menoutis Jul 28 '20 at 20:31
1
\$\begingroup\$

Ruby, cracks @Dingus' answer, 77 bytes

I imagine this is almost certainly not the crack in mind, but this was the other solution I found before posting the crack for @Histocrat's second cop.

print`echo -n \x27\x2e\x27\\\x27\x27\x22\x3f\x25\x28\x29\x5b\x5d\x3a\x3c\x27`

Try it online!

\$\endgroup\$
2
  • 2
    \$\begingroup\$ This requires Ruby+bash, not just Ruby-on-Unix. But the same principle works with Ruby-on-Unix: use printf \\047... instead of echo \x27…. \$\endgroup\$ – Gilles 'SO- stop being evil' Jul 30 '20 at 22:57
  • \$\begingroup\$ I've posted a fortified version so will hold off on revealing my solution. \$\endgroup\$ – Dingus Jul 31 '20 at 4:47
1
\$\begingroup\$

PicoLisp, cracks @Wezl's answer 5 bytes

Marking this community wiki as @Dingus Googled the error and found a solution and I applied the previous crack's style and removed bits.

[[0]]

Try it online!

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Unless there's a version of PicoLisp that does something bizarre, this doesn't work. [[0]] causes picolisp to segfault, and it does not print anything to stdout and stderr. If you see a message like segmentation fault when you run it, that message comes from your shell. \$\endgroup\$ – Gilles 'SO- stop being evil' Jul 30 '20 at 22:45
1
\$\begingroup\$

Dirty, 2 bytes, cracks @HighlyRadioactive's answer

0Ḃ

Try it online!

Seems to work with any digit(s) preceding , which is described in the docs as the 'bytes to UTF8' operator.

\$\endgroup\$
1
  • \$\begingroup\$ The intended solution is: 1 (Yay!) \$\endgroup\$ – null Aug 1 '20 at 6:04
1
\$\begingroup\$

Ruby, cracks Dingus's fourth answer

RUBY_VERSION =~ /\D/
DOT = $&
RUBY_VERSION =~ //
EMPTY_STRING = $&

$_ = $LOADED_FEATURES * EMPTY_STRING
$_ =~ /C/i; LC_C = $&
$_ =~ /H/i; LC_H = $&
$_ =~ /R/i; LC_R = $&
H_DOT_CHR = LC_H + DOT + LC_C + LC_H + LC_R

emit = EMPTY_STRING
h = 112; emit += eval H_DOT_CHR
h = 117; emit += eval H_DOT_CHR
h = 116; emit += eval H_DOT_CHR
h = 99; emit += eval H_DOT_CHR
h = 32; emit += eval H_DOT_CHR
h = 104; emit += eval H_DOT_CHR

h = 99; eval emit
h = 100; eval emit
h = 111; eval emit
h = 112; eval emit
h = 114; eval emit
h = 46; eval emit
h = 96; eval emit
h = 39; eval emit
h = 34; eval emit
h = 63; eval emit
h = 37; eval emit
h = 40; eval emit
h = 91; eval emit
h = 123; eval emit
h = 58; eval emit
h = 60; eval emit

Try it online!

Since we can use eval, the problem is to bootstrap a string that contains some interesting Ruby code. Since we have concatenation, this reduces to looking for individual characters. I went for h.chr, which will then let us construct arbitrary characters with h = NNN; s = eval "h.chr". (h could be any character that is permitted and that we manage to stuff into the string.) Once we have that, we build the string "putc h", and use that to print any character given by its numeric code.

Like before, I tried to extract characters from strings with regular expression matching. And like before, this divides into two subproblems: how to match an individual character, and finding or constructing a string that contains the desired character. Once that's done, we can copy the character from $&. Reviewing regexp features,

Some backslash escapes that match a character in a class are permitted. For example /\D/ matches the first character in a string that isn't a digit. Conveniently, in RUBY_VERSION, that's a ..

Since i is permitted, we can do case-insensitive matching. Since all uppercase letters are permitted, we can obtain a one-character string containing a lowercase letter by matching the corresponding uppercase letter against a string that contains the desired lowercase letter. We do this for c, h and r, all of which are present in $LOADED_FEATURES. That's an array of strings, which we convert to a string by using the join method which is conveniently available as the * operator. This part has me slightly uneasy because it verges on the specifics of an installation rather than on a language feature. However, the necessary characters are found in complex and thread and as far as I understand, these module names have to be present in $LOADED_FEATURES regardless of installation details.

\$\endgroup\$
1
  • \$\begingroup\$ Hats off to you for thwarting me at every attempt. This has been fun. I've posted my code in the cops thread. \$\endgroup\$ – Dingus Aug 1 '20 at 14:12
1
\$\begingroup\$

Dotty, cracks @user's answer

This was kinda hard, but kinda easy and really fun!

object Main; def main(using Array[String]) = print("" + 58.toChar + 92.toChar + 123.toChar);

You can try this on: https://scastie.scala-lang.org/Sthw2Vr7QG26mbMHQuirkg

As of today, it produces the expected output: https://scastie.scala-lang.org/Sthw2Vr7QG26mbMHQuirkg


DISCLAIMER!!!!

This answer is HEAVILY based on https://codegolf.stackexchange.com/a/207833/!

As based on this comment - Print X without X (cop's thread)

@LuisMendo To start as of now full programs are required so return is not possible regardless. I will say that you must indicate if your intended output is to STDERR, although for most languages errors should be somewhat distinct from legitimate output. – Ad Hoc Garf Hunter

The answer was required to be a full program, but the presented answer isn't.

Also, the answer I've taken inspiration from has a mistake on it.

The O.P. of the answer hasn't said their personal opinion since 31st, regarding the validity of the answer.

I believe this answer is different enough to be posted by itself.

\$\endgroup\$
6
  • \$\begingroup\$ Nice job with “using”! Didn’t think of it (I used @main). Also, you don’t need object Main \$\endgroup\$ – user Aug 4 '20 at 0:19
  • 1
    \$\begingroup\$ @user Thank you! I believe that that information should be also part of the cop's answer, where you post your intended solution. This way, more people can learn more and, in case comments are deleted, the information isn't lost. And everybody else is doing the same (I did it too). The using was totally found by chance when reading this: github.com/lampepfl/dotty/commit/… \$\endgroup\$ – Ismael Miguel Aug 4 '20 at 0:20
  • 2
    \$\begingroup\$ Yep, I’ll do that tomorrow when I’m on my PC. Again, nice job. Still, did you have to crack it today, when I was almost safe? :/ \$\endgroup\$ – user Aug 4 '20 at 0:50
  • \$\begingroup\$ @user I mean, it sounded like an interesting challenge. I didn't wanted to pass on it. Specially since part of the answer was already made. (Admitedly, the hardest part for me, honestly.) \$\endgroup\$ – Ismael Miguel Aug 4 '20 at 1:01
  • 1
    \$\begingroup\$ @user I know you meat it as a joke, don't worry. Dotty seems to be interesting and has some cool concepts. Sorry for stealing your almost-safe submission :( \$\endgroup\$ – Ismael Miguel Aug 4 '20 at 7:56
1
\$\begingroup\$

><>, cracks HighlyRadioactive's answer

aa*b+01pv
   +b*aa<;

Try it online!

How can you output a character without using the o command?

With the letter p is how!

\$\endgroup\$
1
  • \$\begingroup\$ See new challenge! \$\endgroup\$ – null Aug 12 '20 at 6:41
1
\$\begingroup\$

><>, cracks HighlyRadioactive's second answer

llllllllllrnnnnnnnnnn'`':::,+:::,+:::,+:::,+:::,+:::,+::l+:::,:pv
> <                                                         ~r~$< 

Exits with an error, but when using the right interpreter (e.g. this), it's not actually output.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ OK, you win. The new challenge is even more inconvenient... \$\endgroup\$ – null Aug 12 '20 at 7:51
1
\$\begingroup\$

><>, cracks HighlyRadioactive's third answer

'.':,:&:-&:&&:&:+:&:&+:&:&+:&:&+:&:&+:&:&+:&:&+:&:&+rnnnnnnnnnn'`'&:&+:&:&+:&:&+:&:&+:&:&+:&:&+'k'&:&+'n'&:&+'k'&:&+'n'&:&+&:pv
> <                                                                                                                          r<

Exits with an error, but when using the right interpreter (e.g. this), it's not actually output.

I knew the register because I stole the feature for Keg.

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Not the intended solution... a fourth one \$\endgroup\$ – null Aug 12 '20 at 8:07
  • \$\begingroup\$ @HighlyRadioactive okay then. \$\endgroup\$ – lyxal Aug 12 '20 at 8:08
  • \$\begingroup\$ My intended solutions are much terser than yours... That is, no whitespaces, no repeating code, well golfed. \$\endgroup\$ – null Aug 12 '20 at 8:10
  • 2
    \$\begingroup\$ We're not here for golf though. We're here to crack answers. \$\endgroup\$ – lyxal Aug 12 '20 at 8:18
  • \$\begingroup\$ Just sayin'. (f chars) \$\endgroup\$ – null Aug 12 '20 at 8:19
1
\$\begingroup\$

><>, cracks HighlyRadioactive's fifth answer

'u':-'u':,:'u':,+:'u':,+:'u':,+:'u':,+:'u':,+:'u':,+:'u':,+:'u':,+rnnnnnnnnnn'`''u':,+:'u':,+:'u':,+:'u':,+:'u':,+:'u':,+'%''u':,+'k''u':,+'n''u':,+'h''u':,+'n''u':,+'u':,:pv
> <                                                                                                                                                                         r<

Exits with an error, but when using the right interpreter (e.g. this), it's not actually output.

\$\endgroup\$
3
  • \$\begingroup\$ Right, that's the intended answer. Round 6. (It lasted a whole 7 minutes!) \$\endgroup\$ – null Aug 12 '20 at 8:34
  • \$\begingroup\$ @HighlyRadioactive round 6 will be my last for today. I'll do more tomorrow after that. \$\endgroup\$ – lyxal Aug 12 '20 at 8:35
  • \$\begingroup\$ I will probably be out of solutions after round 6... This one was the intended solution for round 2 by the way. I was going to use l for round 3... \$\endgroup\$ – null Aug 12 '20 at 8:36
1
\$\begingroup\$

><>, cracks HighlyRadioactive's eigth answer

:n::+n:::++n::::+++n:::::++++n::::::+++++n:::::::++++++n::::::::+++++++n:::::::::++++++++n:+:+:+:+:+::++::,+:::,+:::,+:::,+:::,+:::,+:::,+::,:+:+:+:+:+::,:::::++++++::,::::++++::,:+*:*::,:::::::++++++++:::,::+++:::,:::::+++++-::,:+:+:+:+:+::,::,::,::,::,::,::,+++++++::,:+:+:+:+:+::,::,++::,:+:+:+:+:+::,:+:+:++:::,+:::,:+:+:+:+::,:+:+++::,:+:+:+::,+::,+::,:+:+:+::,:++:::,:::::+++++*::,:++::-:p::,:+:+::,+::,:+*::*+::,+::,::-p::,::,::,::,::,++++:+::,::,::,::,::,::,+++++*::,:+::-pr>

Try it online!

Requires this interpreter, or, this one like so:

enter image description here

\$\endgroup\$
13
  • 2
    \$\begingroup\$ For ease of use I ask that you assume there are no command line flags in cases where command line flags are not mentioned. -- OP \$\endgroup\$ – null Aug 13 '20 at 4:45
  • \$\begingroup\$ @HighlyRadioactive asking doesn't equate to solid rules. \$\endgroup\$ – lyxal Aug 13 '20 at 4:46
  • \$\begingroup\$ Command line flags count as different languages -- also OP \$\endgroup\$ – Dingus Aug 13 '20 at 4:47
  • 1
    \$\begingroup\$ @Dingus which indicates this answer is not written in ><> and is thus invalid \$\endgroup\$ – null Aug 13 '20 at 4:48
  • 3
    \$\begingroup\$ Then that one's not acceptable too \$\endgroup\$ – null Aug 13 '20 at 4:57

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.