16
3
This is the cops' thread. The robbers' thread is here.
Your challenge is to write a program or function that, with a certain input, prints the exact string Hello, World!
and a newline. Capitalization, spacing and punctuation must be exact.
Input may be taken via standard input, a file, or command-line/function arguments. Output may be given via return value, writing to a file, or standard output.
Your program must print Hello, World!
for at least one input. When your program is given the wrong input (i.e. the input that does not make it print Hello, World!
), it can do whatever you like - crash, print random nonsense, call Chuck Norris, etc.
You may not use a hashing algorithm or any similar methods of obscuring the required input.
Submissions are preferred to be runnable & crackable on TIO. Submissions not runnable or crackable on TIO are allowed, but please include instructions to download / run them.
After one week, this challenge will be closed to future cop submissions. The winner is the shortest code that is uncracked after a week of posting it ("it" being the code, not this challenge). The winner will be accepted after two weeks.
After a week has passed since posting, please mark your answer as safe and show the input (in a > ! spoiler quote
). If a robber cracks your submission (before the week ends), please mark it as cracked and show the halting input (in a > ! spoiler quote
).
Looking for uncracked submissions?
fetch("https://api.stackexchange.com/2.2/questions/137742/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>
Very similar not a dupe though. – Post Rock Garf Hunter – 2017-08-05T17:22:36.557
13
As I said in the sandbox, I feel that this is a duplicate of the halting question since any answer there could be posted here instead but with code for and infinite loop replaced with code to print hello world. I won't vote yet because I'd hammer, but I'm pretty convinced this is a dupe.
– FryAmTheEggman – 2017-08-05T18:07:52.4975Obviously
sha3
falls into that category, but otherwise where do you draw the line? I mean themod 1e3
is also a hash function, and I'd even go so far and argue that many of the submissions are going to be hash functions, as this challenge is basically asking for such. – flawr – 2017-08-05T21:52:12.730Is the trailing newline entirely necessary? I just added a byte to the end of my submission, but still I see a few other people have missed it off too. – Jonathan Allan – 2017-08-05T23:24:43.970
What exactly counts as a hashing algorithm? Would summing the codepoints of a string be a hashing algorithm? How about treating a string as a base-256 number? – Conor O'Brien – 2017-08-06T01:22:51.180
@FryAmTheEggman Related, but not dupe. In case of no comparing with "Hello world" its different. For example when doing some input manipulations. – Евгений Новиков – 2017-08-06T13:00:46.743
1Based on the answers I've seen in the past day, nothing has appeared that convinces me this isn't a duplicate. I'm going to close the cop challenge for now, and if the community disagrees it can be reopened, and if the community agrees they can close the robber thread too. – FryAmTheEggman – 2017-08-06T13:30:26.563
@FryAmTheEggman now i am developing non dupe crackme. To avoid dupe submissions you can edit rules – Евгений Новиков – 2017-08-06T13:44:37.040
1@Dopapp this has already been discussed, here (some comments deleted) and in chat. Answers cannot be copy-pasted, nor very easily ported, from that challenge to this one, so they are not duplicates. – MD XF – 2017-08-06T17:49:27.297
Can cop's program interact with crack? i.e. robber's program do calculations, based on debug output of cop's program, and then send suitable for this case input – Евгений Новиков – 2017-08-07T06:42:21.770
What's a "similar method of obscuring the required input"? I'm doing some calculations on numerical input in one of my submissions, but nothing that's specifically hard to reverse (like a hash function is), so I guess this is ok? – Felix Palmen – 2017-08-07T13:31:39.980
@FelixPalmen I believe that mostly is directed at one-way functions (hash functions), RSA stuff (giant primes) or the like – Stephen – 2017-08-07T14:14:44.133
I assume that, just wanted to be sure my C64 submission isn't against the rules :) – Felix Palmen – 2017-08-07T15:12:33.630
I think I should post this meta post to gather more discussion as to what kind of inputs are valid; because as it stands, some cracks are really stretching the definition of a input a lot.
– Voile – 2017-08-07T18:18:58.893