g | x | w | all
Bytes Lang Time Link
002Rust250508T211324ZThemooni
nanRust250507T135047ZThemooni
016Vyxal210717T110919Zlyxal
006Vim210712T094150Zuser1004
nanZsh210612T133534Zuser1004
nanPython 3210319T205953ZThe Fift
nanDesmos210317T225855ZEthan Ch
nanJavaScript210311T180746ZMakonede
nanJavaScript210311T174831ZMakonede
nanDesmos210311T155051ZCloudy7
nanPython 3210222T164306ZUnrelate
nanPython 3210222T151106Zuser
007Python 2201106T021750Ztsh
nanPython 3210218T210932ZEasyasPi
nanPython 3210218T184635ZEasyasPi
nanPython 3210218T182303ZEasyasPi
nanRust Z unstableoptions pretty normal210217T172017ZEasyasPi
nanDesmos210217T161532ZCinaski
nanPython 3210206T045522ZEasyasPi
nanR201114T003543ZDominic
012Julia201112T003323ZDingus
005Desmos201110T002841ZPkmnQ
012Julia201107T023538ZDingus
021Ruby201106T233413ZDingus
026Haskell201106T231405ZWheat Wi
006Jelly201106T123142ZUnrelate
006Jelly201106T014708Zhyperneu

Rust, cracks deadbeef's v2 (no #)

macro_rules! yay { ("'"'a) => () }

fn main() {

}

generates a warning for the unused macro, which i don't know how one would go about using. supressing the warning requires a #, but warnings aren't errors :)

Try it online!

Rust, cracks deadbeef's

#!"'"'
fn main() {
}

Try it online!

did you know? rust supports shebangs!

Vyxal, 16 bytes, Cracks A Username's answer

Q
«Wi«»Wi»`Wi`Wi

Try it Online!

Ez. Just quit before you get to the unavoidable stuff.

Vim, 6 bytes, cracks Aaron Miller's

<C-w>n<Esc><Esc>ZQ

What it does


Vim, 5 bytes, cracks Aaron Miller's

<C-w>n<Esc>ZQ

Same as above.

Zsh, cracks pxeger's post, cracked after being safe.

Did I get the rules correctly?

a=1;: " 
#include <cstdlib> 
#include <iostream> 
 
int main() { 
    srand(time(NULL)); 
    hello(); 
    return rand() % 2; 
} 
 
/* 
  main 
  a=0 
  \ 
  print "$((1/$a))" 
*/ 
 
void hello() std::cout << "Hello, World!" << std::endl; 
 "

Try it online!

Python 3, cracks Makonede's answer

Code contains unprintable characters, so is provided as a hexdump:

00000000: 2300 0400 040a 3f22 2222 3f27 2727 3f    #.....?"""?'''?

Derived from feersum's comment on an identical Python answer to the original find an illegal string challenge. I made it slightly shorter and adjusted it to the banned characters in this challenge, but have no idea how or why this works.

Try it online!

Desmos, cracks HitchHacker's answer

\sort(3,2

Desmos programs are normally scored based on the text pasted into the textbox. Pasting in invalid-formatted text simply does nothing, which doesn't meet the error criteria of showing a "danger sign" laid out by HitchHacker. The easiest way to do this is by using a \ before sort. Desmos doesn't recognize "sort" as an escapable sequence like \left or \operatorname or even \sin so it simply ignores the whole program.

JavaScript, cracks Etheryte's revised answer

eval(...void 0||Array())

Try it online!

JavaScript, cracks Etheryte's answer

void$=Array();console.log(...void$)

Try it online!

This seems way too easy... Uses spread syntax ...expression to use the elements of void$ (initialized to Array(), an empty array []) as separate arguments to console.log. Since it's empty, it uses no arguments, which is perfectly valid as well; it just calls console.log().

Desmos, to crack HitchHacker's cop

There is in fact a way to crack this answer without using notes. Type the closing parenthesis ) after the expression, then go back one character and type the closing bracket ]. The result, sort(3,2]), should be interpreted as sort([3,2]).

enter image description here

Python 3, cracks qwatry's revised answer

x: 1=2

Try it online!

or

x: 1+1=2

Try it online!

