Will it halt? (Cops)

94

12

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

Your challenge is to make a program that runs forever without halting1, unless it gets a particular input or inputs2. If it receives that input, it must terminate in a finite amount of time3. This is , so the shortest answer that has not been cracked by a robber within one week of posting wins. After the week has passed, please mark your answer as safe and show the halting input (in a > ! spoiler quote). If a robber cracks your submission, please mark it as cracked and show the halting input (in a > ! spoiler quote).

Submissions are preferred be runnable & crackable on TIO. Submissions not runnable or crackable on TIO are allowed, but please include instructions to download / run them.

Please make your input deterministic, and uniform across all runs. See this meta post for details.

Please, don't "implement RSA" or anything mean to the robbers. Use obscure languages and features, not boring encryption and hashing. I can't enforce this with rules, but you can expect torrential downvotes if all you do is sha(input) === "abcd1234".


1Assuming that the computer doesn't get shut down, break, get engulfed by the sun, overheat in the universe's heat death, or hit the TIO timeout of 60s.

2The program must halt on at least one input. As long as it loops forever on one input and halts on another, it works.

3This must be < 60 seconds, so that the code can be tested on TIO.


Looking for uncracked submissions?

fetch("https://api.stackexchange.com/2.2/questions/135363/answers?order=desc&sort=activity&site=codegolf&filter=!.Fjs-H6J36vlFcdkRGfButLhYEngU&key=kAc8QIHB*IqJDUFcjEF1KA((&pagesize=100").then(x=>x.json()).then(data=>{var res = data.items.filter(i=>!i.body_markdown.toLowerCase().includes("cracked")).map(x=>{const matched = /^ ?##? ?(?:(?:(?:\[|<a href ?= ?".*?">)([^\]]+)(?:\]|<\/a>)(?:[\(\[][a-z0-9/:\.]+[\]\)])?)|([^, ]+)).*[^\d](\d+) ?\[?(?:(?:byte|block|codel)s?)(?:\](?:\(.+\))?)? ?(?:\(?(?!no[nt][ -]competing)\)?)?/gim.exec(x.body_markdown);if(!matched){return;}return {link: x.link, lang: matched[1] || matched[2], owner: x.owner}}).filter(Boolean).forEach(ans=>{var tr = document.createElement("tr");var add = (lang, link)=>{var td = document.createElement("td");var a = document.createElement("a");a.innerHTML = lang;a.href = link;td.appendChild(a);tr.appendChild(td);};add(ans.lang, ans.link);add(ans.owner.display_name, ans.owner.link);document.querySelector("tbody").appendChild(tr);});});
<html><body><h1>Uncracked Submissions</h1><table><thead><tr><th>Language</th><th>Author</th></tr></thead><tbody></tbody></table></body></html>

programmer5000

Posted 2017-07-24T15:46:45.840

Reputation: 7 828

What counts as "forever"? For example, if the program builds a growing array, can we assume infinite memory? – Luis Mendo – 2017-07-24T16:08:58.160

1@LuisMendo assuming infinite memory is fine – programmer5000 – 2017-07-24T16:29:42.887

1@programmer5000 Thanks for clarifying. You should incorporate all this into the challenge text. Answerers are not expected to read all comments – Luis Mendo – 2017-07-24T16:48:43.933

6Can we restrict the input to, say, an integer? A robber could pass in some malformed or mistyped input to terminate the program immediately. I'd either have to do lots of careful input validation, or use a language that can catch arbitrary errors. – xnor – 2017-07-24T18:37:04.573

3@xnor I think you're supposed to have to do the input checking. – Stephen – 2017-07-24T18:49:37.840

1@StepHen That works if the malformed input is still able to be parsed by the interpreter. If I enter an illegal string, R errors immediately, without even entering the function to crack. I would argue that that doesn't count as actually terminating the function. – JAD – 2017-07-26T05:02:34.053

ArnoldC is also out essentially automatically, as any input other than an integer is unsupported by the language and will throw a java.util.InputMismatchException – TemporalWolf – 2017-07-26T20:19:14.390

Answers

55

Malbolge, 128 bytes, cracked by KBRON111

(=&r:#o=~l4jz7g5vttbrpp^nllZjhhVfddRb`O;:('JYX#VV~jS{Ql>jMKK9IGcFaD_X]\[ZYXWVsN6L4J\[kYEhVBeScba%_M]]~IYG3Eyx5432+rpp-n+l)j'h%B0

Have fun!

(Yes, I learned Malbolge just for this. Yes, it took an absurdly long time to finally get working. And yes, it was totally worth it.)

Wrapped, so you can see it in its full, er, "glory":

(=&r:#o=~l4jz7g5vttbrpp^nllZjhhV
fddRb`O;:('JYX#VV~jS{Ql>jMKK9IGc
FaD_X]\[ZYXWVsN6L4J\[kYEhVBeScba
%_M]]~IYG3Eyx5432+rpp-n+l)j'h%B0

I used this interpreter to test it; I'm not sure if it matters, but I figured I'd specify just in case.

Doorknob

Posted 2017-07-24T15:46:45.840

Reputation: 68 138

2That's the interpreter TIO uses btw. – Dennis – 2017-07-25T04:59:12.447

2oh, "Have fun" is good addition – Евгений Новиков – 2017-07-25T05:37:06.653

26You're a jerk. Malbolge is mean. – Draco18s no longer trusts SE – 2017-07-25T13:21:14.097

1I'm stamped... The farthest I got: out of 13 inputs before halt, only first and third have any impact. After thorough reverse-engineering, I found that first input has to be 6 and the third is one of the four: !, #, / and -. But the combination doesn't seem to fix the halt. I put it out here, maybe someone smarter finds a solution. If anyone wants, I will post tomorrow how I got to these inputs. EDIT: Now that I think about it, my program I wrote for purpose of reverse-engineering this might have a bug, and the first input may be something else than 6. Third character still stands. – Grzegorz Puławski – 2017-07-26T22:56:04.783

7Cracked by KBRON111. – Veedrac – 2017-07-27T02:32:40.247

23

JavaScript (ES6), 17 bytes, Cracked

x=>{for(;x==x;);}

On TIO, since I dunno how to do Node.js readline on TIO, just stick the input in the function call. This is obvious to anyone who knows it, and not to anyone who doesn't.

Try it online!

Answer:

The answer is NaN, since in JavaScript, NaN != NaN.

Stephen

Posted 2017-07-24T15:46:45.840

Reputation: 12 293

2Cracked. Nice usage of a language oddity! – programmer5000 – 2017-07-24T16:14:57.317

3You bet :) I like how you were so confident that's what I picked that you edited it in for me :P – Stephen – 2017-07-24T16:15:23.853

13NaN == NaN is false in many languages other than JavaScript. I wouldn't call it a "language oddity". – Nayuki – 2017-07-25T03:29:25.963

In fact, this very problem of making while(x!=x) an infinite loop is Java Puzzlers #29 "Bride of the Looper"

– Nayuki – 2017-07-25T03:31:13.417

10i believe NaN != NaN is a feature of floating point numbers – undergroundmonorail – 2017-07-25T20:39:21.870

1

@undergroundmonorail: That's correct. The relation between two IEEE floating point numbers can be above, equal, below, or unordered. The comparison result is unordered if either or both operands are any kind of NaN. (IEEE 754 binary floating point has many NaN bit patterns: anything with the exponent all-ones and a non-zero mantissa is a NaN, regardless of the sign bit. There are some rules for which what goes into the "payload" of a NaN, and for propagating that through operations like + or max(), but most people don't care :P)

– Peter Cordes – 2017-07-27T09:19:00.690

Fun fact: -0.0 == +0.0 according to IEEE754 rules. This is the only case where two values with different bit-patterns compare equal to each other. All other cases are either unordered or above/below. See also this excellent series of articles on floating point, by Bruce Dawson: https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/

– Peter Cordes – 2017-07-27T09:22:48.087

14

JS (ES6), 67 bytes (Cracked)

(x,y)=>{while(x!==y||Object.is(x, y)||!isFinite(x)||!isFinite(y));}

I think i didn't mess up, it might have an easy solution that I didn't see.

I appreciate any feedback, this is one of my first posts

(+0, -0) Yep, js has a negative 0

Juan Tonina - Reinstate Monica

Posted 2017-07-24T15:46:45.840

Reputation: 459

3Cracked – Stephen – 2017-07-24T16:56:06.160

I realize now that I don't need to check if x and y are finite, but I won't edit since it was already cracked. Could have been 38 bytes – Juan Tonina - Reinstate Monica – 2017-07-24T17:22:30.220

10

Python 3.4, (40 bytes) Cracked

def f(x):
  while(x==x or not x==x):pass

Siphor

Posted 2017-07-24T15:46:45.840

Reputation: 241

4Welcome to PPCG! – Martin Ender – 2017-07-24T20:56:53.163

Cracked – Gavin S. Yancey – 2017-07-24T21:31:32.420

12I feel like you should have stored x==x in a variable called to_be, so you could make a Hamlet reference. – Peter Cordes – 2017-07-27T09:26:02.837

@PeterCordes But that would have made the answer uncrackable – pppery – 2017-07-30T03:03:59.077

@ppperry: yeah, I noticed that after I looked at the crack. :P – Peter Cordes – 2017-07-30T03:06:03.680

wait a moment -- it still would be crackable -- but in a different way – pppery – 2017-07-30T03:10:36.813

9

Javascript (NOT node.js)

x=>{while(x+"h");}

The desired submission doesn't use throw.

Hint for desired crack:

The desired submission doesn't overwrite .toString(), or use Set() either.

Desired crack:

Object.create(null)

programmer5000

Posted 2017-07-24T15:46:45.840

Reputation: 7 828

Correct crack link (not mine, just a link to Dom Hasting's answer) – Stephen – 2017-07-24T19:56:12.230

Cracked#2 Cracked without using throw (still gives an error though) – Grant Davis – 2017-07-24T20:27:37.423

Cracked again without using throw, I believe for real this time as Grant Davis' didn't work for me. Still TypeErrors. – Haumed Rahmani – 2017-07-25T01:19:07.537

@HaumedRahmani My code works for me: Try it online!

– Grant Davis – 2017-07-25T01:42:43.063

Seems you're creating the function but not assigning or calling it. If you replace your solution with anything else in that example it'll end just as quickly. – Haumed Rahmani – 2017-07-25T01:49:39.840

2You could do x=>{try{for(;x+"h";)}catch(e){for(;;)}} so that any errors will result in an endless loop so missing prototype function errors (or any errors) will result in an endless loop. – Grant Davis – 2017-07-25T03:22:29.993

Cracked without using any toString trickery :) – Birjolaxew – 2017-07-25T11:23:10.123

I don't think the + specification lets us turn x+"h" falsy (unless "h" became new String("h")), and I don't think it's possible to overwrite while since it's a keyword - I'm really looking forward to the solution to this.

– Birjolaxew – 2017-07-25T13:33:30.547

@Birjolaxew oops, the desired ans does error, but it hasn't been shown before – programmer5000 – 2017-07-25T14:14:35.420

Added a toPrimitive solution that doesn't use throw - it's almost identical to a toString override tho. I can't really see a solution that's notably different from the existing ones - I'm looking forward to seeing the intended solution. – Birjolaxew – 2017-07-25T23:02:44.540

Is this the desired solution?

– ecatmur – 2017-07-26T11:01:02.343

1This one only works in the browser, not sure why it does though :D – jadkik94 – 2017-07-26T14:00:01.903

In fact you can use any symbol, but apparently it is not the intended solution.. – Bellian – 2017-07-26T15:08:18.063

Added cross origin solution (heavily inspired by @jadkik94, but works everywhere and is more explicit about what it does) :) – Birjolaxew – 2017-07-26T22:40:23.273

@ecatmur no, but nice job! – programmer5000 – 2017-07-29T11:17:07.853

@jadkik94 not desired. – programmer5000 – 2017-07-29T11:17:30.017

@programmer5000 Symbol() – Patrick Roberts – 2017-08-05T22:10:38.070

8

C (gcc), 75 bytes Cracked

#include<stdio.h>
int main(){char c[9];while(1){scanf("%8s",c);printf(c);}}

Try it online!

I've never posted in a cops-n-robbers before. Hopefully this isn't too obvious.

Solution:

An input of "%s" makes this segfault. There are several other ones that can be used; all of them are printf specifiers like "%n"
This is the classic printf vulnerability. Simply put, the format string comes straight from user input, so any printf specifiers get passed through, unsafely.

Justin

Posted 2017-07-24T15:46:45.840

Reputation: 19 757

1Cracked. – Conor O'Brien – 2017-07-24T23:06:40.683

8

JavaScript (in Browser), 79 bytes Cracked

x=>{try{for(;x||x!=null||x!=void 0||x===null||x===void 0;);}catch(e){for(;;);}}

You should run it in a recent browser (like latest Firefox ESR, latest Firefox, latest Chromium). Running on old browsers (like Netscape 2, IE 4) do not count.

Note: Halted by browser due to time out do not count a halt here.

Always be careful not crash your browser when testing this codes, and happy robbing ^_^

document.all

tsh

Posted 2017-07-24T15:46:45.840

Reputation: 13 072

Can i use setTimeout? – Евгений Новиков – 2017-07-25T07:09:44.667

@ЕвгенийНовиков You may call this function with any parameter. But it seems use setTimeout as parameter do not works. – tsh – 2017-07-25T07:15:32.687

idea is to do var key=(()=>{setTimeout(args);return null})() and then crackme(key) – Евгений Новиков – 2017-07-25T09:55:51.263

seems like cheating – Евгений Новиков – 2017-07-25T09:56:24.663

can i redefine Function.prototype? – Евгений Новиков – 2017-07-25T09:57:04.587

@ЕвгенийНовиков Not sure what you want to do... Just be sure that the given function is called, any codes should be fine. – tsh – 2017-07-25T10:04:51.537

1Cracked – Juan Tonina - Reinstate Monica – 2017-07-25T16:33:27.897

6

Husk, 5 bytes Cracked

↑ε∞←ø

Try it online!

A bit of explanation, since this language is still pretty new:

←ø gets the first element of an empty list: this returns a value which can assume any type, be it a concrete type or a function, which will then be applied to the input. creates an infinite list composed by copies of the previous result (which in most cases will mean a list of infinite zeroes). ↑ε takes elements from this list as long as they are "small" i.e. their absolute value is ≤1; on an infinite list of zeroes this will never stop.

Leo

Posted 2017-07-24T15:46:45.840

Reputation: 8 482

@Veedrac that was actually my intended solution – Leo – 2017-07-26T08:02:37.603

Well, then, cracked!

– Veedrac – 2017-07-26T11:27:08.330

6

PHP (cracked by Vicente Gallur Valero), 65 bytes

<?php
parse_str($argv[1],$_);
while(!$_['(-0_0)> deal with it']);

Try it online!

Harder than it may look. Edited to be possible on TIO, at the cost of a bunch of bytes. Takes input via $argv[1].

Sisyphus

Posted 2017-07-24T15:46:45.840

Reputation: 1 521

1Cracked – Vicente Gallur Valero – 2017-07-25T08:10:22.857

5

Braingolf, 4 bytes (Cracked)

[1+]

Try it online!

Suuuper easy, but let's see how long it takes

Answer:

-1, or any number less than 0.

Skidsdev

Posted 2017-07-24T15:46:45.840

Reputation: 9 656

Cracked. – programmer5000 – 2017-07-24T15:59:14.190

5

Ruby, 31 bytes (cracked by Eric Duminil)

0until(3.send(gets)==5rescue p)

Try it online!

Note that this needs to be run in an environment where there's no trailing newline in the result of gets, or else it's impossible to make it halt (I think) since anything ending in a newline will error and hit the rescue.

histocrat

Posted 2017-07-24T15:46:45.840

Reputation: 20 600

Cracked! – Eric Duminil – 2017-07-24T22:14:16.457

Nice one by the way! No method in 3.methods returns 5 or exits the loop. – Eric Duminil – 2017-07-24T22:29:23.360

Darn! I discovered the solution as well independently, but I was too focused on making it equal 5 to think that the correct answer would involve the function that it did... – Value Ink – 2017-07-25T03:32:59.630

5

Bash, 25 bytes (Cracked)

export "$1"=help
/bin/yes

Inspired by Dennis'. Try it online.

Veedrac

Posted 2017-07-24T15:46:45.840

Reputation: 711

Cracked! – Sisyphus – 2017-07-25T11:57:50.737

5

Bash 4.2, 14 bytes (cracked)

Let's try this again.

let ${1,,}
yes

This doesn't work on TIO, which uses Bash 4.3. Input is via command-line arguments.

On Linux and with gcc installed, Bash 4.2.53 can be downloaded and built as follows.

curl -sSL https://ftp.gnu.org/gnu/bash/bash-4.2.53.tar.gz | tar xz
cd bash-4.2.53
./configure
make -j

Dennis

Posted 2017-07-24T15:46:45.840

Reputation: 196 637

Cracked. Basically ended up reading the source. – Veedrac – 2017-07-26T02:39:46.273

4

Retina, 78 bytes (Cracked) (Cracked with Intended Solution)

^
1
+`^1(1+)
$1¶$&
s`(?<=^|¶)(1+)(?=¶)(?!.*¶\1+$)

¶(?!1+$)

^(1+)¶\1$

+`1
11

Was pretty fun to write, hope it's fun to crack

Try it online!

Cracked with an unintended solution and the intended solution within a minute of each other. One posted first, one commented first.

Intended solution:

11111 or the unary representation of n-1 where n is any perfect number

PunPun1000

Posted 2017-07-24T15:46:45.840

Reputation: 973

Cracked – mbomb007 – 2017-07-24T16:32:31.817

Cracked – user41805 – 2017-07-24T16:32:43.977

So whose crack counts? (I posted the crack first, but mbomb007 commented first) – user41805 – 2017-07-24T16:33:31.177

@Cowsquack both – programmer5000 – 2017-07-24T16:35:01.497

4

Node.js, 23 bytes (Cracked)

var crackme =
i=>{while({[i]:NaN}){}}

Grant Davis solution

{__proto__:null}

My solution

{"toString":process.exit}

Евгений Новиков

Posted 2017-07-24T15:46:45.840

Reputation: 987

2cracked! – Grant Davis – 2017-07-25T02:08:28.813

@GrantDavis good job) Your solution works i browser too. I thought to surround it with try-catch, but refused this idea, to make a pretty code. – Евгений Новиков – 2017-07-25T05:32:14.363

4

Bash 4.2, 10 bytes (Cracked)

let $1
yes

This doesn't work on TIO, which uses Bash 4.3. Input is via command-line arguments.

On Linux and with gcc installed, Bash 4.2.53 can be downloaded and built as follows.

curl -sSL https://ftp.gnu.org/gnu/bash/bash-4.2.53.tar.gz | tar xz
cd bash-4.2.53
./configure
make -j

Dennis

Posted 2017-07-24T15:46:45.840

Reputation: 196 637

1Cracked. You led me 'round in circles thinking this was shellshock related and linking me to a patched version :P. Count the unintended crack as petty revenge ;). – Veedrac – 2017-07-25T10:36:49.507

Heh, not quite what I was going for. I posted a hardened version if you want to give it a try. – Dennis – 2017-07-25T13:20:04.233

4

Java 8, 99 bytes, Cracked

s->{try{Integer i=Integer.parseInt(s),c=i+32767;i+=32767;for(;i!=c;);}catch(Throwable t){for(;;);}}

This is a lambda of the type Consumer<String>.

Ungolfed:

s -> {
    try {
        Integer i = Integer.parseInt(s), c = i + Short.MAX_VALUE;
        i += Short.MAX_VALUE;
        while (i != c) ;
    } catch (Throwable t) {
        while (true) ;
    }
}

Try it online! (note that the test program will crash on empty input, but the lambda itself would not!) (also, use 'arguments' not 'input' on TIO, as the test program uses arguments, not STDIN)

Intended Answer:

-32767; This works because Java keeps has two integer types, int and Integer. Integer is an object that wraps int. Also, Java keeps an cache of Integers that box -127 through 127. The != operator checks for identity, so through some un-boxing and auto-boxing any number x where x + 32767 is in [-127, 127] will end up being the same Integer object from the cache, and thus i != c will be false.

Socratic Phoenix

Posted 2017-07-24T15:46:45.840

Reputation: 1 629

2Cracked. – Veedrac – 2017-07-25T14:16:11.033

3

Java: 1760 (Cracked)

I feel it's too mean to golf this one, so I just obfuscated the variable names, and made it 'messy'. As a matter of fact it's so mean, that I'm going to post hints over time, just so I may see it cracked.

Hint 1: this has theoretically infinite valid inputs, but there is one that is the most 'Correct'


public class Main {

	public static void main(String[] a) {
		try {
			while (a.length < 2) {
				int i = 0;
			}
			boolean invalid = 1 < 0;
			char l = '_';
			char h = '-';
			char[] DATATWO = a[0].toCharArray();
			char[] DATATOW = a[1].toCharArray();
			int length = DATATOW.length;
			if (DATATWO.length != length) {
				invalid = 1 > 0;
			}
			int transmissionStartIndex = 0;
			for (int i = 0; i < length; i++) {
				if (DATATWO[i] == l && DATATOW[i] == l) {
					transmissionStartIndex = i;
					break;
				}
			}
			int DATAONE = 0, reg = 0;
			boolean read = 1 < 0, full = 0 < 1;
			int bytes_read = 0;
			for (int i = transmissionStartIndex; i < length; i++) {
				if (DATATOW[i] == l && DATATOW[i + 1] == h) {
					bytes_read++;

					if (bytes_read == 8) {
						read = DATATWO[i] == h;
					} else if (bytes_read == 9) {
						invalid = (DATATWO[i] == h || invalid);
						System.out.println(invalid);
					} else if (bytes_read == 18) {
						System.out.println(invalid);
						invalid = (DATATWO[i] == h || invalid);
						if (invalid) {
							System.out.println("i36 " + DATATWO[i] + " " + h);
						}
						full = 1 > 0;
					} else if (bytes_read < 8) {
						DATAONE += (DATATWO[i] == h ? 1 : 0) << (7 - bytes_read);
					} else if (bytes_read < 18) {
						reg += (DATATWO[i] == h ? 1 : 0) << (8 - (bytes_read - 9));
					} else if (bytes_read > 18) {
						invalid = 1 > 0;
					}
					System.out.println(a[0]);
					System.out.println(new String(new char[i]).replace("\0", " ") + "|");
					System.out.println(a[1]);
				}
			}

			while (!(Integer.toHexString(DATAONE).equals("0x2b") && (read)
					&& Integer.toHexString(reg).equals("0xa6"))) {

				System.out.println(System.currentTimeMillis());
				try {
					Thread.sleep(1);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}

		} catch (Exception e) {
			while (true) {
			}
		}

	}
}

Try it online!

tuskiomi

Posted 2017-07-24T15:46:45.840

Reputation: 3 113

Two empty arguments seem to work – Okx – 2017-07-24T17:09:32.833

Also, mind adding a tio link? I think all you'd need to do is change main to Main – Okx – 2017-07-24T17:24:24.197

1Cracked, apart from a bug. – user3033745 – 2017-07-24T17:40:33.903

Cracked - no version specific bug. – Okx – 2017-07-24T17:41:42.040

3

Braingolf, 18 bytes Cracked

1+[#£-0!e>:$_1>|]

Try it online!

Liiiitle bit harder than the last one, I'll start writing a real one after this

The answer is 163

Skidsdev

Posted 2017-07-24T15:46:45.840

Reputation: 9 656

Man, this is probably the only surviving submission atm. Note: i doesn't work. – Erik the Outgolfer – 2017-07-24T17:14:49.473

Warning: this is actually 19 bytes (£). And why doesn't -1 work? This is tricky. – Erik the Outgolfer – 2017-07-24T17:20:17.187

@EriktheOutgolfer It's 17 characters and 18 bytes. – totallyhuman – 2017-07-24T17:25:51.810

@totallyhuman I swear I had read "19 UTF-8 bytes, 18 chars" (userscript is enabled)... – Erik the Outgolfer – 2017-07-24T18:09:13.807

Cracked – Adnan – 2017-07-24T18:14:21.557

3

JavaScript (ES7), 41 bytes (Hacked & Cracked)

Edit: fixed to prevent it from crashing when given no input at all (thanks @totallyhuman for noticing)


Several solutions probably exist, but the expected one is relatively simple.

(x=0)=>{for(;~x/x.length**3!=-2962963;);}

Intended solution:

"8e7" (a number in scientific notation passed as a string)
Because: ~"8e7"/"8e7".length**3 = -80000001/3**3 = -80000001/27 = -2962963

Arnauld

Posted 2017-07-24T15:46:45.840

Reputation: 111 334

2No input works on this one too, but I don't want to bother cracking it like that... Unless, that's the intended solution. :P – totallyhuman – 2017-07-24T17:30:26.687

@totallyhuman Well, it's not the intended solution. :-) – Arnauld – 2017-07-24T17:37:46.710

Hacked https://codegolf.stackexchange.com/a/135432/71612

– Евгений Новиков – 2017-07-24T18:24:20.710

2Update: got intended 3 bytes long solution – Евгений Новиков – 2017-07-24T19:53:48.257

3

JavaScript (Node.js), 18 bytes (Cracked)

x=>{while(x+"h");}

Try it online! Answer:

new Buffer(268435440) throws an error when .toStringed.

programmer5000

Posted 2017-07-24T15:46:45.840

Reputation: 7 828

1Cracked – Stephen – 2017-07-24T19:05:15.397

Also, Symbol() would work. – Patrick Roberts – 2017-07-27T22:28:40.053

3

Mathematica, 36 26 bytes (cracked)

#0[#;$IterationLimit=∞]&

A very short loop #0[#;∞] that will just keep running itself over and over until it crashes your kernel... (The $IterationLimit is just to make sure you get stuck forever for most inputs).

Try it on Wolfram Sandbox! - if you are stuck in an infinite loop, you can wait until you time out, or you can press the square "abort evaluation" icon to the left of the notebook title (unnamed).

NOTE: this function changes your $IterationLimit settings.

JungHwan Min

Posted 2017-07-24T15:46:45.840

Reputation: 13 290

Cracked? – Martin Ender – 2017-07-25T12:36:03.667

3

Bash + Utils (Cracked by Dennis), 74 bytes

I hope you enjoy tar, because it's the only utility you can use.

cp /bin/tar .
env -i PATH=$PWD I=$? /bin/bash -r -c "$1"
while :;do :;done

Try it online!

Intended crack

tar -cf --checkpoint=1 --checkpoint-action=exec="/bin/kill $I" .

Sisyphus

Posted 2017-07-24T15:46:45.840

Reputation: 1 521

1cracked – Dennis – 2017-07-25T06:45:25.837

@Dennis Nice! I posted my intended crack, which was a bit more complex. – Sisyphus – 2017-07-25T06:49:45.633

3

C#, 118 bytes (Cracked)

using System;_=>{while(1>0){try{if(Nullable.GetUnderlyingType(Type.GetType(Console.ReadLine()))!=null)break;}catch{}}}

I don't expect this to last too long but it is more awkward than it appears to be.

Basically any Nullable classes full name works but it is awkward to find out as it looks like the below :
System.Nullable`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
An easier way to find this string out is to do typeof(int?).FullName.

TheLethalCoder

Posted 2017-07-24T15:46:45.840

Reputation: 6 930

Cracked – Luc – 2017-07-25T21:15:58.077

3

C, 140 bytes (Cracked)

n,i;f(){float x,y,z;for(scanf("%d %d",&n,&z,x=y=0);~((int)x-(int)(1/sqrt(y*2)));x*=(1.5-y*x*x))y=(x=z)/2,i=n-((*(int*)&x)/2),x=*(float*)&i;}

Hopefully there aren't too many not-even-close-to-the-intended-inputs that make it halt, but let's see.

Try it online!

Steadybox

Posted 2017-07-24T15:46:45.840

Reputation: 15 798

Cracked. – Veedrac – 2017-07-26T12:37:10.313

3

JavaScript (ES7), 73 bytes (Cracked!)

q=>{r=(n,i=0)=>i>1e3?n:r(n*16807%(2**31-1),i+1);while(r(q)!=627804986){}}

Not wanted solutions: brute force. Desired crack involves math.

Note that there are many solutions (4194304) because of modulo.

iovoid

Posted 2017-07-24T15:46:45.840

Reputation: 411

1Cracked. – Veedrac – 2017-07-27T03:41:17.320

3

Swift 3, 14 bytes (Cracked)

while !false{}

To solve this, put your code before or after this statement.

  • Your solution must:
    • keep this statement intact, without modifying its code
    • actually let this statement run
      • Simply commenting it out, calling fatalError(), etc. before it doesn't count.
    • modify the behavior of this statement to prevent it from looping forever
  • The solution does not involve crashing the program.

Alexander - Reinstate Monica

Posted 2017-07-24T15:46:45.840

Reputation: 481

I don't know Swift, but I think adding a timer before this code to exit after a few seconds would meet the criteria. – None – 2017-07-28T10:03:18.563

@Yimin heh, clever, but it doesn't modify the semantics of this statement, which is what I was really looking for when I said "modifies the behaviour of this statement" – Alexander - Reinstate Monica – 2017-07-28T14:32:23.800

Are you sure that the solution works? The interpreter is yelling ambiguous semantics at me. – Daniel – 2017-07-28T15:21:16.790

@Dopapp that's what I thought would happen in my previous attempt. For some reason, it's legal to redefine new infix operators with the same type signatures as those that already exist, but attempting to do the same with a unary operator throws a compile time ambiguity error. This is intentional, and I'm sure I have a working solution – Alexander - Reinstate Monica – 2017-07-28T15:24:43.323

Cracked. – Veedrac – 2017-07-31T03:20:05.040

3

brainfuck, 170 bytes cracked!

>>,>,>,>,>,[-----------<-<+<--<--->>>>]<++<<+<++[----->+<]>[----------------->+++++++<]>[----->>+<<]>>[-<->]<[--->++++++<]>[--->+<]+>-[-----------------<+>]<[-->-<]>+[+-]

Try it online!

Jerry

Posted 2017-07-24T15:46:45.840

Reputation: 71

Welcome to the site! You could save 11 bytes by removing the newlines from your code. – Post Rock Garf Hunter – 2017-07-29T18:00:54.237

I forgot it was code golf, thanks! – Jerry – 2017-07-29T18:05:16.340

Cracked – user202729 – 2017-07-30T05:21:41.377

Valid solution! I estimate there are quite a bit of them. For anyone solving/brute-forcing, the intended one is [a-z]. – Jerry – 2017-07-30T13:15:02.303

For each 4 characters, there are exactly 1 value of the last character makes the program halt. Therefore there are 256^4 = 4294967296 solutions assuming you can enter nul into brainfuck. BTW you can remove two first > save 2 bytes. – user202729 – 2017-07-30T15:20:24.397

@Jerry: Edited in intended input. – user202729 – 2017-07-31T03:48:12.337

3

JavaScript ES6 (Node.js >= 6.0), 326 bytes (Safe)

((v,e=require('events').EventEmitter.prototype,l=_=>{while(1);},P=Proxy,p=process)=>(p.kill=p.exit,e.listeners=new P(e.listeners,{apply:(t,c,a)=>a[0]=='exit'?[]:t.apply(c,a)}),e.removeAllListeners=new P(e.removeAllListeners,{apply:(t,c,a)=>a[0]=='exit'?c:t.apply(c,a)}),p.on('exit',l),i=>{try{v(i)}catch(o){}l()}))(s=>eval(s))

Much more simplified than my other challenge was, I'm no longer attempting to obfuscate the approach for the solution, which saved me a lot of bytes. This time around, process.kill() won't work.

"delete process._events.exit;process.exit()"

Try it online!

Patrick Roberts

Posted 2017-07-24T15:46:45.840

Reputation: 2 475

Woah! Nice job! – programmer5000 – 2017-08-07T19:09:10.773

It looks like you're the winner, although I was expecting a much shorter code hehe – Piyin – 2017-08-08T15:43:05.187

2

JS (ES6), 23 bytes (Cracked)

x=>{while(!x||x>="\n");}

Fairly easy, but not that easy.

-1 byte thanks to Step Hen, -3 thanks to a mistake pointed out by Step Hen

programmer5000

Posted 2017-07-24T15:46:45.840

Reputation: 7 828

@StepHen You can't assume input is an a varible, but lambda functions like this are allowed. While is a block statement, meaning it has to be wrapped in {} when in an arrow functions. – programmer5000 – 2017-07-24T16:18:29.807

1@StepHen oh oops! – programmer5000 – 2017-07-24T16:21:24.830

2

That confused the crap out of me. Cracked

– Stephen – 2017-07-24T16:25:32.550

2Cracked – Shaggy – 2017-07-24T16:26:05.667

Am I missing something or does the Braingolf solution work here too? – Neil – 2017-07-24T16:54:45.630

@Neil you're right, it would, negative numbers are >= strings, TIL – Stephen – 2017-07-24T17:06:31.270

2

cQuents, 2 bytes (Cracked 1) (Cracked 2)

:A

Note that this will quickly hit the 128 KiB output limit on TIO, causing it to stop, but when run locally it will loop forever, except on the input that breaks it. Finding that input should be fairly easy. Until you do, :A will keep sticking its triangular tongue out at you.

Note also that this should be just A but I broke implicit modes last night. On older interpreter versions A would work fine.

Cracks:

Empty input/newline on input is a valid crack. However, barring that, by passing multiple (space separated) inputs to the program, you'll terminate it (if you give 2) or error out (if you give 3 or more).

Try it online!

Stephen

Posted 2017-07-24T15:46:45.840

Reputation: 12 293

Cracked? (Errors out with empty input) – Luis Mendo – 2017-07-24T16:47:10.543

Cracked? – user41805 – 2017-07-24T16:47:23.597

@crackers yep, that's a valid crack. I'll give my upvote to someone who finds the non-empty-input crack though. – Stephen – 2017-07-24T16:48:44.807

Cracked (the intended way?) – PurkkaKoodari – 2017-07-24T17:11:31.787

2

JS (ES6), 81 75 bytes (Cracked)

x=>eval("for(var i=0;i<1/0;i+="+(x.slice?Math.abs(Number(x))+50||1:1)+");")

Try it online!

programmer5000

Posted 2017-07-24T15:46:45.840

Reputation: 7 828

Cracked – Stephen – 2017-07-24T18:06:05.450

2

JavaScript (ES6), 28834 bytes, Cracked

y=>{x=y;[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((+(!+[]+!+[]+!+[]+[!+[]+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[!+[]+!+[]+!+[]])+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+!+[]])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[!+[]+!+[]+!+[]+!+[]])[+!+[]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]]+(![]+[])[+!+[]])+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+(!+[]+!+[]+[+!+[]])+[])+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[+!+[]]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]]+[!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[+[]]+([][[]]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()(([]+[])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+[]])[+[]]+[!+[]+!+[]+!+[]]+(+(+!+[]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+![]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(+![]+[![]]+([]+[])[([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]](!+[]+!+[]+[+[]])))()}

Try it online!

Answer is 991, checks for input * 7 == 6937

Stephen

Posted 2017-07-24T15:46:45.840

Reputation: 12 293

Cracked – programmer5000 – 2017-07-24T19:22:27.760

Should you mention JSFuck in your heading? – kamoroso94 – 2017-07-25T12:22:49.933

@kamoroso94 JSF is a subset of JavaScript, it's perfectly valid JavaScript, so not really - it's just a (popular) method of obfuscating JavaScript that has a name. – Stephen – 2017-07-25T12:32:07.180

2

JavaScript (Node.js), 28 bytes Cracked

x=>{while(!x||x.__proto__);}

Try it online!

Know of anything truthy that dosen't have the __proto__ property?

programmer5000

Posted 2017-07-24T15:46:45.840

Reputation: 7 828

Cracked – Conor O'Brien – 2017-07-24T22:36:22.257

I'm curious, what was the intended solution? Or do you feel like waiting for someone to find it? – Conor O'Brien – 2017-07-24T22:51:16.707

@ConorO'Brien trying to use the intended ans on something else. – programmer5000 – 2017-07-24T22:54:08.323

1Cracked (not by me, user with not enough rep to comment) – Stephen – 2017-07-24T23:02:17.873

1Cracked – Neil – 2017-07-25T11:43:21.477

2

Python 2 (44 characters per TIO): cracked

while 1:
 try:
  x = input()
 except:
  pass

Updated TIO Link to correct for a more trivial example than intended from code golfing:

Try it online!

Foon

Posted 2017-07-24T15:46:45.840

Reputation: 201

Dunno if you were trying to golf this or not, but for future whatever, you can switch tabs and spaces for indentation to save bytes (in your case, two spaces -> tabs) and you can remove spaces around =. In case you, or anyone reading, didn't know. – Stephen – 2017-07-24T23:38:30.650

@Jonathan Allan: Fixed the pass bug. I'm not sure about the cracked part: I had a different set of inputs in mind that would work from TIO or another thing that did python myapp < myinputs ; can you embed a control-C in a useful fashion in a text file? From linux, almost anything can be terminated by doing control-z and kill -9 %1 so I'm not sure where the dividing line is. – Foon – 2017-07-24T23:39:20.817

@StepHen thanks; I hadn't realized this was codegolf until after I posted it and my first attempt to golf it a bit ended up making it trivially easy to break – Foon – 2017-07-24T23:40:18.387

Let's say "not cracked" and wait for a better one then!
...For readers - I am retracting exit() <newline> <ctrl>C (or *nix equivalent) as per this answer in light of a better one...

– Jonathan Allan – 2017-07-24T23:41:36.537

...pretty sure you can replace pass with 1 though. – Jonathan Allan – 2017-07-24T23:44:15.603

2Cracked. The "possibly" was irking me. – Veedrac – 2017-07-25T03:08:09.037

2

RProgN 2, 11 bytes Cracked

` .iS‘"{".C

Try it online!

Cracks:

# A single # will cause the { to be treated as a function literal, rather than executing it, which avoids the loop.

ATaco

Posted 2017-07-24T15:46:45.840

Reputation: 7 898

Input through arguments? – Conor O'Brien – 2017-07-24T23:06:58.287

Yep. @ConorO'Brien – ATaco – 2017-07-24T23:07:22.153

Cracked. – Conor O'Brien – 2017-07-24T23:11:15.553

2

Python 3.5, 187 bytes Cracked

def f(x):
 t="""def t():
 def t():
  while t:pass
  {}

 t()
t()"""
 if type(x) != str or chr(10) in x:
  while t:pass
 try:t=compile(t.format(x),'m','exec')
 except:
  while t:pass
 exec(t)

Forgot that \r also counts as newline. Fixed Version

Siphor

Posted 2017-07-24T15:46:45.840

Reputation: 241

Cracked. – Jonathan Allan – 2017-07-24T23:53:07.900

2

Python 2, 42 bytes (Unintended Crack & Intented Crack)

def f(x):
    try:x()
    except:7
    while True:7

There's an intended solution here, but I'm curious what people will come up with...

Try it online!

Quelklef

Posted 2017-07-24T15:46:45.840

Reputation: 441

Cracked. – Veedrac – 2017-07-25T01:51:09.763

Cracked – xnor – 2017-07-25T02:24:32.977

2

Python 3, 45 bytes (cracked, and again!)

A bit of an odd one, and probably easier than the last, but it's shorter.

def T(x,t=type):
 while t(x)is t or T(t(x)):0

Pass one argument to T by appending code to this program. That argument may be initialized imperatively. This answer is the kind of thing I'm looking for.

Veedrac

Posted 2017-07-24T15:46:45.840

Reputation: 711

This seems easily crackable by specifying a second argument. – Dennis – 2017-07-25T05:05:36.120

Could somebody please explain why it doesn't end up with RuntimeError: maximum recursion depth exceeded? Leaving a print("Calling T with %s" % x) as the first line of T and calling T(3) only outputs Calling T with 3\nCalling T with <class 'int'> but uses 100% CPU. – Eric Duminil – 2017-07-25T08:17:32.247

1@Dennis It's a one argument function. *looks both ways*. I wouldn't count such an answer in the spirit of the question. Passing 12 arguments halts too. – Veedrac – 2017-07-25T09:16:49.997

@EricDuminil Consider what happens if t(x)is t. Remember or short-circuits. And would you look at that, t(int)is t. – Veedrac – 2017-07-25T09:29:06.030

2Cracked – 301_Moved_Permanently – 2017-07-25T16:08:56.473

2

Or was this what you're looking for?

– ecatmur – 2017-07-25T16:14:41.327

Wow, I need to step up my game! Excellent work to you both. – Veedrac – 2017-07-25T16:16:06.940

1

I have to admit, I would never have come up with that answer myself without looking in the CPython test suite

– ecatmur – 2017-07-25T16:21:02.753

2

JavaScript (Node.js), 36 bytes Cracked

x=>{for(;!(x**x==x&&x!=1&&x+x>x););}

Try it online!

This one should be quite easy ^_^

Solution by Vicente Gallur Valero

1.00000001

My Solutions:

'Infinity' or '-1'

tsh

Posted 2017-07-24T15:46:45.840

Reputation: 13 072

1Cracked – Vicente Gallur Valero – 2017-07-25T08:47:35.823

2

Python 3.5, 203 bytes (Cracked with Intended Solution and Cracked)

def f(x):
 t="""def t():
 def t():
  while t:pass
  {}

 t()
t()"""
 import re
 if type(x) != str or re.search(r"\s",x,re.UNICODE):
  while t:pass
 try:t=compile(t.format(x),'m','exec')
 except:
  while t:pass
 exec(t)

There is actually a third way to crack it

My Answer:

f("t=t")
Python decides at compile time if a variable is local or not by checking if it is assigned anywhere in the function
So even if the statement is never executed it still changes the behaviour of the function(in this case causing an UnboundLocalError because it is never assigned)

Siphor

Posted 2017-07-24T15:46:45.840

Reputation: 241

I won't resubmit @JonathanAllan cracked version just by changing '\r' to chr(12), but you might want to check for that also. – 301_Moved_Permanently – 2017-07-25T15:48:33.730

Cracked – Gavin S. Yancey – 2017-07-25T21:23:36.090

2

R, 37 bytes, Cracked

f=function(x){eval(x);x=T;while(x){}}

Try it online!

Intended solution (basically the same as the cracked version):

x=T<-F

Rift

Posted 2017-07-24T15:46:45.840

Reputation: 91

Cracked. – Veedrac – 2017-07-25T11:30:23.550

2

JavaScript (Node.js), 52 46 bytes (Cracked)

x=>{try{(!(x*1)||x*1)&&0()}catch(e){for(;;);}}

Try it online!

Intended:

// break excluded middle:
{valueOf:()=>this.q?0:this.q=1}

Alex Varga

Posted 2017-07-24T15:46:45.840

Reputation: 171

1Cracked? – tsh – 2017-07-26T01:53:07.923

Cracked in a less clever way! – Dom Hastings – 2017-07-26T10:59:55.403

@DomHastings that's just mean – Alex Varga – 2017-07-26T15:13:15.073

Yeah, I thought so! Enjoyed playing with it though, thanks! – Dom Hastings – 2017-07-26T18:32:48.480

2

Pyth, 5 bytes, Cracked, Cracked

##.vz

Code

I believe there's (essentially) only a single solution.

isaacg

Posted 2017-07-24T15:46:45.840

Reputation: 39 268

Cracked? – Adnan – 2017-07-26T11:37:55.810

Cracked. – Veedrac – 2017-07-26T11:37:58.730

2

C#, 63 bytes (Cracked)

a=>{while(1>0)if(string.IsInterned(new string(a))!=null)break;}

Compiles to a Action<char[]>.

Try it online!

An empty array and null all seem to work. This is because string.Empty, or "", is always interned.

TheLethalCoder

Posted 2017-07-24T15:46:45.840

Reputation: 6 930

Hmm, based on my knowledge of IsInterned, it returns true for an Interned string, which is a string that is a string literal within the code, or has been interned with Intern, this means you're abusing some undocumented behaviour of IsInterned somehow, because there are no string literals defined. – Skidsdev – 2017-07-26T09:27:59.277

@Mayube It returns the string not a bool which I found odd myself. I suppose it isn't as intuitive as you'd think it would be though. – TheLethalCoder – 2017-07-26T09:37:20.103

that's what I meant sorry, IsInterned()!=null returns true if the string is Interned, and false otherwise. – Skidsdev – 2017-07-26T09:41:47.327

@Mayube It's been cracked, I thought this one was harder than that. – TheLethalCoder – 2017-07-26T09:45:10.830

Aaah, my problem is I was thinking input from STDIN, not just argument to the method :P – Skidsdev – 2017-07-26T09:45:49.690

@Mayube Yeah :) That's why I added the TIO link. – TheLethalCoder – 2017-07-26T09:48:03.907

2

Swift 3, 43 bytes, Cracked

func f(i:Int){let p=0;while i==p||i != p{}}

Call with f(i: /*your input here*/)

More readable:

func gandalf(input: Int) {
    let password = 0
    while input == password || input != password {
        print("You shall not pass!")
    }

    print("nvm")
}

Call with gandalf(input: /*your input here*/)

Try it here!

I affirm that I have a working crack for this.

Alexander - Reinstate Monica

Posted 2017-07-24T15:46:45.840

Reputation: 481

The code at the "Try it here!" link does not match the one in the post. I don't know whether it matters - I have no idea how swift works. – NieDzejkob – 2017-07-26T18:25:02.663

@NieDzejkob Yes it does, it matches the ungolfed code (for the robbers' convenience, of course :P) – Alexander - Reinstate Monica – 2017-07-26T18:37:01.000

@Alexander It doesn't; password is inlined. – Veedrac – 2017-07-26T18:42:52.883

@Veedrac Oh, true! – Alexander - Reinstate Monica – 2017-07-26T18:47:28.470

Can the crack be a runtime error? If so, cracked. I am guessing this is not what you had in mind, though.

– Daniel – 2017-07-27T21:07:40.217

@Dopapp I'll concede to a runtime error, but only if you cause it within my function. You just caused a runtime error before my function runs, in a convoluted way. You may as well just have fatalError()ed – Alexander - Reinstate Monica – 2017-07-27T22:26:27.063

@Alexander, yeah that’s fair I deleted my answer. – Daniel – 2017-07-27T23:26:02.837

@Dopapp When you think about it, most of these programs could be "cracked" with exit(1), throw new Exception(), fatalError(), etc. I guarantee that there is a way to run this code that gets it to halt, that does not involve crashing it – Alexander - Reinstate Monica – 2017-07-27T23:27:02.270

Is this what you were going for? Cracked.

– Daniel – 2017-07-28T07:01:34.233

@Dopapp Nice! That was very close to what I had in mind. I didn't know you could redefine existing overloads (e.g. the (Int, Int) -> Bool variant of ==) – Alexander - Reinstate Monica – 2017-07-28T07:41:48.987

2

CPython 2.7, 96 93 100 bytes Cracked

There are so many loopholes in python! It is really hard to write code which can't be manipulated or produce vastly unexpected results.

def f(x):
 try:
  s=str(x)
  [c for c in s if c not in'x.']and 0/0
  exec(s)
 finally:
  while(1):1

Not too hard, I'm afraid.

Sudo Bash

Posted 2017-07-24T15:46:45.840

Reputation: 61

I'm new to code golf so I am not sure if I need to make this a function or if stand alone code like this is OK. Can anyone point me at some rule or clarify this for me? – Sudo Bash – 2017-07-26T21:42:57.827

on my machine, del str immediately throws NameError regardless of the input I give. – tbodt – 2017-07-26T21:56:06.673

@tbodt So it gets caught in the while loop at the end right? I wasn't sure if the rules of this challenge allows the robbers to override str, so I did del str just in case. So if you don't override it, you get caught in the loop. I would ask the OP but I don't have comment priv yet. – Sudo Bash – 2017-07-26T21:58:02.580

If you write your program as a function, the input would come from function arguments, otherwise it would come from outside the program (e.g. input() or sys.argv) – tbodt – 2017-07-26T22:00:54.927

OK, thanks. I made it a function and removed del str because I assume that it would be cheating to override str since that is not technically input. – Sudo Bash – 2017-07-26T22:06:56.930

Simplest thing I can come up with is some code that segfaults the interpreter and is carefully constructed to not contain . or x. is there a simpler thing I should be looking for? – tbodt – 2017-07-26T22:25:37.387

@tbodt Did you mean, "carefully constructed to only contain . or x"? If your x contains characters other than x or . then it will raise ZeroDivisionError and go to the infinite loop. But I was able to get it to stop without crashing. – Sudo Bash – 2017-07-26T22:49:55.773

oh I read the code wrong. hmm – tbodt – 2017-07-26T22:52:12.840

cracked – tbodt – 2017-07-26T23:38:08.940

@tbodt Nicely done. That is the solution that I had, except I used os._exit(0) – Sudo Bash – 2017-07-26T23:56:03.030

yours is more portable :) – tbodt – 2017-07-26T23:56:41.507

2

C++ (gcc/MSVC), 62 bytes, cracked

template<class T,T=T{}>T*f(T t){for(static T*a;!a;(T&)a=t=0);}

Tested on Linux and Windows, with and without optimizations enabled. Under MSVC, you may wish to use #pragma warning(default:4716).

class T{}T::*t;

A null pointer-to-data-member is (typically, on modern platforms) assigned a numeric value of -1, as opposed to other null pointers, which are assigned a numeric value of 0. This is so that the pointer-to-data-member can store the offset of the data member from the beginning of the class, since this offset could be 0 for the first data member.

Try it online!

ecatmur

Posted 2017-07-24T15:46:45.840

Reputation: 1 675

Cracked (Anyone add an explanation for me? I don't know how that works.) – user202729 – 2017-07-27T11:08:09.997

@user202729 Excellent! Added an explanation in the spoiler. – ecatmur – 2017-07-27T12:45:03.180

2

Node.js, 129 bytes Cracked

q=>{try{v=require("vm");c=v.createContext();new v.Script(String.prototype.toString.apply(q)).runInContext(c)}catch(a){}for(;;){}}

Unwanted: tampering with require/vm (eg require=1;q())

iovoid

Posted 2017-07-24T15:46:45.840

Reputation: 411

which version of Node? – Alex Reinking – 2017-07-27T23:56:23.680

Cracked – Alex Reinking – 2017-07-28T00:44:27.587

2

Python 3, 35 bytes, cracked

def f(o):
 while bool(o)==bool(o):0

Try it online!

Not too hard...

Intended solution (ungolfed, 'cause screw it):

class LOL: def __init__(self): self.lol = True def __bool__(self): self.lol = not self.lol return self.lol lol = LOL() f(lol)

totallyhuman

Posted 2017-07-24T15:46:45.840

Reputation: 15 378

2Cracked? – HyperNeutrino – 2017-07-29T00:25:31.523

2

#Batch, 26 24 28 bytes - Cracked(Unintened)

Unfortunately, TIO doesn't support batch, so you will need to try on a command prompt.

:L
set/pp=
echo("%p%"
goto l

The unintended solution:

"&&exit 
(Note the trailing space!) This undoes the quotes in echo(" and execute the exit command. Actually, the exit command can be changed to lots of other commands that causes an exit.

The intended solution:

Hint: The intended solution does not use &&, but uses variable expansion bug.

stevefestl

Posted 2017-07-24T15:46:45.840

Reputation: 539

You should not reveal the inputs it crashes on... That's the whole point of the challenge. – Mr. Xcoder – 2017-07-29T09:28:21.463

@Mr.Xcoder Change is in. – stevefestl – 2017-07-29T09:29:15.647

@Mr.Xcoder Oh well. I shouldn't change the code. – stevefestl – 2017-07-29T09:33:12.230

I deleted my answer. – Mr. Xcoder – 2017-07-29T09:34:48.720

Nevermind, I'll let someone else crack it. – Mr. Xcoder – 2017-07-29T09:35:22.027

Cracked. I wonder how can this last 3 hours without being cracked... – user202729 – 2017-07-29T12:43:38.053

@user202729 seriously?! Let me test this on my machine – stevefestl – 2017-07-29T12:44:39.000

Does the intended one use &&? – user202729 – 2017-07-29T13:58:42.350

@user202729 Nope. It uses some sort of random variable expansion. It is very long and confusing. – stevefestl – 2017-07-29T14:00:07.787

Is it possible to pass /v (enable delayed expansion) to cmd? And I suppose | (pipe) and &, || are also not allowed. – user202729 – 2017-07-30T05:54:30.793

Do you mean in my solution? – stevefestl – 2017-07-30T05:55:16.847

2

Python 2, 81 bytes, Cracked

try:x,y,z=raw_input().split(',');setattr(__import__(x),y,z)
except:0
while True:0

Alex Hall

Posted 2017-07-24T15:46:45.840

Reputation: 281

Cracked! – Sisyphus – 2017-07-29T12:16:28.980

2

Python, 91 bytes, Cracked

x=input()
try:y=len(x)<10and'*'not in x and len(str(eval(x)))==307
except:y=0
while not y:0

raw_input for Python 2.

No one found the intended answer but the solutions found were very creative and impressive.

A hint for the intended answer is:

it consists of only letters.

The intended answer is:

copyright

Alex Hall

Posted 2017-07-24T15:46:45.840

Reputation: 281

Cracked. – Sisyphus – 2017-07-29T12:31:32.927

@Sisyphus Very clever. I've shortened the length limit so that won't work any more. – Alex Hall – 2017-07-29T12:38:11.933

Probably not what you had in mind. Still, it's cracked on my system.

– Eric Duminil – 2017-07-29T15:02:00.930

@EricDuminil nice, and a surprising coincidence, but not what I had in mind. I've changed the length limit again. This is the real one now, I promise! Also the intended answer does work on both python 2 and 3 (surprisingly) at least on my system. – Alex Hall – 2017-07-29T15:37:10.857

Cracked.. I had another answer too that did fit in the original length limit, but not in the edited one: "_".__mul__(307). – hvd – 2017-07-30T14:45:11.380

@hvd well done! Still not what I had in mind but I have to give you this. I've edited in my answer plus a hint. – Alex Hall – 2017-07-30T14:53:46.857

Ah, nice, sorry to mess it up! Eric Duminil was much closer to your intended answer than I was. – hvd – 2017-07-30T15:17:11.567

@EricDuminil see what the intended answer was. It's shocking that your answer worked. – Alex Hall – 2017-07-30T15:18:59.890

@AlexHall: I simply tested .__doc__ on every word with 4 letters or less. There were 2 others between 300 and 315. – Eric Duminil – 2017-07-30T17:50:50.613

cracked – Leaky Nun – 2017-08-01T14:17:19.707

2

Python 2, 86 bytes (safe)

def _(x):exec x
try:(input()or _("while 1:0"))and _("while 1:0")
except:_("while 1:0")

I know this is a late answer, but I thought of what I think is an interesting way to do this.

Update and explanation:

The answer is

_("__import__('os')._exit(0)"). In Python 2, the input function evals its argument before returning the resulting value. In order to bypass the infinite loops, the input string must somehow lead input to exit the program without raising an exception. Ordinarily, this should be impossible, because eval cannot execute arbitrary code by itself in Python 2. However, the _ function may be called by a string passed to eval, and since _ is itself a wrapper for the exec statement, which can execute arbitrary code, this input is able to function by calling _ with a string containing a call to the os._exit function, which exits the program immediately without erroring.

Actually, I just noticed that the _ exec wrapper isn't strictly necessary, as __import__('os')._exit(0) is technically an expression rather than a statement and thus can be passed to eval without a syntax error.

Regardless, one should never use the input function in Python 2, especially in conjunction with a wrapper for exec. Use raw_input instead and then convert the value to whatever type you want.

Aidan F. Pierce

Posted 2017-07-24T15:46:45.840

Reputation: 1 365

2

05AB1E - 4 bytes

[I#]

The answer is easy if you know 05AB1E

MilkyWay90

Posted 2017-07-24T15:46:45.840

Reputation: 2 264

Cracked – Draco18s no longer trusts SE – 2018-10-15T00:18:04.723

1

MATL, 7 bytes (cracked and cracked)

jU`ttX=

Try it online!

Luis Mendo

Posted 2017-07-24T15:46:45.840

Reputation: 87 464

Cracked, the empty input errors and terminates the program. – Mr. Xcoder – 2017-07-24T16:53:47.763

@Mr.Xcoder Aw. That was not the intended solution, but well done! – Luis Mendo – 2017-07-24T17:14:01.047

Perhaps I'll find the intended one too – Mr. Xcoder – 2017-07-24T17:14:50.300

Cracked – PunPun1000 – 2017-07-24T17:51:03.287

@PunPun1000 That was the intended solution :-) Well done!! N also works (it directly means NaN) – Luis Mendo – 2017-07-24T18:12:36.870

1

JS (ES6), 37 bytes (Cracked)

x=>{for(;typeof x!=="object"||x;);}

Pretty easy. Let's see how long this lasts.

programmer5000

Posted 2017-07-24T15:46:45.840

Reputation: 7 828

Cracked! Nooo, SE automatically converted my crack into a comment, I just reverted it now – user41805 – 2017-07-24T17:42:47.000

Cracked – Stephen – 2017-07-24T17:42:49.120

1

JavaScript (Node.js), 35 bytes (Cracked and Cracked)

I hope that I didn't miss anything ¯\_(ツ)_/¯:

x=>y=>{while(!(x>=y&&x<=y&&x!=y));}

Try it online!

Intended solution:

{}, {}

Adnan

Posted 2017-07-24T15:46:45.840

Reputation: 41 965

Cracked. Nice job! – programmer5000 – 2017-07-24T18:02:19.710

Cracked? – totallyhuman – 2017-07-24T18:05:23.603

1

Octave, 25 bytes (Cracked and Cracked)

x=input('');while 1|x,end

Try it online!

Stewie Griffin

Posted 2017-07-24T15:46:45.840

Reputation: 43 471

Cracked – OlivierTheOlive – 2017-07-24T18:46:09.330

Cracked? – Leaky Nun – 2017-07-24T18:47:19.833

1

Add++, 106 bytes, Cracked

+?
-1
=?
-1
=?
N
W,+0
+?
+?
+?
>?
-?
V
V
^2
V
=?
N
W,+0
+G
-G
V
=?
N
W,+0
+G
*G
-?
W,+0
+?
>
-24
-?
W,+0
O

Try it online!

This is really mean, to anyone who tries to crack it. So, uh, have fun! I forgot about empty input!

caird coinheringaahing

Posted 2017-07-24T15:46:45.840

Reputation: 13 702

Cracked – Mr. Xcoder – 2017-07-24T18:14:11.027

Uh, it doesn't go into an infinite loop as it is (no input). – totallyhuman – 2017-07-24T18:14:23.333

1

JavaScript (Node.js), 123 bytes, Cracked

x=>y=>{try{console.assert(/3$/.test(x));n=y*321;c=x===n.toString().replace(/2$/,3)&&+x===n;if(c)return;}catch(e){}for(;;);}

Try it online!

Stephen

Posted 2017-07-24T15:46:45.840

Reputation: 12 293

Cracked – Juan Tonina - Reinstate Monica – 2017-07-24T19:28:12.563

1

C (gcc), 144 bytes (Cracked)(Cracked 2) (Intended Crack)

This should be an easy one. Compile without optimizations.

#include <stdio.h>
char*a="abcd";char b[256];fun(){char c['\b'];char*d=a;fgets(c,'\f',stdin);snprintf(b,sizeof(c),c,d);}
main(){while(1)fun();}

Try it online!

dj0wns

Posted 2017-07-24T15:46:45.840

Reputation: 328

Cracked – PunPun1000 – 2017-07-24T19:56:23.597

Cracked the intended way? – Ken Y-N – 2017-07-25T00:13:20.727

Cracked, third times a charm at getting the intended solution? – PunPun1000 – 2017-07-29T18:19:19.257

1

Python 3, 228 Bytes (Cracked - Fixed)

I was stupid, and this was cracked because I missed a trivial case. Thanks to Jonathan Allan, it's been fixed, and I resubmit it.

Try it here

p=print
try:
    n=input()
except:
    while 1:p("i")
try:
    while sum(map(int,n))<1or not(int(n[17]+n[:17])==2*int(n[:18])and int(n[45]+n[18:45])==3*int(n[18:46])and int(n[87]+n[46:87])==5*int(n[46:88])):p("m")
except:
    while 1:p("x")

E.D.

Posted 2017-07-24T15:46:45.840

Reputation: 111

1

TIO is an online execution environment for programs. For example, you might post this link as a way of sharing your answer through the online environment.

– Conor O'Brien – 2017-07-24T20:48:34.193

1Simple crack would be n a string or list of length less than length 17 causing an IndexError (this is assuming n is already limited to a string or list too). – Jonathan Allan – 2017-07-24T21:39:03.727

1cracked. Almost certainly not the intended crack, but also without any error raised. – Jonathan Allan – 2017-07-24T21:59:21.773

@JonathanAllan You're right. I meant to restrict it to only positive values. Is it acceptable to edit it to correct my oversight? – E.D. – 2017-07-24T22:46:04.687

2

Yeah, I think so, I have not cracked the intended and it seems cool to me - how about this modification? It means it'll be a full program, so only strings ever get in (empty or ctrl-x etc for input - prints "i") and no errors can occur in the evaluation (prints "x").

– Jonathan Allan – 2017-07-24T22:52:50.100

@JonathanAllan That seems to do what I intended, but I couldn't have written something like that. Crediting you in the Answer – E.D. – 2017-07-24T22:56:48.293

EDIT oops this you'd best check your intended input works though :)

– Jonathan Allan – 2017-07-24T22:59:49.557

Fixed, and verified the expected answer works on this. I'm a better mathematician than i am golfer. Thanks @JonathanAllan – E.D. – 2017-07-24T23:59:34.097

@cairdcoinheringaahing Thank you! – E.D. – 2017-07-25T00:18:34.587

Is this python 2 or python 3? You don't specify. – pppery – 2017-07-30T03:11:14.133

@ppperry python 3, and good luck – E.D. – 2017-07-31T14:06:56.983

@ppperry You're right, it's been corrected. – E.D. – 2017-07-31T20:53:18.747

Cracked the fixed version – Arnold Palmer – 2018-10-25T15:32:10.540

1

JavaScript in Firefox console (on blank.org), 7,987 bytes (cracked)

Not contending to win, but this should be fun.

f=B=>{eval("if(typeof B!='number')B=0;if(typeof Β!='number')Β=0;".repeat(4).repeat(2));while(B<=0||B==1||B==2||B==3||B==4||B==5||B==6||B==7||B==8||B==9||B==10||B==11||B==12||B==13||B==14||B==15||B==16||B==17||B==18||B==19||B==20||B==21||B==22||B==23||B==24||B==25||B==26||B==27||B==28||B==29||B==30||B==31||B==32||B==33||B==34||B==35||B==36||B==37||B==38||B==39||B==40||B==41||B==42||B==43||B==44||B==45||B==46||B==47||B==48||B==49||B==50||B==51||B==52||B==53||B==54||B==55||B==56||B==57||B==58||B==59||B==60||B==61||B==62||B==63||B==64||B==65||B==66||B==67||B==68||B==69||B==70||B==71||B==72||B==73||B==74||B==75||B==76||B==77||B==78||B==79||B==80||B==81||B==82||B==83||B==84||B==85||B==86||B==87||B==88||B==89||B==90||B==91||B==92||B==93||B==94||B==95||B==96||B==97||B==98||B==99||B==100||B==101||B==102||B==103||B==104||B==105||B==106||B==107||B==108||B==109||B==110||B==111||B==112||B==113||B==114||B==115||B==116||B==117||B==118||B==119||B==120||B==121||B==122||B==123||B==124||B==125||B==126||B==127||B==128||B==129||B==130||B==131||B==132||B==133||B==134||B==135||B==136||B==137||B==138||B==139||B==140||B==141||B==142||B==143||B==144||B==145||B==146||B==147||B==148||B==149||B==150||B==151||B==152||B==153||B==154||B==155||B==156||B==157||B==158||B==159||B==160||B==161||B==162||B==163||B==164||B==165||B==166||B==167||B==168||B==169||B==170||B==171||B==172||B==173||B==174||B==175||B==176||B==177||B==178||B==179||B==180||B==181||B==182||B==183||B==184||B==185||B==186||B==187||B==188||B==189||B==190||B==191||B==192||B==193||B==194||B==195||B==196||B==197||B==198||B==199||B==200||B==201||B==202||B==203||B==204||B==205||B==206||B==207||B==208||B==209||B==210||B==211||B==212||B==213||B==214||B==215||B==216||B==217||B==218||B==219||B==220||B==221||B==222||B==223||B==224||B==225||B==226||B==227||B==228||B==229||B==230||B==231||B==232||B==233||B==234||B==235||B==236||B==237||B==238||B==239||B==240||B==241||B==242||B==243||B==244||B==245||B==246||B==247||B==248||B==249||B==250||B==251||B==252||B==253||B==254||B==255||B==256||B==257||B==258||B==259||B==260||B==261||B==262||B==263||B==264||B==265||B==266||B==267||B==268||B==269||B==270||B==271||B==272||B==273||B==274||B==275||B==276||B==277||B==278||B==279||B==280||B==281||B==282||B==283||B==284||B==285||B==286||B==287||B==288||B==289||B==290||B==291||B==292||B==293||B==294||B==295||B==296||B==297||B==298||B==299||B==300||B==301||B==302||B==303||B==304||B==305||B==306||B==307||B==308||B==309||B==310||B==311||B==312||B==313||B==314||B==315||B==316||B==317||B==318||B==319||B==320||B==321||B==322||B==323||B==324||B==325||B==326||B==327||B==328||B==329||B==330||B==331||B==332||B==333||B==334||B==335||B==336||B==337||B==338||B==339||B==340||B==341||B==342||B==343||B==344||B==345||B==346||B==347||B==348||B==349||B==350||B==351||B==352||B==353||B==354||B==355||B==356||B==357||B==358||B==359||B==360||B==361||B==362||B==363||B==364||B==365||B==366||B==367||B==368||B==369||B==370||B==371||B==372||B==373||B==374||B==375||B==376||B==377||B==378||B==379||B==380||B==381||B==382||B==383||B==384||B==385||B==386||B==387||B==388||B==389||B==390||B==391||B==392||B==393||B==394||B==395||B==396||B==397||B==398||B==399||B==400||B==401||B==402||B==403||B==404||B==405||B==406||B==407||B==408||B==409||B==410||B==411||B==412||B==413||B==414||B==415||B==416||B==417||B==418||B==419||B==420||B==421||B==422||B==423||B==424||B==425||B==426||B==427||B==428||B==429||B==430||B==431||B==432||B==433||B==434||B==435||B==436||B==437||B==438||B==439||B==440||B==441||B==442||B==443||B==444||B==445||B==446||B==447||B==448||B==449||B==450||B==451||B==452||B==453||B==454||B==455||B==456||B==457||B==458||B==459||B==460||B==461||B==462||B==463||B==464||B==465||B==466||B==467||B==468||B==469||B==470||B==471||B==472||B==473||B==474||B==475||B==476||B==477||B==478||B==479||B==480||B==481||B==482||B==483||B==484||B==485||B==486||B==487||B==488||B==489||B==490||B==491||B==492||B==493||B==494||B==495||B==496||B==497||B==498||B==499||B==500||B==501||B==502||B==503||B==504||B==505||B==506||B==507||B==508||B==509||B==510||B==511||B==512||B==513||B==514||B==515||B==516||B==517||B==518||B==519||B==520||B==521||B==522||B==523||B==524||B==525||B==526||B==527||B==528||B==529||B==530||B==531||B==532||B==533||B==534||B==535||B==536||B==537||B==538||B==539||B==540||B==541||B==542||B==543||B==544||B==545||B==546||B==547||B==548||B==549||B==550||B==551||B==552||B==553||B==554||B==555||B==556||B==557||B==558||B==559||B==560||B==561||B==562||B==563||B==564||B==565||Β==566||B==567||B==568||B==569||B==570||B==571||B==572||B==573||B==574||B==575||B==576||B==577||B==578||B==579||B==580||B==581||B==582||B==583||B==584||B==585||B==586||B==587||B==588||B==589||B==590||B==591||B==592||B==593||B==594||B==595||B==596||B==597||B==598||B==599||B==600||B==601||B==602||B==603||B==604||B==605||B==606||B==607||B==608||B==609||B==610||B==611||B==612||B==613||B==614||B==615||B==616||B==617||B==618||B==619||B==620||B==621||B==622||B==623||B==624||B==625||B==626||B==627||B==628||B==629||B==630||B==631||B==632||B==633||B==634||B==635||B==636||B==637||B==638||B==639||B==640||B==641||B==642||B==643||B==644||B==645||B==646||B==647||B==648||B==649||B==650||B==651||B==652||B==653||B==654||B==655||B==656||B==657||B==658||B==659||B==660||B==661||B==662||B==663||B==664||B==665||B==666||B==667||B==668||B==669||B==670||B==671||B==672||B==673||B==674||B==675||B==676||B==677||B==678||B==679||B==680||B==681||B==682||B==683||B==684||B==685||B==686||B==687||B==688||B==689||B==690||B==691||B==692||B==693||B==694||B==695||B==696||B==697||B==698||B==699||B==700||B==701||B==702||B==703||B==704||B==705||B==706||B==707||B==708||B==709||B==710||B==711||B==712||B==713||B==714||B==715||B==716||B==717||B==718||B==719||B==720||B==721||B==722||B==723||B==724||B==725||B==726||B==727||B==728||B==729||B==730||B==731||B==732||B==733||B==734||B==735||B==736||B==737||B==738||B==739||B==740||B==741||B==742||B==743||B==744||B==745||B==746||B==747||B==748||B==749||B==750||B==751||B==752||B==753||B==754||B==755||B==756||B==757||B==758||B==759||B==760||B==761||B==762||B==763||B==764||B==765||B==766||B==767||B==768||B==769||B==770||B==771||B==772||B==773||B==774||B==775||B==776||B==777||B==778||B==779||B==780||B==781||B==782||B==783||B==784||B==785||B==786||B==787||B==788||B==789||B==790||B==791||B==792||B==793||B==794||B==795||B==796||B==797||B==798||B==799||B==800||B==801||B==802||B==803||B==804||B==805||B==806||B==807||B==808||B==809||B==810||B==811||B==812||B==813||B==814||B==815||B==816||B==817||B==818||B==819||B==820||B==821||B==822||B==823||B==824||B==825||B==826||B==827||B==828||B==829||B==830||B==831||B==832||B==833||B==834||B==835||B==836||B==837||B==838||B==839||B==840||B==841||B==842||B==843||B==844||B==845||B==846||B==847||B==848||B==849||B==850||B==851||B==852||B==853||B==854||B==855||B==856||B==857||B==858||B==859||B==860||B==861||B==862||B==863||B==864||B==865||B==866||B==867||B==868||B==869||B==870||B==871||B==872||B==873||B==874||B==875||B==876||B==877||B==878||B==879||B==880||B==881||B==882||B==883||B==884||B==885||B==886||B==887||B==888||B==889||B==890||B==891||B==892||B==893||B==894||B==895||B==896||B==897||B==898||B==899||B==900||B==901||B==902||B==903||B==904||B==905||B==906||B==907||B==908||B==909||B==910||B==911||B==912||B==913||B==914||B==915||B==916||B==917||B==918||B==919||B==920||B==921||B==922||B==923||B==924||B==925||B==926||B==927||B==928||B==929||B==930||B==931||B==932||B==933||B==934||B==935||B==936||B==937||B==938||B==939||B==940||B==941||B==942||B==943||B==944||B==945||B==946||B==947||B==948||B==949||B==950||B==951||B==952||B==953||B==954||B==955||B==956||B==957||B==958||B==959||B==960||B==961||B==962||B==963||B==964||B==965||B==966||B==967||B==968||B==969||B==970||B==971||B==972||B==973||B==974||B==975||B==976||B==977||B==978||B==979||B==980||B==981||B==982||B==983||B==984||B==985||B==986||B==987||B==988||B==989||B==990||B==991||B==992||B==993||B==994||B==995||B==996||B==997||B==998||B>=999);}

There's another crack out there, waiting to be found... Cracks:

- NaN (unintended)
- decimals

Conor O'Brien

Posted 2017-07-24T15:46:45.840

Reputation: 36 228

Cracked – insert_name_here – 2017-07-24T23:43:37.020

Also cracked by Haumed Rahmani (who doesn't have enough reputation to comment here).

– insert_name_here – 2017-07-24T23:53:54.013

1

Python 3 (CPython), 50 bytes (cracked)

l=[]
l+=[l]
def l(a,i=id,l=id(l)):
 while i(a)-l:0

Hopefully a little bit tricky.

Pass one argument to l by appending code to this program. That argument may be initialized imperatively. This answer is the kind of thing I'm looking for.

Veedrac

Posted 2017-07-24T15:46:45.840

Reputation: 711

What should be the format of the answer? l(some_object) or l(input())? Right now, not calling l is enough for the program to halt :) – Eric Duminil – 2017-07-25T08:04:35.663

1@EricDuminil Pass a single argument to l. To avoid needless busywork, you may initialize that argument imperatively, given several other answers already do. – Veedrac – 2017-07-25T09:22:29.157

1https://codegolf.stackexchange.com/a/135687/967 – ecatmur – 2017-07-25T14:59:47.783

1

Commodore 64 Basic, 14 bytes: Cracked

1INPUTB
2GOTO1

Tested using VICE, but any Commodore emulator should work.

Cracked:

9999999999999999999999999999999999999999999999999999999999999999.9

Mark

Posted 2017-07-24T15:46:45.840

Reputation: 2 099

Cracked. – Veedrac – 2017-07-25T21:37:12.373

1

JavaScript (in Node.js), 65 bytes Cracked

x=>{try{for(;!x||x!=0||x instanceof Object;);}catch(e){for(;;);}}

Try it online!

'0'

Let's try another one: https://codegolf.stackexchange.com/a/135562/44718

tsh

Posted 2017-07-24T15:46:45.840

Reputation: 13 072

Cracked – Haumed Rahmani – 2017-07-25T02:17:18.910

1Beat me by one minute. – Grant Davis – 2017-07-25T02:19:26.613

2@HaumedRahmani aha, not what i want, maybe i will post another cops.... T_T – tsh – 2017-07-25T02:21:25.450

@HaumedRahmani OK, just a mirror edit... https://codegolf.stackexchange.com/a/135562/44718

– tsh – 2017-07-25T02:25:46.827

1

J, 22 bytes, Cracked

$:@#~^:(0([=[e.{#])#~)

This will run forever assuming memory was unlimited, except when given a specific type of input.

miles

Posted 2017-07-24T15:46:45.840

Reputation: 15 654

Cracked. – Conor O'Brien – 2017-07-25T02:46:35.210

You might want to suggest the user to test on TIO, this crashed my computer (at least on the windows version) – Conor O'Brien – 2017-07-25T02:51:39.663

@ConorO'Brien It continuously expands the array if it isn't the right input. It will continue to use more memory, and at least on my (Linux) machine, the process gets killed for using too much memory. – miles – 2017-07-25T02:54:21.017

Windows isn't that nice. (Also, the conditional fails for non-positive numbers and floats and infinity as well, all of which error) – Conor O'Brien – 2017-07-25T03:00:05.990

I think I found the intended solution and have edited into my answer – Conor O'Brien – 2017-07-25T03:03:36.863

1

JavaScript (Node.js), 85 bytes Cracked

x=>{try{for(;!x||x!=0||x instanceof Object||typeof x!='object';);}catch(e){for(;;);}}

Try it online!

({valueOf:g=>{Object=Number;return 0}})
({toString:x=>'',__proto__:null})

tsh

Posted 2017-07-24T15:46:45.840

Reputation: 13 072

Hmm... I believe everything except number, strings, and booleans are instanceof Object, but all of those have typeof x!='object'... I guess maybe I'd have to define a custom object? – ETHproductions – 2017-07-25T03:38:00.053

@ETHproductions What i tried is a very strange object. but you may also hack it by some strange way on built in objects. – tsh – 2017-07-25T03:47:12.067

cracked! – Grant Davis – 2017-07-25T04:12:06.003

1

Bash, 50 bytes (cracked)

cd $1
for((;${#PWD}-$(dirname $PWD|wc -c);))
{
:
}

Input is via command-line arguments.

Try it online!

Dennis

Posted 2017-07-24T15:46:45.840

Reputation: 196 637

This may seem TIO specific, but it's not. The intended crack will work on all fresh Linux installs. – Dennis – 2017-07-25T03:32:35.113

Cracked. – Veedrac – 2017-07-25T03:36:42.390

Well done, that was the intended solution. – Dennis – 2017-07-25T03:37:18.213

1

Befunge-98, 34 bytes, Possibly cracked

> #;de+294&:0\`#;_3*+*\-\0pqk$#q_

Unfortunately I couldn't get this to halt in TIO or CCBI, but it works in BefungeSharp. (If you can find a way to make it halt on TIO, mock me mercilessly) @ovs figured one out which depends on the fact that...

TIO does not implement the = instruction, making it behave like r. When the reversed IP encounters p, it deletes > from the program start, allowing the IP to run backwards to q_. This could be fixed by adding a leading space to the program (and replacing de+ with ee+).

To run the program:

  1. Save the above code to a file somewhere
  2. Run BefungeSharp (it will probably work under Wine)
  3. Press 2 (open file) and find the file you saved from before
  4. (Press any key to continue)
  5. Press a key from F2 to F5 to run (F2 = slow, F5 = fast)
  6. Hit F12 to stop execution, and alt-R to reload

The program won't halt on TIO or CCBI. (I blame ambiguous Funge-98 specs.) Inputs which crash BefungeSharp do not count.

& asks for a number, so input a number. To save you some time, the program ignores negatives.

Hactar

Posted 2017-07-24T15:46:45.840

Reputation: 646

It halts for 1 on TIO, but I don't think this is the intended solution. – ovs – 2017-07-25T11:39:54.160

Indeed, it is not, @ovs. Since I can't reproduce that in BefungeSharp, it's very difficult to figure out what's going on. I think that = causes the instruction pointer to reverse delta (proper way for an interpreter to handle unimplemented instructions). I hadn't thought of that, but I suppose it's valid! – Hactar – 2017-07-25T11:51:05.350

Does this have something to do with integer overflow? – pppery – 2017-07-30T03:08:48.250

@ppperry Nope. Just pure arithmetic and ASCII – Hactar – 2017-07-30T10:43:33.770

1

anyfix, 13 bytes Cracked

ɠ#5+¿2«*"ḶİP»

Try it online!

Another easy one, hopefully nobody just bruteforces it :(

-5

Skidsdev

Posted 2017-07-24T15:46:45.840

Reputation: 9 656

Cracked. – Veedrac – 2017-07-26T03:25:17.597

1

JavaScript (ES6), 61 bytes (cracked)

a=>{while(!Array.isArray(a)||!a.length);a.map(_=>{for(;;);})}

Intended solution:

new Array(1) or any empty array with positive length

kamoroso94

Posted 2017-07-24T15:46:45.840

Reputation: 739

to easy: https://codegolf.stackexchange.com/a/135654/72288

– Jonas Wilms – 2017-07-25T12:53:23.477

1

JavaScript (Node.js), 43 bytes (cracked)

Thought I'd try my hand at being a copper! Should be a fun one. I trust you guys but if for some reason it's too hard I'll add hints.

Solution does not require an error, if you somehow error I'll post an update with a try/catch ;)

x=>{while(!Number.isInteger(x)||x-2!=x-3);}

Try it online!

Solution:

The offered solution: 100000000000000000
Intended solutions (the closest to zero for which this works): Number.MAX_SAFE_INTEGER+7 or -Number.MAX_SAFE_INTEGER-3

You just need to go out of safe integers and test a little to get the right floating point inconsistency.

Haumed Rahmani

Posted 2017-07-24T15:46:45.840

Reputation: 141

1Cracked! – NieDzejkob – 2017-07-25T14:01:02.990

1

JavaScript (ES6), 27 bytes (Cracked, Cracked - both unintended) (Intended Cracked)

x=>{while(!(x&&x==false));}

The other cracks were genius, but the intended crack [] or new Array(). Empty array in JavaScript is truthy, but == false.

Try it online!

Stephen

Posted 2017-07-24T15:46:45.840

Reputation: 12 293

Cracked – Cristian Lupascu – 2017-07-25T14:47:24.153

@w0lf intended solution doesn't involve using any custom objects, but nice job on that :) – Stephen – 2017-07-25T14:49:12.113

cracked – Dennis – 2017-07-25T14:50:13.617

@Dennis that's genius 0.o but not what I had in mind either – Stephen – 2017-07-25T14:51:12.970

cracked – Dennis – 2017-07-25T14:53:40.167

@Dennis yup that's it. – Stephen – 2017-07-25T14:54:19.487

1

JavaScript, 28 bytes (Cracked here and here)

x=>{while(!(x&&1+x!==1+x));}

Both cracks were unexpected and I find them very clever (that's why I love this site). The crack I intended was {valueOf: function(){}}.

Cristian Lupascu

Posted 2017-07-24T15:46:45.840

Reputation: 8 369

Cracked (the lazy way). – Veedrac – 2017-07-25T19:26:16.797

@Veedrac Great job! Although not exactly what I had in mind. I've added error handling - can you beat level 2? :)

– Cristian Lupascu – 2017-07-25T20:13:59.447

Another Crack – tsh – 2017-07-26T05:37:28.750

1

Python 3, 143 bytes (cracked)

try:x=int(input())
except:x=0
p=c=n=0
while x:
 b=x&511
 while (p|c|n)&b or b&(b-1):0
 p|=b;c|=b;n|=b;x>>=12;p>>=1;n*=2
while (x+1)/(c-511)<1:0

Not enough math-y ones, which makes sense but is kind'a sad. This one isn't particularly competitive, but it's different to most.

Try it online.

Veedrac

Posted 2017-07-24T15:46:45.840

Reputation: 711

Bonus points for the provably smallest answer. – Veedrac – 2017-07-25T15:10:53.470

Really nice challenge! Cracked.

– Cristian Lupascu – 2017-07-25T21:54:07.297

@w0lf Nice work yourself :). – Veedrac – 2017-07-25T22:08:05.113

I have updated my answer with an explanation of how I arrived to this number. Is it true that it's the smallest? I haven't been able to find a smaller one. – Cristian Lupascu – 2017-07-26T07:20:01.987

@w0lf Good explanation. Not the smallest. – Veedrac – 2017-07-26T11:21:13.960

I'm not so good with words... :) – Cristian Lupascu – 2017-07-26T11:46:57.317

@w0lf To be totally clear, I'm saying your solution is not the smallest, not making a comment on the size of your explanation. – Veedrac – 2017-07-26T12:22:26.230

OK, I found a smaller one: 324518708703458241391526482018336 – Cristian Lupascu – 2017-07-26T13:44:42.757

@w0lf Also not the smallest. – Veedrac – 2017-07-26T14:25:09.287

1OK, it's 79305685030021641783052861456. I was stubborn trying to find it by hand, but this time I wrote a program to find the answer. – Cristian Lupascu – 2017-07-26T19:18:38.647

@w0lf That looks about right :). Did you notice the similarity to the N queens problem? – Veedrac – 2017-07-27T02:36:56.387

Yes, I did. :) Except these "queens" only attack below and on the sides.. – Cristian Lupascu – 2017-07-27T04:03:59.237

1

SmallTalk, 136 bytes (not a concise language‼) (cracked)

|n p|n:=stdin nextLine asInteger abs. p:=2 raisedTo:n.[(p printString:3)sorted=(p+p printString:3)sorted and:[n\\5=1]]whileFalse:[nil]

Not a TIO language, but GNU SmallTalk is easily available.

Edited so that the program halts quickly on CodingGround. The solution is now really easy!

Code reads the input from the console.

The intent with the original code using n\\239=0 was for the robber to discover the pattern of the numbers without including a modulus criterion: 5 27 40 92 138 929 1086 ..., searching for "5 27 40 92 138 929 1086" in Google brings up one match providing five more terms. The last term is divisible by 239. Anyway, this term is too large to validate in under 30 seconds in any version of SmallTalk. So I had to pick the largest term which could finish fast enough, which was 1086. Even the next term 352664 in the sequence after 1086 takes more than an hour to validate in SmallTalk!

user15259

Posted 2017-07-24T15:46:45.840

Reputation:

Help plz? Does the answer work on https://www.tutorialspoint.com/execute_smalltalk_online.php? For bonus niceness, does it halt within ~60s?

– Veedrac – 2017-07-26T00:58:44.537

@Veedrac - I noticed now the rules say it must halt in < 30 seconds. Have changed the code, it's now much easier! – None – 2017-07-26T21:50:53.883

"really easy". Why do I not trust you... :P – Veedrac – 2017-07-26T22:17:48.237

Cracked. I should have more faith! A shame you had to make it easier; I've not given up on the original though. – Veedrac – 2017-07-26T22:40:33.220

@Veedrac - Good luck! Hint: remove the modulus check, put in an incrementing loop and see what numbers come out. Don't look at the spolier! – None – 2017-07-27T00:26:02.237

2Well I've found my new wallpaper. – Veedrac – 2017-07-27T00:48:26.130

I think it might be 30490425, but I'm entirely unable to test it right now. – Veedrac – 2017-07-27T11:57:59.263

Correct for the original challenge. Given 352664 takes about 2½ hours to validate, that term might take 10 months! O(n²) time. – None – 2017-07-28T02:28:44.653

(reads spoiler) Ah, that's what you meant when you said to remove the modulus check. I just brute-forced it! – Veedrac – 2017-07-28T02:44:53.543

Coincidentally 2½ hours is about as long as it took to brute-force :P. – Veedrac – 2017-07-28T02:51:56.677

1

JavaScript (ES6), 119 bytes, Cracked

x=>{try{while(typeof x!="string");x=x.trim();while(!(x.length==6&&x[4]==" "&&eval(x)===undefined));}catch(e){for(;;);}}

While cracking this with the usual JavaScript prototype changing and object stuff is probably possible, the intended solution is a regular old string.

"void 0" evaluates to undefined.

Try it online!

Stephen

Posted 2017-07-24T15:46:45.840

Reputation: 12 293

Cracked. Is this the intended solution? – programmer5000 – 2017-07-25T15:21:19.073

1

Java 8, 47 bytes, Cracked

p->{for(;p==null||p.isEmpty()||!p.isEmpty(););}

This is a lambda of type Consumer<List>. Basically, it will run as long as the list is null, empty, or non-empty... The answer to this one is pretty simple, I'll try and come up with a truly difficult one for my next answer :)

Try it online! (Note, you will have to edit in the input in the function call in the footer)

Just FYI, the intended solution terminates in ~3 seconds (including compilation), so it should be crackable on TIO.

Socratic Phoenix

Posted 2017-07-24T15:46:45.840

Reputation: 1 629

Cracked. – Veedrac – 2017-07-25T16:24:58.140

1

JavaScript (ES6), 42 bytes, Cracked

x=>{while(!(Array.isArray(x)&&x==",,,"));}

An empty array of length 4 (new Array(4)), when coerced into a string with ==, becomes ,,,.

Try it online!

Stephen

Posted 2017-07-24T15:46:45.840

Reputation: 12 293

Cracked. – totallyhuman – 2017-07-25T16:19:11.690

1

R, 44 bytes (cracked and cracked)

f=function(x)while(1)if(length(x))grep(x,'')

This halts if grep(x,'') receives invalid regex, which was the intended solution. Also fails when given a function as input.

JAD

Posted 2017-07-24T15:46:45.840

Reputation: 2 898

Cracked. – Veedrac – 2017-07-25T21:17:45.547

Also cracked – Gregor Thomas – 2017-07-25T21:22:24.037

1

JavaScript, 52 bytes (Cracked again)

x=>{while(1){try{if(x&&1+x!==1+x)break;}catch(e){}}}

Cristian Lupascu

Posted 2017-07-24T15:46:45.840

Reputation: 8 369

1Cracked. – Veedrac – 2017-07-25T20:36:58.373

1

R, 63 bytes (cracked)

f=function(x){set.seed(4);try(eval(x));x=rpois(1,1);while(x){}}

Gregor Thomas

Posted 2017-07-24T15:46:45.840

Reputation: 271

Cracked. – Veedrac – 2017-07-26T03:10:37.003

1

R, 60 bytes, cracked

f=function(x)while(1)tryCatch(eval(x),error=function(e)NULL)

tryCatch prevents exiting through errors or any kind, so the only way to exit is to call quit() or q().

JAD

Posted 2017-07-24T15:46:45.840

Reputation: 2 898

Cracked. – Veedrac – 2017-07-26T11:42:43.963

Also Cracked – Rift – 2017-07-26T11:44:42.620

@Rift oh damn, I thought I tested that, but I forgot the expression. – JAD – 2017-07-26T11:45:59.167

@JarkoDubbeldam you should not have included eval – Rift – 2017-07-26T12:18:39.860

@Rift Hmm, an earlier iteration had x() instead. However, that doesn't immediately terminate with q, but rather prompts for saving workspace and yadda yadda. – JAD – 2017-07-26T12:23:17.437

@JarkoDubbeldam eval(q()) and q() both ask for saving workspace. I guess q("no") would be better. – Rift – 2017-07-26T15:03:12.200

@rift which needs Eval to work :) – JAD – 2017-07-26T15:39:54.797

1

Python 3.5, 69 bytes, Cracked

def f(x):
 y=str(x)
 while not(x and(y[-1]+y[:-1])==str(2*x)):a=1

There is a solution that is an integer.

Cracked by isaacg (in 11 min) and Jarko Dubbeldam.

Magenta

Posted 2017-07-24T15:46:45.840

Reputation: 1 322

105263157894736842 – isaacg – 2017-07-26T06:21:11.537

@isaacg while true, can you make a post on the robbers thread that I can link to? – Magenta – 2017-07-26T06:41:29.003

This seems to work for more than one solution: 210526315789473684, 421052631578947368 and more – JAD – 2017-07-26T06:57:44.070

I added these solutions to a post on the robbers thread and edited the link. – JAD – 2017-07-26T11:14:18.360

1

R, 134 bytes (cracked)

f=function(x)if(tryCatch(!is.function(x)|identical(x,q)|identical(x,quit)|identical(x,is.list)|!x(list()),error=function(e)1))repeat{}

JAD

Posted 2017-07-24T15:46:45.840

Reputation: 2 898

Cracked? – Mischa – 2017-07-26T14:41:08.437

@MischaBehrend Not the intended solution, and arguably not even a solution, since the quitting happens in the definition of the argument, not while executing the function. – JAD – 2017-07-27T07:31:08.500

Cracked? by @CriminallyVulgar. – TheLethalCoder – 2017-07-27T13:01:56.593

Cracked. I didn't consider that option. Since my intended solution isn't found, I'll make a new version without showing it here. – JAD – 2017-07-27T13:12:56.270

1

BASIC, 8 bytes (Cracked)

1input x

Meets the conditions of the OP completely, other than TIO which was a request not a condition.

Try it.

It'll hang forever (machine stability required) and terminate predictably within << a second of any input. Probably not what the OP meant but perfectly fair. Alls fair in love and golf!

Stilez

Posted 2017-07-24T15:46:45.840

Reputation: 201

1Hey! Don't give away what the input is. Other people are meant to guess it! (Also, apostrophe.) – wizzwizz4 – 2017-07-26T15:04:46.733

Heheeeee! Shall we tell them? After all, anyone inspecting it can work it out. – Stilez – 2017-07-26T15:09:27.000

Cracked! – NieDzejkob – 2017-07-26T15:58:16.387

1

CPython 3.6, 634 bytes, Cracked

Fixed a misplaced try: statement that allowed 1/0 and even no input to break things. Original.

try:j=input();__builtins__.__dict__["__import__"]=eval(j);import random,functools,itertools,zlib;exec("@functools.lru_cache(None)\ndef f():i=input();return(all(x is y for x,y in itertools.zip_longest((x for x in sorted(dir(eval(i[::2])))if'_'not in x),sorted{}))\nand all(x is y for x,y in itertools.zip_longest((x for x in sorted(dir(eval(i[1::2])))if'_'not in x),sorted{}))and 8 and zlib.crc32(bytes(i,'ASCII'))==zlib.crc32(bytes(j,'ASCII')))".format(*eval('('+"(tuple(''.join(random.choice('abcdefghijklmnopqrstuvwxyz')for x in range%s)for x in range%s),),"%(("(random.randint(1,9))",)*2)*2+')')));f()
except:f=bool
while not f():8

wizzwizz4

Posted 2017-07-24T15:46:45.840

Reputation: 1 895

Nice try, but cracked

– pppery – 2017-07-26T15:48:52.467

@ppperry That is indeed a valid solution. – wizzwizz4 – 2017-07-26T15:54:33.057

@wizzwizz4 From the question: If a robber cracks your submission, please mark it as cracked and show the halting input (in a > ! spoiler quote). (this will make the included snippet behave correctly) – NieDzejkob – 2017-07-27T17:06:19.340

@NieDzejkob Oops! I forgot to do that. Fixed. – wizzwizz4 – 2017-07-27T17:21:18.823

1

C++ (gcc/MSVC), 63 bytes, cracked (fixed)

template<class T,T=T()>T f(T t){for(auto a=0ll;!a;(T&)a=t={});}

Tested on Linux and Windows. To compile with MSVC, use #pragma warning(default:4716).

Veedrac spotted that by supplying template parameters it's possible to make T a reference type, allowing a class type with user-defined constructor. Fixed in the newer version by disallowing reference types using *.

Try it online!

ecatmur

Posted 2017-07-24T15:46:45.840

Reputation: 1 675

Are we allowed to specify the template parameters to f when calling it? – Veedrac – 2017-07-26T17:43:58.337

@Veedrac yes, certainly - as long as it compiles (and doesn't crash before entering f) any parameters are fine. – ecatmur – 2017-07-26T17:49:10.963

... although my intended solution doesn't require any template arguments to be supplied. – ecatmur – 2017-07-26T18:10:01.293

1

Ugh, cracked I guess.

– Veedrac – 2017-07-26T18:40:19.587

@Veedrac I didn't intend to allow reference types! Fixed to disallow those - want to have another go? – ecatmur – 2017-07-26T20:01:50.087

To be consistent with other unexpectedly-cracked challenges, you should probably post the update in a new submission. – Veedrac – 2017-07-26T21:19:49.200

@Veedrac thanks, I'll do that. Might have to wait till tomorrow as I'm on mobile here. – ecatmur – 2017-07-26T21:24:29.650

@Veedrac new version is at https://codegolf.stackexchange.com/a/136043/967

– ecatmur – 2017-07-27T09:48:08.717

1

JavaScript (Browser), 62 bytes (cracked)

x=>{while(!x||(!(x[Symbol.toPrimitive]=()=>true))||+x||true);}

Solution should work in modern browsers on all pages. Is possible without .toPrimitive (or similar) trickery (cracked) - is also possible with .toPrimitive (or similar) trickery (cracked) :P

Intended solutions:

W/o .toPrimitive or similar:

let i = document.createElement("iframe");
i.src="https://google.com";
i.onload=a=>f(i.contentWindow);
document.body.appendChild(i);

W/ .toPrimitive

Birjolaxew

Posted 2017-07-24T15:46:45.840

Reputation: 323

Cracked. – Veedrac – 2017-07-26T23:07:56.380

@Veedrac Nice! Now we just need the solution without .toPrimitive. – Birjolaxew – 2017-07-27T06:22:46.193

@PatrickRoberts I'd say that counts ;) – Birjolaxew – 2017-07-27T21:56:55.787

Cracked – Patrick Roberts – 2017-07-27T22:40:25.527

1

Pyth, 18 bytes, Cracked

J<w17#.x$eval(J)$0

Code

You must give an input - it'll just hang waiting for input and not terminate otherwise.

isaacg

Posted 2017-07-24T15:46:45.840

Reputation: 39 268

Cracked. – Veedrac – 2017-07-27T01:20:29.257

@Veedrac Darn - not what I intended. I'll have to try again. – isaacg – 2017-07-27T02:29:02.207

1

Python 3, 67 characters (cracked)

An easy one, though this one is actually worth knowing so I thought I'd throw it in anyway.

import shutil,sys
while 1:shutil.copyfileobj(sys.stdin,sys.stdout)

Input goes in stdin.

Veedrac

Posted 2017-07-24T15:46:45.840

Reputation: 711

Am I correct to assume that this will only work with certain locales? If so, cracked.

– Dennis – 2017-07-27T03:32:47.243

@Dennis Yeah, I would have specified but I figured a hint wasn't needed on a question this simple. – Veedrac – 2017-07-27T03:43:37.360

1

R, 145 bytes (Version 2.0)

f=function(x)if(tryCatch(x=="length"|x=="q"|x==".Internal"|x=="quit"|x=="is.list"|!getAnywhere(x)$objs[[1]](list(0)),error=function(e)1))repeat{}

R, 145 bytes Cracked

f=function(x)if(tryCatch(x=="length"|x=="q"|x==".Internal"|x=="quit"|x=="is.list"|!getAnywhere(x)$objs[[1]](list(1)),error=function(e)1))repeat{}

Modification of this answer. Creating your own version of is.list won't work this time :)

JAD

Posted 2017-07-24T15:46:45.840

Reputation: 2 898

1Cracked – Gregor Thomas – 2017-07-27T19:57:50.617

@Gregor nicely done! See if you can crack this! – JAD – 2017-07-27T20:36:55.737

1

JavaScript (ES7), 25 bytes, Cracked

x=>{for(;!(x&&"."**x););}

Intended solution:

"0"

Try it online!

Stephen

Posted 2017-07-24T15:46:45.840

Reputation: 12 293

Cracked?. – Shaggy – 2017-07-27T16:38:57.563

@Shaggy yup, there's a couple other (equivalent) solutions – Stephen – 2017-07-27T16:45:36.407

Yeah, I also just found that String.prototype works too. – Shaggy – 2017-07-27T16:46:14.700

@Shaggy why the flippity flappity does String.prototype == false – Stephen – 2017-07-27T16:47:10.367

Because JS is weird?! Array.prototype also works but, strangely, Object.prototype doesn't. – Shaggy – 2017-07-27T16:49:34.727

1

Befunge 93, 13 bytes, cracked by ovs

13 bytes: if you crack me you will get bad luck forever!!! ~Spooky~

~345**-0/#v_@

Unfortunately this one's pretty crackable.

Daniel

Posted 2017-07-24T15:46:45.840

Reputation: 6 425

Cracked – ovs – 2017-07-28T06:34:52.637

1

Lua, 107 Bytes, Cracked

I hate how verbose lua is - getting inputs takes up almost half the program.

x=tonumber(io.read())or 2 y=tonumber(io.read())or 2 if y^(x%5)+x*y+y~=x^3-(x-120)*x then while 1 do end end 

I tried to account for all trivial solutions - hopefully this works.

Nico A

Posted 2017-07-24T15:46:45.840

Reputation: 2 390

Is this harder than solving an equation? Cracked.

– user202729 – 2017-07-29T14:19:31.970

Just for fun, here's my attempt at golfing the code :)

– tehtmi – 2017-08-06T09:51:51.537

@tehtmi Wow! I didn't try hard to golf this one, but I definitely couldn't have done what you did. I'm still on Lua 5.1, can you explain the "..." to me? – Nico A – 2017-08-06T18:28:40.430

... is used for "vararg" functions. E.g. function myprint(category,...)print("My Print ["..category.."]:",...)end. If ... is used at the end of an expression list (arguments or assignment), it is like arg1, arg2, arg3, -- and so on. x,y=... is like x,y=arg1,arg2. When running from the command line, the outer-level of the script is implicitly a function and the command line arguments are passed to it. E.g. lua my_script.lua arg1 arg2. The arguments are also in a table called arg which also includes the others components of the command line call at arg[0], arg[-1], etc. – tehtmi – 2017-08-06T19:27:19.667

@tehtmi Wow, I knew that, but I never thought of taking input from command line... this really helps one of the programs I'm working on. Thank you! – Nico A – 2017-08-07T00:52:50.537

1

JavaScript (Node.js >= 6.0), 708 694 bytes, Cracked

(_=>{let v=s=>eval(s);{let e=require('events').EventEmitter.prototype;e.listeners=new Proxy(e.listeners,{apply(t,c,a){if(a[0]=='exit')return[];return t.apply(c,a)}});e.removeAllListeners=new Proxy(e.removeAllListeners,{apply(t,c,a){if(a[0]=='exit')return c;return t.apply(c,a)}});let w=new WeakSet();Proxy.revocable=new Proxy(Proxy.revocable,{apply(t,c,a){let r=t.apply(c,a);w.add(r.proxy);return r}});Proxy=new Proxy(Proxy,{construct(t,a,n){let p=new t(...a);w.add(p);return p}});let l=_=>{while(1);};process.on('exit',l);return i=>{try{if(!w.has(i)&&i instanceof Function&&typeof i!='function'&&v(String(i))===i&&i()===String(i)){process.removeListener('exit',l)}else{l()}}catch(o){l()}}}})()

Don't let the size deter you. Most of it is to just prevent you from trying to get past my intended solution doing the "obvious" stuff.

I hope this isn't more simple than I thought it was, but I assure you it's possible. I've tested on my computer and also on TIO to make sure it wasn't dependent on a particular version of Node.js or something.

This is a function submission, so assign it to a variable and call it with your intended input.

And maybe I'm not supposed to enforce this, but the input for the intended crack doesn't require any pre-processing, it can just be solved by doing this:

f=[708 bytes...]
f([your input])

Comment on @hvd's crack

I will reveal one part of the intended solution, since it is no longer relevant, and hvd's approach was much more elegant anyway.

Object.create((class extends Function{toString(){process.kill(0)}}).prototype)

would have been how I would have written that particular crack, since I had not thought of using __proto__ in an object literal, so kudos.

Edit 1

Sorry, forgot to invoke the IIFE, otherwise any input would have worked :P

Edit 2

This doesn't change the challenge at all, it just addresses the comment claiming

Halts with error, let not supported without strict mode. If fix t(...a) is unexpected token.

by explicitly defining the accepted range of versions in which these errors don't occur, making the challenge valid.

Edit 3

By moving the call to process.on('exit',l) from the function call into the IIFE scope, I prevented the stupid input of

process.on=()=>process.exit()

from working. An interesting side-effect of this change is that not calling the function causes the program to hang as well!

However, the intended solution is still the same, and the rest of the changes were only for golfing purposes. Carry on!

(And the timer for marking "safe" has been reset as of this edit because it is major)

Patrick Roberts

Posted 2017-07-24T15:46:45.840

Reputation: 2 475

1A slightly easier to work with TIO – Birjolaxew – 2017-07-28T12:03:46.687

@Birjolaxew Heh, I see you've discovered the basics of my challenge, but the question remains if you can find the answer~ (at least I hope I've narrowed it to one) – Patrick Roberts – 2017-07-28T12:33:48.510

1

@PatrickRoberts I got stuck on implementing [[Call]] without typeof i === "function" (since that's how the specification defines typeof === "function" :P)

– Birjolaxew – 2017-07-28T12:37:36.033

@Birjolaxew then how do you explain var call = Function.call; console.log(typeof call); call()? I'm not saying it's entirely useful here, but I'm just playing devil's advocate. – Patrick Roberts – 2017-07-28T14:05:47.747

@Birjolaxew if I just found an unintended solution, should I update the challenge or wait for someone to crack it before updating? – Patrick Roberts – 2017-07-28T15:07:35.693

@PatrickRoberts I'd probably just update the challenge, and make an edit mentioning the change. It'd be another thing if it had already been cracked. – Birjolaxew – 2017-07-28T15:59:37.757

@Birjolaxew done – Patrick Roberts – 2017-07-28T16:16:05.617

By the way, your code (var call = Function.call; console.log(typeof call);) gives "function", exactly as expected.

– Birjolaxew – 2017-07-28T22:05:24.557

@Birjolaxew oh I know, but my point was it doesn't implement [[Call]] on its own, so that definition doesn't apply to everything. – Patrick Roberts – 2017-07-28T22:14:33.147

But it does implement [[Call]] through its prototype, just like all other functions.

.call also is not the same as the internal [[Call]]. – Birjolaxew – 2017-07-28T22:15:45.673

"And maybe I'm not supposed to enforce this" -- you should enforce this, to prevent something like function WeakSet(){process.exit()} from being used in an answer. :) – hvd – 2017-07-30T18:38:19.327

@hvd that wouldn't work since the IIFE is already assumed to be invoked – Patrick Roberts – 2017-07-30T21:22:32.650

1@PatrickRoberts It does work, because the IIFE sees the WeakSet function definition even if it appears later in the code at a point where execution hasn't reached yet. – hvd – 2017-07-30T21:41:15.280

@hvd ah right, hoisting, fair point... – Patrick Roberts – 2017-07-30T22:53:14.263

Cracked, but probably not the way you were going for. – hvd – 2017-07-30T23:30:52.313

1

Python, 19 bytes (cracked)

while(lambda:1)():0

How to input:

Write any code above this statement, following some simple restrictions against low-hanging fruit:

  • The line must be reached, unconditionally. A solution must reach this line even in unlikely scenarios.
  • No threads or processes may be spawned,
  • The solution must run on Python 2 (CPython and PyPy) and Python 3 (CPython).

Try it online (Python 2, CPython).
Try it online (Python 2, PyPy).
Try it online (Python 3, CPython).

Veedrac

Posted 2017-07-24T15:46:45.840

Reputation: 711

1cracked – pppery – 2017-07-30T21:23:01.740

1

Python 2, 143 bytes (cracked)

from sys import*
def l(*_):
 while 1:1
t=lambda*_:l;p=lambda*_:_[1][1]=="_"and l()or settrace(t)
def k(f):
 setprofile(p)
 try:f()
 finally:l()

The warmup was handled faster than expected, so let's go straight to the deep end. Pass one argument to k by appending code to this program. That argument may be initialized imperatively.

  • Don't modify k or its dependencies before calling it; you must break k from within. Similarly, don't call sys.setprofile or perform other interpreter modifications when initializing the argument.

  • No threads or processes may be spawned,

  • The solution must run on CPython and PyPy,

Try it online (CPython).
Try it online (PyPy).

Veedrac

Posted 2017-07-24T15:46:45.840

Reputation: 711

cracked – pppery – 2017-07-31T02:41:06.753

1

Swift 3, 77 bytes (safe)

extension Bool{prefix static func !(b:Bool)->Bool{return true}}
while !true{}

To solve this, put your code before or after this statement.

  • Your solution must:
    • keep this statement intact, without modifying its code
    • actually let this statement run
      • Simply commenting it out, calling fatalError(), etc. before it doesn't count.
    • modify the behavior of this statement to prevent it from looping forever
  • The solution does not involve crashing the program.

This code is a refinement of my previous (cracked) attempt, here.

The first line of this code exists solely to prevent the exploit found by @Veedrac.
true in while !true is not actually a Bool. It's a boolean literal. Any type that conforms to ExpressibleByBooleanLiteral can be initialized from a boolean literal. Usually, the correct ExpressibleByBooleanLiteral to be instantiated is inferred from the context where it's needed. If, such as in this case, the context does not provide any type information as to the kind of ExpressibleByBooleanLiteral needed, the compiler falls back to choosing BooleanLiteralType as the default.

By default, the value of BooleanLiteralType is Bool. This makes sense. In the absence of contextual type information, true and false are both used to initialize instances of Bool. Interestingly, BooleanLiteralType can be overridden locally. My solution exploits this by creating a ExploitBool type, and sets it to be the preferred type for boolean literals, so the true in while !true is actually an instance of ExploitBool. I then define a prefix ! operator, so that for all instances x of ExploitBool, x returns true as a Bool.


    // First, set up the exploitive data type we need:
    struct ExploitBool: ExpressibleByBooleanLiteral {
        init(booleanLiteral _: Bool) {
            // ignore booleanLiteral, we don't care about it
        }

// Define the prefix ! as an operator that acts on a ExploitBool, // and always just returns false (as a regular Bool) prefix static func !(b: ExploitBool) -> Bool { return false } }
// Then, set it as the preferred type to instantiated from //boolean literals in the absense of other contextual type information. typealias BooleanLiteralType = ExploitBool
extension Bool{prefix static func !(b:Bool)->Bool{return true}} while !true{}

Alexander - Reinstate Monica

Posted 2017-07-24T15:46:45.840

Reputation: 481

1

JavaScript (Node.js), 99 bytes

x=>{try{while(typeof x!='string'||!x.match`^[()[\\]!+]{4321}$`|eval(x)!='☆');}catch(e){for(;;);}}

Try it online!

l4m2

Posted 2017-07-24T15:46:45.840

Reputation: 5 985

Cracked – KeroppiMomo – 2019-07-16T03:38:55.663

1

x86-64, 5 bytes assembled, SAFE

halty:
  verr si
  jnz $
  ret

This is a pretty simple "warm up" I came up with. Shouldn't be difficult at all to crack. Takes input in rsi.

Why did this win.

The solution is simple, at least on my computer. rsi == 32 will cause it to halt. In fact, it has multiple possible inputs that will cause it to halt. verr checks if the segment supplied in %r can be read. IF it can't, the zero flag is set, and the function returns.

moonheart08

Posted 2017-07-24T15:46:45.840

Reputation: 693

I think a 0 as input would halt this one (line 3 is jump if not zero). I don't have a way to run it and check though. – Draco18s no longer trusts SE – 2018-10-15T00:19:32.657

1

Simplefunge, 1028 bytes, safe

0ooooooooooooooooooooooOOOOOOOOOOOOoo9ooOOoOOoOOoOoOOoOoOoOOOOoOoOoOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoooooooooooIOoOoOoOoOOoOOooOOo-ov
ooooOOOOooOOoOOoOOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoooooooooooooooooooOOOOOOOOooooooo
ooooOOOOooOOoOOoOOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoooooooooooooooooooOOOOOOOOooooooO
ooooOOOOooOOoOOoOOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoooooooooooooooooooOOOOOOOOooooooo
ooooOOOOooOOoOOoOOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoooooooooooooooooooOOOOOOOOooooooO
ooooOOOOooOOoOOoOOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoooooooooooooooooooOOOOOOOOooooooo
ooooOOOOooOOoOOoOOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOo@oooooooooooooooooooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoooooooooooooooooooOOOOOOOOoooooH

The answer is the tab character

Try it online!

MilkyWay90

Posted 2017-07-24T15:46:45.840

Reputation: 2 264

1Um, this halts with no input – Jo King – 2019-02-24T23:33:02.127

Oh, okay. Does that count? – MilkyWay90 – 2019-02-24T23:40:30.130

0

programmer5000

Posted 2017-07-24T15:46:45.840

Reputation: 7 828

1Cracked – Gavin S. Yancey – 2017-07-24T21:51:54.850

Cracked – Naruyoko – 2019-07-18T03:57:04.367

0

JavaScript, cracked

x=>{try{for(;x.x||!x.x;);}catch(e){for(;;);}}

Try it online!

Grant Davis

Posted 2017-07-24T15:46:45.840

Reputation: 693

https://codegolf.stackexchange.com/a/135569/44718 – tsh – 2017-07-25T03:24:02.210

0

Java (OpenJDK 8), 517 bytes (safe)

import java.lang.reflect.Constructor;
import java.util.Map;
class M{
	public static void main(String[] cm){
		try{
			Class<?>cl=Class.forName(cm[0]);
			Constructor<?>ct=cl.getConstructor();
			Map<Integer,Integer>m=(Map)ct.newInstance();
			String str="Hello World";
			for (int i=0;i<str.length();i++){
				char c=str.charAt(i);
				int cc=m.getOrDefault(new Integer(c),new Integer(0));
				cc++;
				m.put(new Integer(c),new Integer(cc));
			}
			while(m.size()<9);
		}catch(Throwable t){
			while(true);
		}
	}
}

Try it online!

Input via the command line arguments.

A little long and verbose, but hey, it's got reflection!

Golfed a little more, 432 bytes

(Thanks to Stephen!)

import java.lang.reflect.Constructor;import java.util.Map;class M{public static void main(String[]a){try{Class<?>l=Class.forName(a[0]);Constructor<?>t=l.getConstructor();Map<Integer,Integer>m=(Map)t.newInstance();String s="Hello World";for(int i=0;i<s.length();i++){char c=s.charAt(i);int C=m.getOrDefault(new Integer(c),new Integer(0));C++;m.put(new Integer(c),new Integer(C));}while(m.size()<9);}catch(Throwable t){while(true);}}}

Halting input:

java.util.IdentityHashMap

Jonathan S.

Posted 2017-07-24T15:46:45.840

Reputation: 423

It seems very long to me for a code-golf. – Toto – 2017-09-13T12:34:15.300

Welcome to PPCG! I know this is [tag:cops-and-robbers], but you can get 432 bytes by golfing variable names and whitespace: Try it online!

– Stephen – 2017-09-13T12:58:57.060

@Toto It's indeed not the golfiest thing in the world, but it does use some rather unusual features of Java. – Jonathan S. – 2017-09-13T13:04:37.727

@Stephen Thanks a lot! Had to leave the computer for a while and wanted to post the thing before I went. :) (Double comment because I can't mention two people at once) – Jonathan S. – 2017-09-13T13:05:59.720

0

BrainF - Cracked

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

Should be easy to reverse engineer it.

MilkyWay90

Posted 2017-07-24T15:46:45.840

Reputation: 2 264

Cracked – Draco18s no longer trusts SE – 2018-12-19T03:29:57.350

2What's BrainF? Do you mean brainfuck? – Jo King – 2018-12-19T03:48:19.973

1Yes I do, but I do not like cursing. – MilkyWay90 – 2018-12-20T00:12:25.880

-1

CPython 3.6, 635 634 bytes Cracked

j=input()
__builtins__.__dict__["__import__"]=eval(j)
import random,functools,itertools,zlib
exec("@functools.lru_cache(None)\ndef f():i=input();return(all(x is y for x,y in itertools.zip_longest((x for x in sorted(dir(eval(i[::2])))if'_'not in x),sorted{}))\nand all(x is y for x,y in itertools.zip_longest((x for x in sorted(dir(eval(i[1::2])))if'_'not in x),sorted{}))and 8 and zlib.crc32(bytes(i,'ASCII'))==zlib.crc32(bytes(j,'ASCII')))".format(*eval('('+"(tuple(''.join(random.choice('abcdefghijklmnopqrstuvwxyz')for x in range%s)for x in range%s),),"%(("(random.randint(1,9))",)*2)*2+')')))
try:f()
except:f=bool
while not f():8

Try it online!

It probably works in some other versions too, but I haven't tested it in them. Golfing advice welcome.

Note that triggering an EOFError is cheaty - this program expects streams to remain open!

I also have an ungolfed version, complete with terrible, terrible ASCII art, prettified output and probable cryptographic security.

import_input = input()
__builtins__.__dict__["__import__"] = eval(import_input)

import secrets
import functools
import itertools
import zlib
import base64

code = b"""
             GA2
   A      LGA  2     AL1ad        >eG
  @ >T   )Ec#  6     *  C       WM 2 +0    4.            ^1
 +   5  i      T    m   \'     J   ]   7  g                q
 e  `   -+     D V_4W  a ,    :C<  G  E*t
3   GW0P0V/bkg iU>       o    %hb  &  CM_
n      Y 1!SHJIUjh^     iZ    Ol5  %  =n4   Q`b   21   Z>A
R    l& j       iSDh  c>j  ;#  @h  E  ?l    B  W h  # u
di-90o @\\O"t6XNM8boo1T   /JHW     c        Y,@  H    N Ok
                        ?pDT:)     (        (    `    %  F
3<uEZ_BZ"\\hNA)a.1W_9\\)/e%/ROb    2        V     ?5   3q
c5g^O89kP>iuQ3`*GZHb>#u0%gcC_6(    i
L                           Es/    V
6                           >qD    m       H              6
,                           D;$    J        K            ,
                             :K    O              U   ?
                                 I0L(#               d
                                 =   C              9
                                                   `
f$g3<"""

alphabet = "abcdefghijklmnopqrstuvwxyz"
make_keyword = lambda l:"".join(secrets.choice(alphabet) for x in range(l))
exec(zlib.decompress(base64.a85decode(code)[::-1]).decode("ASCII").format(
    *eval('('+"(tuple(make_keyword(secrets.randbelow(20)+1)"
                "for x in range(secrets.randbelow(20)+1)),),"*2+')')))

try:
    f()
except:
    f = bool

while not f():
    print(secrets.randbelow(2), end="")

for byte in itertools.zip_longest(
    *(iter(bin(int.from_bytes(code, "big"))[2:]),) * 8, # bits in a byte
    fillvalue = 0):
    print("".join(byte), end="")

Try it online!

wizzwizz4

Posted 2017-07-24T15:46:45.840

Reputation: 1 895

cracked – pppery – 2017-07-26T15:18:00.610

2evaling code directly from input without error handling is a trivial way to get cracked – pppery – 2017-07-26T15:20:51.923

@ppperry Rematch?

– wizzwizz4 – 2017-07-26T15:36:52.407