cmdchallenge icon indicating copy to clipboard operation
cmdchallenge copied to clipboard

Doesn't support printf

Open l0b0 opened this issue 7 years ago • 7 comments

My entire session:

bash(0)> printf 'hello world'
Unknown Error :(
bash(☠️)> wat
Unknown Error :(

l0b0 avatar Feb 20 '17 14:02 l0b0

Hm, I don't see this. I assume you are seeing this consistently and that it never worked for you? What browser are you using? Any chance you have a adblocker or browser extension enabled?

bash(0)> printf 'hello world'
hello world
# 👍 👍 👍  Correct!
# You have a new challenge!
# Print the current working directory.
# 
bash(0)> wat
wat: command not found
bash(127)>  

jarv avatar Feb 20 '17 15:02 jarv

Yes, I have a bunch of extensions enabled, including an ad blocker.

l0b0 avatar Feb 20 '17 15:02 l0b0

Hm, that could be the reason why. If you can try temporarily disabling them and trying again it would help to narrow down the problem. There are no ads and no external javascript on cmdchallenge.com if that makes you feel better about disabling them.

jarv avatar Feb 20 '17 15:02 jarv

I see in uMatrix that it does do an XHR to an "execute-api" host on AWS. Looks like that is how commands are evaluated, so it needs to be enabled. Unfortunately it doesn't show up in uMatrix until you send off a request.

l0b0 avatar Feb 20 '17 15:02 l0b0

Yeah this is the likely culprit, it makes a cross-origin xhr cors request when you submit.

jarv avatar Feb 20 '17 15:02 jarv

Accidentally closed it. Do you think changing the error message to include more information if it can't reach the execute-api host would work?

l0b0 avatar Feb 20 '17 15:02 l0b0

Yes the error reporting is terrible here, I will try to improve it.

jarv avatar Feb 20 '17 15:02 jarv