(not entirely sure which it's supposed to be but it works either way).

I completely forgot how flexible type hints are until I cheated searched the grammar for the = character.

Python 3, cracks qwatry's answer

foo1=2

Try it online!

The string to crack is 1=2.

Python 2, 7 bytes, cracks xnor's post

0xbin()

Try it online!

The answer is easy to understand if syntax highlighting for above snippet works correctly.

So bad. The syntax highlighting did work correctly. But SO changed their render library... Anyway, above code is:

0xb in ()

Python 3, cracks Makonede's revised second challenge


raiser:str

Try it online!

Uses a type annotation. I think this is the actual solution you meant. 😏

Python 3, cracks Makonede's second challenge


raiseTABSystemExit

Try it online!

I am sure this is another unintended loophole…

Python 3, cracks Makonede's challenge


raiser=3

Try it online!

Should've banned =...

Rust -Z unstable-options --pretty normal, cracks @Deadbeef's answer

const x:! =1;

Not sure if this is the intended interpretation of "you may pass any flags to rustc if you like." or a loophole.

I could just do --help but this one actually parses the file and needs a sorta valid Rust program.

Specifically, the --pretty option on Nightly will just format the code instead of compiling it.

Desmos, cracks HitchHacker answer

The solution is in the answer, note is the key: instead of evaluating it as an expression the illegal string is put in a note ¯\_(ツ)_/¯

enter image description here

Python 3, cracks qwatry's challenge

Illegal text: int(A,B,C), with all ASCII but ~+2() and newlines banned.

𝔢𝔵𝔢𝔠(𝔠𝔥𝔯(22+22+22+~2+2)+𝔠𝔥𝔯(22+22+22+~2+2+~2+~2+2)+𝔠𝔥𝔯(22+22+22)+𝔠𝔥𝔯(22+22+22+~2+2+~2+~2+2)+𝔠𝔥𝔯(22+22+22+2+2+~2)+𝔠𝔥𝔯(22+22+22+~2+2+~2+~2+2)+𝔠𝔥𝔯(22+22+2+2))
𝔭𝔯int(A,B,C)

Try it online!

Python 3 normalizes Unicode identifiers, so "𝔣𝔞𝔫𝔠𝔶 𝔲𝔫𝔦𝔠𝔬𝔡𝔢" is turned into "fancy unicode".

This turns it into

exec(chr(22+22+22+~2+2)+chr(22+22+22+~2+2+~2+~2+2)+chr(22+22+22)+chr(22+22+22+~2+2+~2+~2+2)+chr(22+22+22+2+2+~2)+chr(22+22+22+~2+2+~2+~2+2)+chr(22+22+2+2))
print(A,B,C)

And when we expand the chr statements, we get 'A=B=C=0':

exec('A=B=C=0')
print(A,B,C)

And you can figure it out from there.

I would love to say I discovered it, but nah. This isn't the first time normalization memes have been posted here.

Also, I brute forced the ASCII arithmetic instead of calculating it, so it is not optimized. 😂

R, cracks Robin Ryder's challenge

try(x %'"% y,T)

Try it online!

The 'almost illegal' string we're trying to use is '".

try attempts to run the code contained in its first argument. The second argument, silent (not explicitly named here) is set to TRUE to prevent output if the result is an error.

The first argument here attempts to apply the (nonexistant) %'"% function to (nonexistant) variables x and y.
The %...% notation - known as SPECIAL in R - allows us to incorporate characters that are usually forbidden for variables and function names, like '" in this case.

Julia, 12 bytes, cracks @binarycat's answer

`\?""":"`

Try it online!

Backticks in Julia delimit shell commands, as in Perl or Ruby. But unlike Perl or Ruby, the command isn't actually executed; rather, a Cmd object representing the command is created. Hence it doesn't matter that \?""":" isn't a valid shell command.

Desmos, 5 bytes, cracks Aiden Chow's answer


\{\}

Julia, 12 bytes, cracks @dogedoge's answer

"""?"""::Any

Try it online!

Define a (triple-quoted) string and assert it to be of type Any (String also works).

Ruby, 21 bytes, cracks @dogedoge's first answer

%q(=end
#{"""'}
=end)

Try it online!

Wraps the almost illegal string in a single-quoted string (which doesn't allow interpolation).


Ruby, 23 bytes, cracks @dogedoge's first and second answers

/#{'}=end
#{"""'}
=end/

Try it online!

Here's an alternative that doesn't use % (in response to a comment). This time we wrap in a regexp, interpolating a single quote to close the """' sequence that occurs later.


Ruby, 28 bytes, cracks @dogedoge's third answer

<<S
#{'}=end
#{/"""'}
=end
S

Try it online!

Now the wrapper is a here doc. This approach also works for the first two cops (which don't include the /).

Haskell, doge doge's answer, 26 bytes

main=print()where{3
#""=3}

Try it online!

The idea here is that within a {} block whitespace rules are weakened a good deal. With that we can turn #" into the declaration of an infix function and write the rest of our program with no issues. From there we use where attached to our main function to start the block.

I don't really know why these blocks have weaker rules. I am just learning about this now as well. But for some reason I had a suspicion it might work and it does.

Jelly, 6 bytes, cracks caird coinheringaahing's



«{0¡

Try it online!

Instead of string literal weirdness, this uses the fact that arity mismatches don't cause errors until things are actually evaluated--{ doesn't try to turn a monad into a dyad so much as it calls a Python lambda assumed to have one argument from a Python lambda with two arguments, and repeats it zero times.

Jelly, 6 bytes, cracks caird coinheringaahing's

“

«{”

Try it online!

EDIT

I actually don't know why this works lmao