[Question]
  [
*Inspired by [this](https://codegolf.stackexchange.com/q/210638/95792) challenge, which got closed. This is meant to be an easier, but no less interesting version of that.*
This is the cops thread of a [cops-and-robbers](/questions/tagged/cops-and-robbers "show questions tagged 'cops-and-robbers'") challenge. For the robbers thread, see [here](https://codegolf.stackexchange.com/q/213963/95792).
Cops will provide a program/function and a flag. Robbers will try to guess a password such that, when the password is given to the cop's program, the flag is outputted.
# Basic rules
* The language used should be provided.
* The flag, which can be an integer, string, or value of any other type, should be provided.
* The flag may be printed to STDOUT, returned from a function, or outputted using any of the other standard output methods, as long as you specify how it will be outputted.
* The program/function can take the password through STDIN, as a function argument, or using any of the other standard input methods, as long as you specify how the it will be inputted.
* A free online compiler/interpreter should also be linked, preferably with the cop's code already pasted in and ready to run.
# Some more rules
* There must be at least one valid password that causes your program to return the flag, and you should know at least one of those passwords when posting your answer.
* In case of a function submission, the cop should *also* include a full runnable program including the function either in the answer or in the linked online compiler/interpreter.
* If it is at all ambiguous what the type of the flag is, it must be specified.
* If a cop's description of the output is ambiguous (e.g. "`HashSet(2, 1)` should be printed"), robbers are allowed take advantage of that (e.g. print the string "HashSet(2, 1)" instead of an actual hashset)
* Forcing robbers to simply brute force the password is not allowed.
* The program must take input, and must output the flag when given the correct password. When not given the correct password, you are free to error, output something else, or immediately terminate. If your program never halts if given the wrong password, you must tell robbers of this behavior so no one waits around for the program to output something.
Cops's score will be the number of bytes their code takes up.
Cop answers will be safe if they haven't been cracked for two weeks.
# Example
Cop:
> 
> # Scala, 4 bytes
> 
> 
> 
> ```
> x=>x
> 
> ```
> 
> Flag: `Yay, you cracked it!` (an object of type `String` is returned from the lambda above)
> [Try it online!](https://tio.run/##K05OzEn8n5@UlZpcouCbmJmnkFpRkpqXUqzgWFCgUM2loFCWmKOQZqUQXFKUmZeuYGsHZ/2vsLWr@A9RkF6aWlysYKugFFBaolCZX1oEFclILUpVAhpSANRSkpOnkaYBFtfU5Kr9DwA "Scala – Try It Online")
> 
> 
> 
Robber:
> 
> Password: the string "Yay, you cracked it!"
> [Try it online!](https://tio.run/##K05OzEn8n5@UlZpcouCbmJmnkFpRkpqXUqzgWFCgUM2loFCWmKOQZqUQXFKUmZeuYGsHZ/2vsLWr@A9RkF6aWlysYKugFJlYqaNQmV@qkFyUmJydmqKQWaKoBDSlAKinJCdPI00DrFRTk6v2PwA)
> 
> 
> 
# Find Uncracked Cops
```
<script>site='meta.codegolf';postID=5686;isAnswer=false;QUESTION_ID=213962;</script><script src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'></script><script>jQuery(function(){var u='https://api.stackexchange.com/2.2/';if(isAnswer)u+='answers/'+postID+'?order=asc&sort=creation&site='+site+'&filter=!GeEyUcJFJeRCD';else u+='questions/'+postID+'?order=asc&sort=creation&site='+site+'&filter=!GeEyUcJFJO6t)';jQuery.get(u,function(b){function d(s){return jQuery('<textarea>').html(s).text()};function r(l){return new RegExp('<pre class="snippet-code-'+l+'\\b[^>]*><code>([\\s\\S]*?)</code></pre>')};b=b.items[0].body;var j=r('js').exec(b),c=r('css').exec(b),h=r('html').exec(b);if(c!==null)jQuery('head').append(jQuery('<style>').text(d(c[1])));if (h!==null)jQuery('body').append(d(h[1]));if(j!==null)jQuery('body').append(jQuery('<script>').text(d(j[1])))})})</script>
```
  
[Answer]
# [PHP](https://php.net/), 89 bytes, [cracked](https://codegolf.stackexchange.com/a/214020/48931) by [Benkerd22](https://codegolf.stackexchange.com/users/98889/benkerd22)
```
<?php
$x=file_get_contents('php://stdin');
if(!preg_match('/.*golf.*/',$x))echo trim($x);
```
[Try it online!](https://tio.run/##DclJCoAgFADQvacoCByI3DfQUSTsO0DpR//C21vLx8OAve8nBmRTO1x8wHggY3MiSFQF/2fVutIdE5cbi06MWMCb9yIbBNeL8vlxi9J8npqUYEMeqMRX/Np6/wA "PHP – Try It Online")
Outputs `golf`, exactly.
[Answer]
# [Python 2](https://docs.python.org/2/), 94 bytes, [cracked](https://codegolf.stackexchange.com/a/214005/39531) by [Christian Mann](https://codegolf.stackexchange.com/users/39531/christian-mann)
Edited to reduce score. See [revision history](https://codegolf.stackexchange.com/posts/213978/revisions) for ungolfed version.
Another Python answer.
```
import re,sys
p=sys.stdin.read()
if re.match('^[exc\dhrkb\slim_=:;,.ants]*$',p):exec p;print a
```
[Try it online!](https://tio.run/##JclBCsMgEEDRfU7homBSREKXCTlJkxarUxxazTDOwpzeBrr5PPh0SNzzrTVMtLMoBlOO0tFy1hYJmC2DC/3Q4fucNjnxsdePO1S/hsif11q@mJ7LNBvrspTtetGGhgkqeEUzMWZRrrU/9Fj9GED/AA "Python 2 – Try It Online")
Flag is `0xc0de`. The output should be to STDOUT.
---
My solution was basically the same as Christian's:
The regex only accepts a very limited number of characters. Notable exclusions are all kinds of brackets, string delimiters, almost all operators and the `p` for `print` and `input`.  
`a='0xc0de'` doesn't match the regex, and `a=hex(49374)` neither.
With these restriction I don't know of a way to call any function that returns a value. I would be interested in counterexamples ;).  
One exception is `a==b`, which calls `a.__eq__(b)`, but since `q` is not available, you can only do this with builtin types.
The idea is to use the fact that `print a` calls `a.__str__` to get a string representation of the object `a`. This means we need to define an object `a` with a custom `__str__` method, which is then called by string.  
Instantiating objects is not possible without `()`, but luckily we can define methods on classes rather than instance objects using metaclasses.  
The metaclass is required to have an `__init__` function, that takes three arguments and returns `None`. A good choice for this is an `__init__` function of a different class.
This result into the final solution:
```
class b:
    __str__ = 49374 .__hex__
    __init__ = 0 .__init__
class a:
    __metaclass__ = b
```
[Try it online!](https://tio.run/##K6gsycjPM/r/PzknsbhYIcmKSwEI4uOLS4ri4xVsFUwsjc1NFPTi4zNSK@LjoZKZeZklYFkDkAyExwUxIBFmQG5qSSJYCKww6X9BUWZeiULifwA "Python 2 – Try It Online")
This doesn't work in Python 3 for two reasons:
* `int`'s dont have a `__hex__` method anymore.
* The syntax for metaclasses has changed. In Python 3 this would look like `class a(metaclass=b): ...`, which uses forbidden brackets
[Answer]
# [Python 2.7](https://docs.python.org/2.7/), 189 bytes, [cracked](https://codegolf.stackexchange.com/a/213970/15100) by [ovs](https://codegolf.stackexchange.com/users/64121/ovs)
```
import re
inp = raw_input()
if not re.match(r"^[\w\d=]*$", inp):
    quit()
exec(inp)
a = raw_input()
b = raw_input()
flag = a == b
if flag == True:
    print("%s %s"%(a, b))
```
[Try it online!](https://tio.run/##XY3BDsIgDIbvfYqGSAJm8WDixYSrT@DNqYHJHIkDZJDp0yO423po2q9f/vpvHJzd52xG70LEoAGM9SgwyPlephQZB9OjdfW4G2XsBhbI7dLO7UNctxvSYNH4EbDUO5nq64/uWKUAchWlVnv/ks@CiiZQQf20EIHnkPSS6oOxkRE6IZ0IZbJBxXnOUhzgVOR/@wE)
Flag is `The Flag`, output to STDOUT. This might be a bit easy, but hopefully still fun!
[Answer]
# [R](https://www.r-project.org/), 60 bytes, [cracked by Paul](https://codegolf.stackexchange.com/a/214194/86301)
```
function(x) chartr("zyxwvu", "RRRRRR", tolower(x[1] + x[2]))
```
[Try it online!](https://tio.run/##K/qfpmCr8D@tNC@5JDM/T6NCUyE5I7GopEhDqaqyorysVElHQSkIDICskvyc/PLUIo2KaMNYBW2FimijWE3N/2kahlZGmv8B "R – Try It Online")
As in [my previous challenge](https://codegolf.stackexchange.com/a/213985/86301), the flag to output is the string `"R"`. In other words, you need to find `x` such that `f(x)=="R"` is `TRUE`.
---
The solution is e.g. `as.roman(c(2, 3))`. This object is represented as `c(II, III)`; it is of mode `numeric` but of class `roman`. Since it is numeric, addition works, giving the roman integer `V`. But since it is of class roman, `tolower` coerces it to string, giving the string `"v"`. Then `chartr` translates this to `"R"`.
[Answer]
# [Haskell](https://www.haskell.org/), 246 bytes, [cracked by ovs](https://codegolf.stackexchange.com/a/214064/3852)
```
infix 0#
0:p#x=p#1:x
1:p#x:z=p#x:x:z
2:p#x:y:z=p#(y+x):z
3:p#x:y:z=p#(y-x):z
4:p#x:y:z=p#(y*x):z
5:p#x:y:z=p#div y x:z
6:p#x:y:z=p#y:x:y:z
7:p#x:y:z=p#y:x:z
c:p#x|(q,_:r)<-span(<c)p=r#until((==0).head)(q#)x
_#x=x
main=readLn>>=print.(#[]).take 60
```
[Try it online!](https://tio.run/##Xc9LCoMwEAbgfU4hZJO0VWIfFoLxBL2BiAS1GLQhPlqi9O5pkpV2M/P/32JgWj51Td8bI@RT6IBAQKiCmikYUw1il@nK3LQbnH1fvKDlqLG1y85Cb9edHbzdNlaLT7AE7mKy0YX6BO5/toLKyRcNp5KOOA0nxSVKK6zYCN9yFj1CjBEctQ2vMRog1qC0P2jw4kKy0epDZhlTo5BzhGBe4GjmXRMkxJicFD8 "Haskell – Try It Online")
Input is taken over STDIN, and output is printed to STDOUT. The flag is the output string: `[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499]`
(Those are the primes from 2 to 499.)
[Answer]
# [R](https://www.r-project.org/), 29 bytes, [cracked by pppery](https://codegolf.stackexchange.com/a/213986/86301)
```
function(x) intToUtf8(cos(x))
```
[Try it online!](https://tio.run/##K/qfpmCr8D@tNC@5JDM/T6NCUyEzryQkP7QkzUIjOb8YKKD5P03DQPM/AA "R – Try It Online")
The flag to output is the string `"R"`.
---
The solution is `5.1i`.
Although \$\forall x\in\mathbb R, -1\leq\cos x\leq1\$, those bounds don't hold for complex \$x\$: \$\cos(a+ib)=\cos x\cosh y -i \sin x\sinh y\$, which is unbounded. We want to find \$x\$ such that \$ \cos x=82\$ (the ASCII codepoint of `R`); pppery gave the answer `x=5.0998292455...i`. The shorter `x=5.1i` works, because `intToUtf8` can take a complex argument and cast is as integer by ignoring the imaginary part, and rounding down the real part to an integer.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 4 bytes, [cracked](https://codegolf.stackexchange.com/a/213995/48931) by [Bubbler](https://codegolf.stackexchange.com/users/78410/bubbler)
```
OÆTP
```
[Try it online!](https://tio.run/##y0rNyan8/9//cFtIwP///wE "Jelly – Try It Online")
Outputs `160.58880817718872`.
¯\\_(ツ)\_/¯
[Answer]
# [05AB1E (legacy)](https://github.com/Adriandmen/05AB1E/wiki/Commands), ~~8~~ 13 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage), [cracked by *@ovs*](https://codegolf.stackexchange.com/a/214029/52210)
```
F}žhм9£.ER.V*
```
+5 bytes to close [a different crack found by *@ovs*](https://tio.run/##MzBNTDJM/f/frVbPNUgvTOv/f0OugqLMvBKN1LwUW/WYPENjcxNjC0tTYxNzdc38InVDBSN1AA) (although he's free to post it as an actual crack instead if he chooses to).
[Try it online.](https://tio.run/##MzBNTDJM/f/frfbovowLeywPLdZzDdIL0/r/PzEpGQA)
Expected output: `\n137438953472\n` (where the `\n` are of course newlines).
**Code explanation:**
```
F              # Loop `N` in the range [0, input-1)
 }             # Close the loop
  žhм          # Remove all digits
     9£        # Only keep the first 9 characters
       .E      # Evaluate and execute as Python code
         R     # Reverse
          .V   # Evaluate and execute as 05AB1E (legacy) code
            *  # Multiply two values
               # (after which the result is output implicitly with a single trailing newline)
```
Tip 1: the program + intended solution only works in the legacy version of 05AB1E (built in Python 3) for two reasons. This won't work in the latest 05AB1E version (built in Elixir), where all these builtins as mentioned in the code explanation above will also act the same as *described*.  
Tip 2: it won't time out on TIO, ~~so an input like `274359834731`, which would result in `137438953472\n` (note it's missing the intended leading newline) isn't the intended solution, since the loop takes too long~~ (no longer possible after the 5 bytes had been added). The intended solution runs in less than 0.2 seconds on TIO.  
Tip 3: one of two reasons mentioned in tip 1 is a bug with `.E` and a certain type of input (which is ALSO in [*@ovs*' initial crack](https://tio.run/##MzBNTDJM/f/frVbPNUgvTOv/f0OugqLMvBKN1LwUW/WYPENjcxNjC0tTYxNzdc38InVDBSN1AA)), that I abuse to get the intended result.  
Tip 4: there are three loose inputs (separated with newline delimiter), and the first and third inputs are the same
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 15 bytes, [cracked](https://codegolf.stackexchange.com/a/214003/81203) by [w123](https://codegolf.stackexchange.com/users/98349/w123)
```
#//.a_:>Head@a&
```
(Edited to reduce byte count. Solution should be the same; all the unintended solutions I can think of should be trivial to adapt.)
Flag: `flag`.
Input by function argument, and output by return value. [Try it online!](https://tio.run/##y00syUjNTSzJTE78r6yvr5cYb2XnkZqY4pCoFv3/f6y@fkBRZl7JfwA "Wolfram Language (Mathematica) – Try It Online")
[Answer]
# [Python 3.8 (pre-release)](https://docs.python.org/3.8/), 93 bytes, [cracked](https://codegolf.stackexchange.com/a/214081) by [pppery](https://codegolf.stackexchange.com/users/46076/pppery)
```
from functools import*;lambda a,b,c:(d:=reduce)(lambda e,f:e[f],c,d(getattr,b,__import__(a)))
```
[Try it online!](https://tio.run/##bVBBbsMgELz7FSv3AhHKIe2hcpUH9A1RZG1gsZEwIFha5fUppq3UQ2@7O6OZ2Ul3XmN4fk35YXPcwNagOUZfwG0pZobD8AQ30lgLwTsEIgMYfkFk4JWgMGZWULzTBDX1m46GgCMsxBCDv/djV3cxwKdrtpVBrxgWF5aOegoLrxBt3zZ0oasM9kwf6MU4jv9nPLx53G4GAdVN6UmY6ZzJVE1S/ACk7EQXe1VaGdESIXNu3Hn@FphngVLKR3O4nF6mqxyGlF1gYcWhW7uQKgu5c8TYF1gpU3vD@9YONFL1yL0bAwlL2ccCCFyTp/0lzEvdKHDZS/nbxajGhp2Ox@MovwA "Python 3.8 (pre-release) – Try It Online")
* Input is function arguments, output is function return value.
* Flag is the string `pxeger` (my username)
---
pppery didn't find my intended solution, and noone else has, but here it is:
The function
> 
>  takes a module name to import, a list of attributes, and a list of indeces, and looks up a value. It is best explained with an example:
>   `! f("spam_module", ["eggs", "ham"], [2, 3]) ! # ==> ! import spam_module ! spam_module.eggs.ham[2][3] !`
> 
> 
> 
Given that:
> 
>  My username is `regexp` (as in Regular Expression), backwards, and `regexp` is quite a common variable name
> 
> 
> 
So we need to:
1. > 
>  Find a use of the word `regexp` in the standard library
> 
> 
>
2. > 
>  Access it using Python's extensive runtime introspection API
> 
> 
>
3. > 
>  Reverse it
> 
> 
>
Specifically
> 
>  In the `csv` module there is a class called `Sniffer` which has a method called `_guess_quote_and_delimiter` which uses a variable called `regexp`.
> 
> 
> 
Python lets you
> 
>  access that variable name as an element of the attribute `.__code__.co_varnames`. (I recommend looking into everything you can get from `__code__` - it's very interesting, albeit excessive)
> 
> 
> 
Then
> 
>  `regexp` is the sixth variable name used there, so I lookup `csv.Sniffer._guess_quote_and_delimiter.__code__.co_varnames[5]`
> 
> 
> 
Finally,
> 
>  reverse that by slicing it with `slice(None, None, -1)` (equivalent to `x[::-1]`)
> 
> 
> 
So the whole solution is
> 
>  `f("csv",["Sniffer","_guess_quote_and_delimiter","__code__","co_varnames"],[5,slice(None,None,-1)])`
> 
> 
> 
[Answer]
# [dotcomma](https://github.com/Radvylf/dotcomma), 819 bytes, [cracked](https://codegolf.stackexchange.com/questions/213963/guess-my-password-robbers-thread/214535#214535) by [the default.](https://codegolf.stackexchange.com/users/36445/the-default)
```
[[,.][[,.],[.[[,.][.].]],.[[.,]]].,][,.]
[,],[[,.][[.][[[.][.].,][,.][.].,][[.][.
][.].,].[[[,.][[].[],.][[[,][,.].,]].,][
[,][.]].][,.][[,][[[,.][[[[.][.].,][,][.
][,][,.].,]].,].[[[,.][[[,][,.].,]][[].[
],].,][[,]].][,.][[,.][[[[.]][.][[[.][[.
]][[[[.]][[.][.][.].,][,.].,][.][,.].,][
,.][[.]].,][,.][.].,][[.]][,.].,][,.].][
.].,]][[.]].,]].,][,],[[[,.][.[[[,.][[].
[.],].,].][[,.][,.][,.].,]].,]][[,.].[.[
[.][,.].][[[[.][.][.][.].,][,.].,],][[[,
.][[[[[[[[[,][,.].,][,.].,][,][,.][.][.]
[.].,][.].,][.].,],],][.][.][.][.][.].,]
.,][.][.].,][,][,][,][,][,][,][[,.][[,][
,][,]].,][,][,][,][[,.][[,][,][,][,][,]]
.,][,][[,.][[[,.][[,]].,]].,][,]],.[[[,.
][[[[.][.][.].,][,][,][,.][[].[,],].,]].
,][[[,.][[[[[[[,.][.].,][.][.].,],][.].,
][.].,],].,][.][.][.][.].,][,][,][,][[,.
][[[,.][[,][,][,]].,]].,]]][.][[.]][[.]]
```
[Try it online!](https://radvylf.github.io/dotcomma/?p=WyJbWywuXVtbLC5dLFsuW1ssLl1bLl0uXV0sLltbLixdXV0uLF1bLC5dXG5bLF0sW1ssLl1bWy5dW1tbLl1bLl0uLF1bLC5dWy5dLixdW1suXVsuXG5dWy5dLixdLltbWywuXVtbXS5bXSwuXVtbWyxdWywuXS4sXV0uLF1bXG5bLF1bLl1dLl1bLC5dW1ssXVtbWywuXVtbW1suXVsuXS4sXVssXVsuXG5dWyxdWywuXS4sXV0uLF0uW1tbLC5dW1tbLF1bLC5dLixdXVtbXS5bXG5dLF0uLF1bWyxdXS5dWywuXVtbLC5dW1tbWy5dXVsuXVtbWy5dW1suXG5dXVtbW1suXV1bWy5dWy5dWy5dLixdWywuXS4sXVsuXVssLl0uLF1bXG4sLl1bWy5dXS4sXVssLl1bLl0uLF1bWy5dXVssLl0uLF1bLC5dLl1bXG4uXS4sXV1bWy5dXS4sXV0uLF1bLF0sW1tbLC5dWy5bW1ssLl1bW10uXG5bLl0sXS4sXS5dW1ssLl1bLC5dWywuXS4sXV0uLF1dW1ssLl0uWy5bXG5bLl1bLC5dLl1bW1tbLl1bLl1bLl1bLl0uLF1bLC5dLixdLF1bW1ssXG4uXVtbW1tbW1tbWyxdWywuXS4sXVssLl0uLF1bLF1bLC5dWy5dWy5dXG5bLl0uLF1bLl0uLF1bLl0uLF0sXSxdWy5dWy5dWy5dWy5dWy5dLixdXG4uLF1bLl1bLl0uLF1bLF1bLF1bLF1bLF1bLF1bLF1bWywuXVtbLF1bXG4sXVssXV0uLF1bLF1bLF1bLF1bWywuXVtbLF1bLF1bLF1bLF1bLF1dXG4uLF1bLF1bWywuXVtbWywuXVtbLF1dLixdXS4sXVssXV0sLltbWywuXG5dW1tbWy5dWy5dWy5dLixdWyxdWyxdWywuXVtbXS5bLF0sXS4sXV0uXG4sXVtbWywuXVtbW1tbW1ssLl1bLl0uLF1bLl1bLl0uLF0sXVsuXS4sXG5dWy5dLixdLF0uLF1bLl1bLl1bLl1bLl0uLF1bLF1bLF1bLF1bWywuXG5dW1tbLC5dW1ssXVssXVssXV0uLF1dLixdXV1bLl1bWy5dXVtbLl1dIiwiXCJXcm9uZyBwYXNzd29yZCA6KFwiIiwyXQ)
The flag is `accepted`.
Since this language is quite new and I've only seen two people (the inventor and me) using it so far, I tried to find a good balance between too hard and too easy.
If I've done it correctly, the code will have two valid passwords. The interpreter is written in Javascript and therefore runs on your local machine.
On my notebook it takes about five seconds to show "accepted" after entering the correct password.
**Solution:**
The intended solution is the number [49375](https://radvylf.github.io/dotcomma/?p=WyJbWywuXVtbLC5dLFsuW1ssLl1bLl0uXV0sLltbLixdXV0uLF1bLC5dXG5bLF0sW1ssLl1bWy5dW1tbLl1bLl0uLF1bLC5dWy5dLixdW1suXVsuXG5dWy5dLixdLltbWywuXVtbXS5bXSwuXVtbWyxdWywuXS4sXV0uLF1bXG5bLF1bLl1dLl1bLC5dW1ssXVtbWywuXVtbW1suXVsuXS4sXVssXVsuXG5dWyxdWywuXS4sXV0uLF0uW1tbLC5dW1tbLF1bLC5dLixdXVtbXS5bXG5dLF0uLF1bWyxdXS5dWywuXVtbLC5dW1tbWy5dXVsuXVtbWy5dW1suXG5dXVtbW1suXV1bWy5dWy5dWy5dLixdWywuXS4sXVsuXVssLl0uLF1bXG4sLl1bWy5dXS4sXVssLl1bLl0uLF1bWy5dXVssLl0uLF1bLC5dLl1bXG4uXS4sXV1bWy5dXS4sXV0uLF1bLF0sW1tbLC5dWy5bW1ssLl1bW10uXG5bLl0sXS4sXS5dW1ssLl1bLC5dWywuXS4sXV0uLF1dW1ssLl0uWy5bXG5bLl1bLC5dLl1bW1tbLl1bLl1bLl1bLl0uLF1bLC5dLixdLF1bW1ssXG4uXVtbW1tbW1tbWyxdWywuXS4sXVssLl0uLF1bLF1bLC5dWy5dWy5dXG5bLl0uLF1bLl0uLF1bLl0uLF0sXSxdWy5dWy5dWy5dWy5dWy5dLixdXG4uLF1bLl1bLl0uLF1bLF1bLF1bLF1bLF1bLF1bLF1bWywuXVtbLF1bXG4sXVssXV0uLF1bLF1bLF1bLF1bWywuXVtbLF1bLF1bLF1bLF1bLF1dXG4uLF1bLF1bWywuXVtbWywuXVtbLF1dLixdXS4sXVssXV0sLltbWywuXG5dW1tbWy5dWy5dWy5dLixdWyxdWyxdWywuXVtbXS5bLF0sXS4sXV0uXG4sXVtbWywuXVtbW1tbW1ssLl1bLl0uLF1bLl1bLl0uLF0sXVsuXS4sXG5dWy5dLixdLF0uLF1bLl1bLl1bLl1bLl0uLF1bLF1bLF1bLF1bWywuXG5dW1tbLC5dW1ssXVssXVssXV0uLF1dLixdXV1bLl1bWy5dXVtbLl1dIiwiNDkzNzUiLDIsMF0). I initially wanted to use the decimal value of 0xC0DE (49374), but got things messed up in my head and ended up one number too high. The comparison function works in a way that the input and the solution are being decremented in a loop until one of them becomes zero. Then the other one must be 1 to be accepted. That means, 49376 is also a valid solution.
Other known solutions are [49375], [49376], [49375, -1] and [49376, -1]
The way this was meant to be cracked:
dotcomma is an esoteric language that is really hard to read, so I don't wanted anybody, to really "decompile" it and know exactly, what each command does, but to puzzle around with the blocks.
As already stated in my first comment, the language works a bit like Brain-Flak. The input will implicitly become the initial values in the queue and after the program ended, the content of the queue will implicitly be printed. So an empty program is a [cat program](https://esolangs.org/wiki/Cat_program).
To solve this, you first need to find the start and end of each block, what will result in something like this:
```
(1) [[,.][[,.],[.[[,.][.].]],.[[.,]]].,]
(2) [,.]
(3) [,],
(4) [[,.][[.][[[.][.].,][,.][.].,][[.][.][.].,].[[[,.][[].[],.][[[,][,.].,]].,][[,][.]].][,.][[,][[[,.][[[[.][.].,][,][.][,][,.].,]].,].[[[,.][[[,][,.].,]][[].[],].,][[,]].][,.][[,.][[[[.]][.][[[.][[.]][[[[.]][[.][.][.].,][,.].,][.][,.].,][,.][[.]].,][,.][.].,][[.]][,.].,][,.].][.].,]][[.]].,]].,]
(5) [,],
(6) [[[,.][.[[[,.][[].[.],].,].][[,.][,.][,.].,]].,]]
(7) [[,.].[.[[.][,.].][[[[.][.][.][.].,][,.].,],][[[,.][[[[[[[[[,][,.].,][,.].,][,][,.][.][.][.].,][.].,][.].,],],][.][.][.][.][.].,].,][.][.].,][,][,][,][,][,][,][[,.][[,][,][,]].,][,][,][,][[,.][[,][,][,][,][,]].,][,][[,.][[[,.][[,]].,]].,][,]],.[[[,.][[[[.][.][.].,][,][,][,.][[].[,],].,]].,][[[,.][[[[[[[,.][.].,][.][.].,],][.].,][.].,],].,][.][.][.][.].,][,][,][,][[,.][[[,.][[,][,][,]].,]].,]]]
(8) [.]
(9) [[.]]
(10) [[.]]
```
Then try out, what each block does.
Block 1 (filter): This block actually answers *the default.*'s question (sorry, I didn't answer it clearly. No other submission had to answer details about the password, and the "wrong password :(" was the only red herring I added to the program. So I didn't want to say "No, it's actually a five digit integer"). If you run that with different data types (numbers, strings, lists of numbers or strings), you will see that it returns the first element of a string or list, if it has multiple elements, or it will return a 1 and the element, if you enter a number or a string/list with only a single letter in it. The purpose of this becomes clear, if you add the second block to it.
Block 2 (delete first element): If you run blocks 1 and 2, you will see that the output will be empty if you input anything with multiple values. Only single numbers or single letters will remain in the queue. (Actually *the default.* found a bug in the programming language, because negative values should not be possible in the queue. You can't programmatically write a negative value onto the queue, and negative values won't be written to the output, but apparently they still can be read from input). So from this point, it should be clear that the password is either a number or a single letter.
Block 3 (run next block, if there's something in the queue): This will not change the output, but is there for control. You can ignore it.
Block 4 (build constants for comparison): This will build the list [49375, 96, input]. At this point, you may ask yourself, what the big number is for and that it may be important for the password.
Block 5 (run next block, if there's something in the queue): Same as block 3. Since there are three values in the queue, this will also rotate the queue, so the output is [96, input, 49375].
Block 6 (compare input and password): As stated earlier, this decrements the input and the number 49375, until one of them becomes zero. Then decrements the other another time and appends the 96 to it. The output is [49375-input (or input-49376), 96]. At this point, you should point out that you have to change the input in a way that the first value becomes something interesting, like 0, -1 or maybe 96?
Block 7 (write output): This block checks if the first value is 0. If so, it uses the second value to build the string "accepted". If not, it fills the queue with the string "rejected".
Blocks 8-10: Those are just fillers, so my submission will have a nice rectangle shape.
[Answer]
# [Python 3](https://docs.python.org/3/), 85 bytes, [cracked](https://codegolf.stackexchange.com/questions/213963/guess-my-password-robbers-thread/213989#213989) by [r3mainer](https://codegolf.stackexchange.com/users/11006/r3mainer)
```
import re,time
b=input()[:40]
a=time.time()
re.match(b,b)
if time.time()-a>9:print(0)
```
[Try it online!](https://tio.run/##K6gsycjPM/7/PzO3IL@oRKEoVackMzeVK8k2M6@gtERDM9rKxCCWK9EWJKoHIjQ0uYpS9XITS5IzNJJ0kjS5MtMUkCR1E@0srQqKMvNKNAw0//8HAA "Python 3 – Try It Online")
Prints `0`. Works on TIO.
[Answer]
# [Arn](https://github.com/ZippyMagician/Arn), [19 bytes](https://github.com/ZippyMagician/Arn/wiki/Carn), [cracked](https://codegolf.stackexchange.com/questions/213963/guess-my-password-robbers-thread/214178#214178) by [r3mainer](https://codegolf.stackexchange.com/users/11006/r3mainer)
```
€weL˜ù┼óª˜›’U•žfcmº
```
~~I would provide the unpacked form, but it's rather trivial to decode~~ adds to the challenge if you have to decode it yourself. Not terribly difficult, but it requires you to access the source code. The flag you want is:
```
7.9228162514264337593543950336e+28
```
this was done in the [online interpreter](https://zippymagician.github.io/Arn). This shouldn't be too difficult, and multiple inputs should theoretically work. However, I encourage you to try and figure out the one I used (you will know immediately if you found the right one).
# Solution + Explanation
The flag r3mainer used was `J0e_Biden!`. The flag I intended to be the solution will remain hidden, as to encourage others to try :). However, to make it easier, here is an explanation for the program `:*:*((|:(|\):}):i0^:i"n`
```
:* Square
  :* Square
      ( Begin expression
        (
            |: Bifurcate*
              (
                |\ Fold with concatenation (remove spaces)
                  _ Variable initialized to STDIN; implied
              ) End expression
          :} Tail
        )
      :i Index of
        0 Literal zero
    ^ To the power of
        _ Implied
      :i
        "n" literal string
```
* Note: bifurcate is currently broken, and this program takes advantage of that. Basically, `|:(...):}` is a synonym for reversing the string `...` (don't you love bugs?)
[Answer]
I'll get things started off with one that probably won't be extremely difficult but may take some thought.
# [Python 3](https://docs.python.org/3/), 78 bytes: [cracked](https://codegolf.stackexchange.com/a/213966/68942) by [wastl](https://codegolf.stackexchange.com/users/78123/wastl)
```
while 1:
	try:l=input()
	except:l=''
	exec(l,{},{"exit":0,"quit":0})
	print(1)
```
[Try it online!](https://tio.run/##JYrLCsMgEADP8StkL1HwEOlN6MeUZKmC6FY3JCHk220et5lhaGOf06u1xYeI0jrRcdlcfIdEMystOlxHJD5L31@Co4pmP8wOuAYGNxj4zTcc50wlJFZWt/YQ0KfWJZdJfjNW6bEg6D8 "Python 3 – Try It Online")
Flag is nothing. As in, . The program should not output anything.
[Answer]
# [Perl 5](https://www.perl.org/) (`-n`), 33 bytes, [Cracked](https://codegolf.stackexchange.com/questions/213963/guess-my-password-robbers-thread/213982#213982) by [Neil](https://codegolf.stackexchange.com/users/17602/neil)
```
length()<28 && !/\w/ && eval eval
```
[Try it online!](https://tio.run/##K0gtyjH9/z8nNS@9JEND08bIQkFNTUFRP6ZcH8RILUvMARP////LLyjJzM8r/q@bBwA "Perl 5 – Try It Online")
The flag is `Flag`. The input is stdin and output stdout.
[Answer]
# [JavaScript (SpiderMonkey)](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/45), 23 bytes, [Cracked](https://codegolf.stackexchange.com/a/213998/44718) by [Sisyphus](https://codegolf.stackexchange.com/users/48931/sisyphus)
```
a=readline()
print(a+a)
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNEtLshMSS3Kzc/LTq38/z/Rtig1MSUnMy9VQ5OroCgzr0QjUTtREygBAA "JavaScript (SpiderMonkey) – Try It Online")
* Expect output: `aaa`
* Input / Output use stdin, stdout
[Answer]
# [!@#$%^&\*()\_+](https://github.com/ConorOBrien-Foxx/ecndpcaalrlp), 104 bytes, [cracked](https://codegolf.stackexchange.com/questions/213963/guess-my-password-robbers-thread/214030#214030) by [@thedefault](https://codegolf.stackexchange.com/users/36445/the-default)
```
*^(%  _+*^)%(0_+%)%  _+^$($_^_$_^_$+!!!!!!!!!+++++++++^$)+_^_  _+$(_^^^^^^^^^^_$^$)+xx_+$(_0+_$^$)+!!@@@
```
The flag to this program is `$$$` output to STDOUT.
I guarantee that the flag will appear in at least 5 seconds given the correct password.
[Try it online!](https://tio.run/##PYpBCoAgEEWvojCCNhuP4DXazCAqtIgSI@r2loY9@Iv/309hizl4v5Y11zqRVkIwTmSUtozK9EqggYl7UA5wQGDwVe0JmumHoZn77rPFr0rpnKt13s8isj@Oay9RLKkk@QA)
## What does it even do?
```
*^(%  _+*^)%(0_+%)%  _+^$($_^_$_^_$+!!!!!!!!!  # Push the password integer...
+++++++++^$)+_^_  _+$(_^^^^^^^^^^_$^$)+        # ...from STDIN onto the stack
xx_+$(_0+_$^$)+                                # Divide by the ASCII value of 0 i.e 48
!!@@@                                          # Print the result as a character thrice.
```
Therefore:
\$x = 48 · 36 = 1728\$
Where x is the password.
FYI 36 is the ASCII value of `$`.
[Answer]
# [Ruby](https://www.ruby-lang.org/) `-n`, 32 bytes, [cracked](https://codegolf.stackexchange.com/a/214107/92901) by @Sisyphus
 Edit to reduce score by 1: `(p eval$_)` → `p(eval$_)`.
```
!/[Scfpv\.:\?'"%<`(]/&&p(eval$_)
```
Input via STDIN. Flag is `"""\n` (three double-quote characters with trailing newline) printed to STDOUT.
[Answer]
# [Ruby](https://www.ruby-lang.org/), 85 bytes, [cracked twice](https://codegolf.stackexchange.com/questions/213963/guess-my-password-robbers-thread/214105#214105) by [the-default](https://codegolf.stackexchange.com/users/36445/the-default)
```
x=gets
puts (x[0...n=x.size/2].to_i*x[n..-1].to_i).to_s(36) if x[-9..-1]=="123456789"
```
[Try it online!](https://tio.run/##KypNqvz/v8I2PbWkmKugtKRYQaMi2kBPTy/PtkKvOLMqVd8oVq8kPz5TqyI6T09P1xDC0wSRxRrGZpoKmWkKFdG6lmA5W1slQyNjE1MzcwtLpf//LS3MzUxNjI0M4YIA "Ruby – Try It Online")
Flag is: `codegolfguessmypasswordrobber001qtr5vxskd64lddb0gsyw2w4hp8zd1t0j`, as a string, in STDOUT.
## Explanation
Two prime numbers have been chosen, each having 50 decimal digits. One of them ends with "0123456789", and their product begins with `codegolfguessmypasswordrobber` when written in base 36.
```
p = 91642145128772682907542781226248344977333099146327
q = 15416260853069873976599113800182718102190123456789
n = p*q = 1412779214440046356547554449820888121475969772090456386542605159205021769559275444371360154172564003
```
This looks like an [RSA factoring challenge](https://en.wikipedia.org/wiki/RSA_Factoring_Challenge), and factorizing the semi-prime is definitely one way to find the password. Bruteforce was explicitly forbidden for this challenge, though. And apparently, it wasn't too hard anyway to factorize n with an open-source program called [cado-nfs.](http://cado-nfs.gforge.inria.fr/) I should probably have picked a longer semiprime, e.g. [RSA-200](https://en.wikipedia.org/wiki/RSA_numbers#RSA-200).
There's a (badly hidden) backdoor : [`String#to_i`](https://ruby-doc.org/core-2.7.2/String.html#method-i-to_i) is happy to convert any string to an integer.
> 
> Extraneous characters past the end of a valid number are ignored.
> 
> 
> 
So `"1x000123456789".to_i` gets converted to `1`, and the challenge becomes trivial. It's now possible to "factorize" n as n\*1.
[Answer]
# [Python 3.7](https://docs.python.org/3.7/), 84 bytes, [Cracked](https://codegolf.stackexchange.com/a/219217/64121)
Takes Python code as input from input from stdin. The code is only executed if it consists of a subset of the characters of `'\n ,.:;=@_abcdefijlmnoprstvz'` and the keyword `class` occurs at most two times.
```
c=open(0).read()
{*c}<{*'\n ,.:;=@_abcdefijlmnoprstvz'}!=3>c.count('class')!=exec(c)
```
[Try it online! (on 3.7.4)](https://tio.run/##K6gsycjPM/7/P9k2vyA1T8NAU68oNTFFQ5OrWiu51qZaSz0mT0FHz8ra1iE@MSk5JTUtMysnNy@/oKi4pKxKvVbR1tguWS85vzSvREM9OSexuFhdU9E2tSI1WSNZ8///gqJMoISuoYGRqSYA "Python 3 – Try It Online")
The flag is `-1025` (printed to STDOUT).
My intended solution:
> 
>  
> ```
> @print
> @int.__invert__
> @object.__sizeof__
> class o:__slots__=__name__,__name__,__name__,__name__
> ```
> 
> [Try it online!](https://tio.run/##dctBCoMwEIXhvaewq6iIFNzZpuQghSGOI1V0EpJUWsWzp7b7bh4/Hzz7Dg/DdYwojSXOznnlSHdZnmwF7tetEHdOy6q5SAW6xY76YZxmNtb5sKxiP8n6hhWaJ4dM4KS9F/lJ0oswwzxGZd3AIVHHVAADL@QCQKJMOxJ@yQ8rmf6g3zc1zUGTCR5AArCeCaD8Hx8 "Python 3 – Try It Online")
> 
> 
> 
[Answer]
# [JavaScript (V8)](https://v8.dev/), 26 bytes, [cracked](https://codegolf.stackexchange.com/questions/213963/guess-my-password-robbers-thread/235306#235306) by emanresu A
Seemed like a cool challenge, so here's an easy one.
Pass any JS value into the function. Flag is `true` printed to stdout. (boolean, not string.) If there is any other output apart from `true` is considered not cracked.
```
x=>console.log({}[x][x]())
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNEts/ifZvu/wtYuOT@vOD8nVS8nP12juja6IhaINDQ1/6dpaP4HAA "JavaScript (V8) – Try It Online")
Intended solution:
> 
>  `{v: 0, toString() {Object.prototype.f = () => true; return this.v++ ? "f" : "valueOf"}}`
> 
> 
> 
This works because:
> 
>  `{}[x]` calls the `toString` method of `x`
> 
> 
> 
> 
>  `valueOf` returns the original object
> 
> 
> 
> 
>  Therefore, modifying the Object prototype to add a method `f` in the `toString` method of `x`, returning `"valueOf"` the first time and `"f"` the second time does the trick
> 
> 
> 
[Answer]
# Stable Rust 1.52.1, 171 bytes
```
fn u<T:'static>(_:T){use std::any::*;let _=unsafe{(1 as*mut T).read_volatile()};let a=type_name::<T>();print!("{}",&a[41..]=="(((), ()), ((), ()))>"&&a.contains("&dyn"))}
```
[Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=42b77b899185325676337b94b5d4e470)
Entering the right password will print `true` and won't segfault (or print anything to stderr). This relies on implementation-defined behavior, so this will only probably work on different versions of Rust.
> 
>  Password: `u::<fn(&dyn std::any::Any)->(((),()),((),()))>`.
> 
> 
> 
Explanation:
> 
>  There are probably other valid passwords but this is the intended one.
>  The function is generic over all `'static` types so you can put in
>  almost anything into the function. However, most types will immediately
>  segfault- `unsafe{(1 as*mut T).read_volatile()}` is a volatile read of
>  address `1`. However, not everything will segfault- in Rust, types with a
>  size of zero can be read from any well-aligned non-null pointer, and
>  most zero-sized types have an alignment of one.
> 
> 
> 
> 
>  This brings me to the second safeguard: parsing the type name.
>  This is the implementation-defined part- the `type_name` function
>  is only guaranteed to be a best-effort description of the type.
>  The type name was chosen to be particularly difficult to find a
>  zero-sized type to match. The solution I have uses a particular
>  monomorphization of the function I submitted to pass the criteria.
>  It is likely possible to define another type that meets the criteria.
>  [Ungolfed code with solution entered.](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=5789fa4be23e9abef6b7d2cb30c8e39f)
> 
> 
> 
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 31 bytes (safe)
```
I.dI:⅛kF*×u⅛Ė.SṪḢ42f÷₍+*Π¾J∑Cøṙ
```
[Try it Online!](https://lyxal.pythonanywhere.com?flags=&code=I.dI%3A%E2%85%9BkF*%C3%97u%E2%85%9B%C4%96.S%E1%B9%AA%E1%B8%A242f%C3%B7%E2%82%8D%2B*%CE%A0%C2%BEJ%E2%88%91C%C3%B8%E1%B9%99&inputs=&header=&footer=)
Flag: `EEEEEEEEEEEEEEEEEEEEEEEE` Flag should be printed to STDOUT.
Under the original specifications for this cop, okie had a clever crack [here](https://codegolf.stackexchange.com/a/237565/101522), but that was an unintentional crack, so a couple clarifications are in order.
* The input will not contain any subset of the flag.
* The program should not return any errors.
> 
>  Intended Solution: `21⅛3` [Try it Online!](https://lyxal.pythonanywhere.com?flags=&code=I.dI%3A%E2%85%9BkF*%C3%97u%E2%85%9B%C4%96.S%E1%B9%AA%E1%B8%A242f%C3%B7%E2%82%8D%2B*%CE%A0%C2%BEJ%E2%88%91C%C3%B8%E1%B9%99&inputs=21%E2%85%9B3&header=&footer=)  
>   
> Before execution, Vyxal attempts to execute the input and see what it returns. The reason for this is to allow you to do things like input a list in Vyxal format, and it will work as intended. This also allows you to put Vyxal code in the input, but normally it will just get captured as a string. For example, and input of `69d:e` would just input the string `69d:e`.  
>   
> However, if you put a number at the end of that input, it only captures that number as input, and discards all of the code leading up to it. For example, an input of `69d:e2` would input the number `2`, and discard the `69d:e`.  
>   
> In the discarded code, trying to assign variables and functions doesn't do anything, nor does assigning to the global register, since those are in a different scope from the main program. However, the global array is global, and persists after the input execution. In the solution, `21⅛3` pushes `21` to the global array, then inputs `3`.  
>   
> Now let's go through the program step-by-step.  
>   
> `.dI:⅛` - Push 1 to the global array and to the stack  
>   
> `kF*` - Multiply `FizzBuzz` by the 1 on the stack  
>   
> `u⅛` - Push -1 to the global array  
>   
> `× Ė` - Multiply the `FizzBuzz` by the inputted 3 to get `FizzBuzzFizzBuzzFizzBuzz`  
>   
> `.SṪḢ` - Push `.`  
>   
> `42f÷₍+*Π` - Push 48  
>   
> `¾J∑` - Concatenate the global array and the 48 and add. We used the input to push 21 to the global array, so this comes out to 69.  
>   
> `C` - Convert to character to get `E`  
>   
> `øṙ` - Regex replace: In string `FizzBuzzFizzBuzzFizzBuzz`, replace with `E` anything matching the regex `.`
> 
> 
> 
[Answer]
# JavaScript, 57 bytes, [cracked](https://codegolf.stackexchange.com/a/238169/87606) by Conor O'Brien
```
alert("xx".split(new RegExp(p=prompt())).join``.length>2)
```
The flag is `true`.
<https://xkcd.com/2217/>
[Answer]
# JavaScript (ES6), 117 bytes, [cracked by @tjjfvi](https://codegolf.stackexchange.com/a/238394/)
```
_=>{c=prompt();if(/[^!-'*-Za-z]/.test(c))throw'CHEATER!';x=(o=>o(o.a,o.b,o.c,o.d))((0,eval)(c));return(x===x&&x!==x)}
```
The function must be called without arguments. The password must be provided via `prompt()`, and the *return value of the function* must be `true` (boolean). Otherwise logging `true` to the console **is not** acceptable. You may only use language features as specified in the ES6 standard, using platform-dependent APIs is forbidden.
You can test your passwords here:
```
f=_=>{c=prompt();if(/[^!-'*-Za-z]/.test(c))throw'CHEATER!';x=(o=>o(o.a,o.b,o.c,o.d))((0,eval)(c));return(x===x&&x!==x)}
console.log(f())
```
I *really* hope I managed to filter out all passwords other than the intended one :D
[Answer]
# [JavaScript (V8)](https://v8.dev/), 25 bytes, [Cracked](https://codegolf.stackexchange.com/a/213981/97730) by [user](https://codegolf.stackexchange.com/users/95792/user)
```
y=s=>(l=s.length)?l:l/l|1
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNEts/j/v9K22NZOI8e2WC8nNS@9JEPTPscqRz@nxvB/cn5ecX5Oql5OfrpGpYZSQWJxcXl@UYqSpuZ/AA "JavaScript (V8) – Try It Online")
The flag is `0`.  
**Input**: function parameter.  
**Output**: returned value of function.
[Answer]
# [Python 3.8](https://docs.python.org/3/), 95 bytes, [cracked by wastl](https://codegolf.stackexchange.com/a/213974)
```
import os;(c:=os.getenv("A")).isidentifier()and c not in"printinput"and eval(c)(os.getenv("B"))
```
Input is via environment variables. (no TIO link because it doesn't support them). Flag is `the_flag`.
@wastl did not find my intended solution - theirs was much simpler. Here is what I indended:
`PYTHONBREAKPOINT=builtins.print A=breakpoint B=the_flag python -c 'import os;(c:=os.getenv("A")).isidentifier()and c!="print"and eval(c)(os.getenv("B"))'`
The `PYTHONBREAKPOINT` environment variable describes a function to be called when you use `breakpoint()`. Python has a lot of weird implicit behaviours like this. I intentionally left "input is environment variables" vague so you would think it would only be `A` and `B`
[Answer]
# [><>](http://esolangs.org/wiki/Fish), 4 bytes
```
i10p
```
[Try it online!](https://tio.run/##S8sszvj/P9PQoOD/fwA)
The flag is `Something smells delicious...` printed to STDOUT, and takes input form STDIN.  
Invalid keys may not always terminate the program.
Not a difficult one, but I like this feature.
[Answer]
# [JavaScript](https://nodejs.org), 2465 bytes, [cracked](https://codegolf.stackexchange.com/a/214195/31957) by [the default.](https://codegolf.stackexchange.com/users/36445/the-default)
```
X=([...O],S=[])=>{let M,F,a,b,R,n;M=F=0;while(O.length)eval(("?S.shift())#[a,b]!2);F=a==b;?a-b)#M++#?M)#%#M=0#M=%#R=%O=[]#n=%n!n);if(F)O=n.concat(O)".split`#`[O.shift()]||"").replace(/%/g,"S.pop();").replace(/\?/g,"S.push(").replace(/!/g,"=S.splice(-"));return R};const U=prompt().split``.map(e => e.charCodeAt()).join``.replace(/9/g,"").split("").map(e=>+e);R={s:20,m:0x80000000,a:1103515245,c:12345,get q(){return R.s=(R.a*R.s*+R.c)%R.m},i(v){return R.q/~-R.m*v|0},get b(){return R.i(2)},h([...a]){for(i=~-a.length;i>0;i--){j=R.i(i+1);[a[i],a[j]]=[a[j],a[i]]}return a}};R.s=U.reduce((p,c)=>p+c,0);class S{constructor(w,n=0){this.w=w;this.n=n;this.s={};this.c={}}N(T=this){return new S(T.w,T.n)}P(T=this){for(let i=0;i<T.w;i++)if(!T.c[i])T.A(i,T.n++);return T}M(s,t,T=this){let A=T.c[s],B=T.c[t];T.s[A]=T.s[A]||[];T.s[B]=T.s[B]||[];T.s[A].push(...T.s[B]);T.s[B].map(c=>{T.c[c]=A});delete T.s[B]}S(a,b,T=this){return T.c[a]==T.c[b]}A(c,s,T=this){T.c[c]=s+="";T.s[s]=T.s[s]||[];T.s[s].push(c)}*[Symbol.iterator](){yield*Object.entries(this.s)}Z(f=false,T=this){let C,b,c,v,N,r,g,l,m;C=[];b=[c=0];for(;c<~-T.w;c++){if(T.S(c,c+1)||(!f&&R.b)){C.push(b);b=[c+1]}else{T.M(c,c+1);b.push(c+1)}}C.push(b);v=[];N=T.N();if(!f){for(let[i,s]of T){let q=R.i(s.length-1);if(!q)q++;g=R.h(s).slice(0,q);v.push(...g);g.map(c=>N.A(c,i))}}r=[];C.map(c=>c.map((e,i,a)=>{l=i+1==a.length;m=!l*2;m|=1*(v.indexOf(e)!==-1);r.push(m)}));return[N.P(),r]}static F(w=10,h=10){let s=new S(w).P(),r,g=[[1]],i=0;for(;i<w;i++)g[0].push(1,1);for(let i=0;i<h;i++){[s,r]=s.Z(i===h-1);g.push(...I(r))}return g}};let I=(r, last=false)=>{let D=[1],E=[1];r.map(c=>{D.push(0,+((c&2)==0));E.push(+((c&1)==0),1)});return[D,E]};class B{constructor(w=10,h=10){this.m=S.F(w,h);this.r=0;this.G=true;this.f()}a(x=this.x,y=this.y){return this.m[y][x]}f(T=this){T.x=T.y=T.ey=1;while(T.a()!=0)T.x++;T.ex=this.m[0].length-1;while(T.a(T.ex)!=0)T.ex--}W(){return this.x==this.ex&&this.y==this.ey}d(r=this.r){return [[0,1],[-1,0],[0,-1],[1,0]][r]}L(){this.r++;this.r%=4}F(){let o=this.x,p=this.y,d=this.d();this.x+=d[0];this.y+=d[1];if(this.a()==1){this.x=o;this.y=p;this.G=false}if(this.W()){console.log("win");this.G=false}}M(r){r=this.r+r;r%=4;let m=-1,d=this.d(r),x=this.x,y=this.y;while(this.a(x,y)!=1){x+=d[0];y+=d[1];m++}return m}T(f){let ms=[1,3,0,2],v=f(ms.map(e=>this.M(e)));while(v&&this.G){this["KLFK"[v%4]].bind(this)();v>>=2}return this.G}R(f){let Y=999;while(this.G&&Y-->0)this.T(f)}}(new B()).R(a=>X(U,a))
```
[Try it online!](https://tio.run/##ZVaPb9o6EP5X@CEquzFewjbptdlRtd1aTRtlAqa3Lc/SQgiQigQap/wQeP9639lOaPtepZazfb777rvvTO/DdSijPFkV7Ww5iZ9W@TJdFTWoEVqDbg2XUSwlD/PZOugI/@kHkIBz3hdsCIGg0N0v4qLWYzcsZGM2YJnfgxtw/c08WcSkzxdxNivmNF6HC0IaF0Mu58m0IJQ2A7wg6h3q30AIMPYvwvaYNnuO07zo0War2QMXf1vNAbT6mKqZQSurZ9RPpuSG9iHj0TKLwoL0aYPL1SIpfjd/B/0qvjgcGg3K83i1CKOYvGm9mbHGkK@WK0L9lwf/XJQnj3JOXh7U9T4MTWxctxuU@nlcPOZZbaB8TC6L2newfBFaQvjN03BFYk1dzKN5mF8jqZe6Xn6/TDI8P8Y/0/Eb5UWiLXMVuk5M/QHs5XnHZem5u/3LtT8sPPc89@17733n3XsWnXudt/g5Q/ofCN1X0LgEMuDhKRqnzoBHtDXgqWIJWb/weXjzp43bp@uDq0yE8csICelQxeam0aGg@@kyJwn8aYdlN/2k6/pJu03396C9E8ejfhAGiWBhcC8EBPqD6Q2hyqihUr7G9h0JmDxi/WTFIpTPyomYS/1oEUpZG@4NrfljVGDKDcvApftinki@gY1vjAwya0jYK2tFaKk7MgK9OpaRxZvakIz4ho14RtW347muRms2QZUmH9DBTxyHoqrqIx4hZDrilyTRt3C76vhI9YhkBauC6ACXoC9Iwa6MUQh/xGVwKcB@HA6B3bmyO1fPO5fCyg35tSe0dDQSiHCodMBIwKWi/iTGZHHNOqgh0XP2n1q1dyjAwBgLdUkiJo8@ZSjpQKNh0kiLRz7jkSWeiKrTYLhLx8sFT4o4D7ENApWxS@LF5LQ/vo@jgsdZkSexJLYLVP0iU5iGCxm/IucaUUZsze5YzmZswVL/GofYH0MQgSt83QQ/@vCnrfmPkOg9NmDEh4g8QjUdDqQ@PTkZ8DGl@2sLbkzNbccTKsZsWFev9PbHJXy0lXp2X@uMd1jsHTHPRn167H6QMCmW09rIon0wOpalvtuedX@gD47jz/BsTiQOqnkHXPaAkY/9m1F/VnXtjmvmE4ogcp36ujqIjEFilrDQPJmAIwNwnKcU6ovTjp8ewDsla55kk3jbn5KY1gE0mNymS6k6vkHBHf9GKMuFkkVYJFHthmzAc9kc/9iaJNgR2FDryWYQBJ4QTAvf8J98sNqfBW4pAI9httcDMjcu@0BiLpD8F74EAIai2ZGEzyTHoksxznDS9fXPQHJWw7kurDyq74qPgCjYJ/0XC6sE/9EGc5lDSHTSoYCjT/1PdtfseWYPAaojBx/ZJ6HKt@Pq9dvxzIXRaYoPOTLE5tS@GTnWZoxbwCuxtaeEqpBsjYr5lu2ssTuOmY0U7ESwFWpKngdsixrb4W@8A6/85hvxkGD7XHxNtigiPCvjpprsSmcvnLVHeSHettvqb/I67xbs/Xh7cmJxVRs7NSG5tfPjnSBwGdIctD3m4ofL2nqlFyJA0XwlJTE5grNGC96pG2K1s6w4WJUcsIk1JqQkcOvABCuxi51eYDtxaMwaSwfwygxbWJZesKo4N4JQlTuWSk33louYL5Yz0tgkWYO@dsYHWFdX1unkvgZshJbijDzjyyn7XwdLmktsuI9EI7yqhgp@6jiViFM1IlPLRSpRquwtc1lHsDVMSSqrb2oTsIdzilK1KdZlc25t8UHjy9ebL41g3XonBB/jYBsQFFlcd7vQUS87fKsGVc6fcHZ29hL17cnJz3a761Kz0tiUInq@r/S/FgMSQvcH@Y6vC316eurtPmerx6L@Lw "JavaScript (Node.js) – Try It Online") **The flag is `win`**. There should be no other output produced by the program. Although I designed this program to work with Firefox's implementation of JavaScript, it also works on node, hence the link. Input is a string through `prompt`, which is substituted for a command line argument in the header of the node TIO link.
There is very much method in this madness; brute force is neither recommended nor viable, hopefully. Slightly golfed. More so an attempt to make it to 2 weeks, than doing it with the lowest score possible—a proof of concept, if you will.
## Or, try it here, in your browser
```
X=([...O],S=[])=>{let M,F,a,b,R,n;M=F=0;while(O.length)eval(("?S.shift())#[a,b]!2);F=a==b;?a-b)#M++#?M)#%#M=0#M=%#R=%O=[]#n=%n!n);if(F)O=n.concat(O)".split`#`[O.shift()]||"").replace(/%/g,"S.pop();").replace(/\?/g,"S.push(").replace(/!/g,"=S.splice(-"));return R};const U=prompt().split``.map(e => e.charCodeAt()).join``.replace(/9/g,"").split("").map(e=>+e);R={s:20,m:0x80000000,a:1103515245,c:12345,get q(){return R.s=(R.a*R.s*+R.c)%R.m},i(v){return R.q/~-R.m*v|0},get b(){return R.i(2)},h([...a]){for(i=~-a.length;i>0;i--){j=R.i(i+1);[a[i],a[j]]=[a[j],a[i]]}return a}};R.s=U.reduce((p,c)=>p+c,0);class S{constructor(w,n=0){this.w=w;this.n=n;this.s={};this.c={}}N(T=this){return new S(T.w,T.n)}P(T=this){for(let i=0;i<T.w;i++)if(!T.c[i])T.A(i,T.n++);return T}M(s,t,T=this){let A=T.c[s],B=T.c[t];T.s[A]=T.s[A]||[];T.s[B]=T.s[B]||[];T.s[A].push(...T.s[B]);T.s[B].map(c=>{T.c[c]=A});delete T.s[B]}S(a,b,T=this){return T.c[a]==T.c[b]}A(c,s,T=this){T.c[c]=s+="";T.s[s]=T.s[s]||[];T.s[s].push(c)}*[Symbol.iterator](){yield*Object.entries(this.s)}Z(f=false,T=this){let C,b,c,v,N,r,g,l,m;C=[];b=[c=0];for(;c<~-T.w;c++){if(T.S(c,c+1)||(!f&&R.b)){C.push(b);b=[c+1]}else{T.M(c,c+1);b.push(c+1)}}C.push(b);v=[];N=T.N();if(!f){for(let[i,s]of T){let q=R.i(s.length-1);if(!q)q++;g=R.h(s).slice(0,q);v.push(...g);g.map(c=>N.A(c,i))}}r=[];C.map(c=>c.map((e,i,a)=>{l=i+1==a.length;m=!l*2;m|=1*(v.indexOf(e)!==-1);r.push(m)}));return[N.P(),r]}static F(w=10,h=10){let s=new S(w).P(),r,g=[[1]],i=0;for(;i<w;i++)g[0].push(1,1);for(let i=0;i<h;i++){[s,r]=s.Z(i===h-1);g.push(...I(r))}return g}};let I=(r, last=false)=>{let D=[1],E=[1];r.map(c=>{D.push(0,+((c&2)==0));E.push(+((c&1)==0),1)});return[D,E]};class B{constructor(w=10,h=10){this.m=S.F(w,h);this.r=0;this.G=true;this.f()}a(x=this.x,y=this.y){return this.m[y][x]}f(T=this){T.x=T.y=T.ey=1;while(T.a()!=0)T.x++;T.ex=this.m[0].length-1;while(T.a(T.ex)!=0)T.ex--}W(){return this.x==this.ex&&this.y==this.ey}d(r=this.r){return [[0,1],[-1,0],[0,-1],[1,0]][r]}L(){this.r++;this.r%=4}F(){let o=this.x,p=this.y,d=this.d();this.x+=d[0];this.y+=d[1];if(this.a()==1){this.x=o;this.y=p;this.G=false}if(this.W()){console.log("win");this.G=false}}M(r){r=this.r+r;r%=4;let m=-1,d=this.d(r),x=this.x,y=this.y;while(this.a(x,y)!=1){x+=d[0];y+=d[1];m++}return m}T(f){let ms=[1,3,0,2],v=f(ms.map(e=>this.M(e)));while(v&&this.G){this["KLFK"[v%4]].bind(this)();v>>=2}return this.G}R(f){let Y=999;while(this.G&&Y-->0)this.T(f)}}(new B()).R(a=>X(U,a))
```
## Intended solution
the default.'s solution was very close to being exactly the same as mine, and in fact, conceptually equal to mine. However, mine has a bit tighter encoding:
> 
>  `Z5[_\\#\]:#][4\]!!!!\]\\\\ \\\]:(Z5[_\\#\]:#][4\] \\\]4\\\]:4\\\\\\\\\\\\\\\\\\\\%`
> 
> 
> 
I'll probably released a half-golfed, half-annotated version of the source later.
[Answer]
# [Python 3](https://docs.python.org/3/), 70 bytes, [cracked by @ovs](https://codegolf.stackexchange.com/a/231473)
```
c=compile(c:=open(0,"rb").read(),"","exec").replace(co_code=c)
exec(c)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=NY5NCsIwEIX3PUWYVQKxuBQhV_AKIU4nJFAzIZ1CPYubbvRO3sb6t33v8b3v9qhXSVzW9T5L3B2eMzrkS80jaTw6rlT03kI7g-kbhUEbC2CBFsJPUseA25I98kAOTRemiZrAiUVFbkoSqRhyEcVRJQpblYvC3vuB0fvuDdJovuc_h7_LCw)
Works in CPython 3.9.6. Takes input from STDIN and should output `42` with a trailing newline to STDOUT.
---
The challenge was to create something of a polyglot between Python source code and CPython bytecode. The Python source would be compiled (so it needed to be syntactically valid), and then have its bytecode replaced with itself, keeping constants and names.
My solution was:
```
d,F,d,S,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,44,43,42
```
Disassembly:
```
Bytes  Instruction      Argument  Meaning
d,     LOAD_CONST             44  stored integer 42
F,     PRINT_EXPR             44  ignored
d,     LOAD_CONST             44  stored integer 42
S,     RETURN_VALUE           44  ignored
...    [garbage...]
```
The list of numbers is just to get the Python compiler to store enough constants for `,` (decimal codepoint 44) to be a valid argument in order to index into the tuple and load `42`.
By the way, `PRINT_EXPR` is an opcode used solely by the Python shell to print the return value of an expression. It's never used in normal code, but it's very useful for hacking around in bytecode-land.
]