jarv / cmdchallenge

This repo is mirror of https://gitlab.com/jarv/cmdchallenge
https://about.cmdchallenge.com
MIT License
721 stars 71 forks source link

Doesn't support printf #121

Open l0b0 opened 7 years ago

l0b0 commented 7 years ago

My entire session:

bash(0)> printf 'hello world'
Unknown Error :(
bash(☠️)> wat
Unknown Error :(
jarv commented 7 years ago

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)>  
l0b0 commented 7 years ago

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

jarv commented 7 years ago

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.

l0b0 commented 7 years ago

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.

jarv commented 7 years ago

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

l0b0 commented 7 years ago

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?

jarv commented 7 years ago

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