Holly Evergreen – CURLing Master Cranberry Pi terminal

Holly Evergreen wants us to restart the Candy Striper, and also hints “The trigger to restart the Candy Striper is an arcane HTTP call or 2.”

When we first enter the terminal, were informed that we could find hints in the file “/etc/nginx/nginx.conf

There are a couple of things to note here, one we can’t access “/var/www/html/” (bash: cd: /var/www/html/: Permission denied) 🙁
Also, “listen 8080 http2;” But we already know this because of the hint from Holly Evergreen.

We need to curl the URL http://localhost:8080/, but one thing I noticed was the “.bash_history” and how it already had the curl command ready! (If it’s there, then I guess we can use it? Finder’s Keepers!).

Cool! We can use curl –http2-prior-knowledge http://localhost:8080/ and that gives us.

“To turn the machine on, simply POST to this URL with parameter “status=on”

Simple enough, entering “curl –http2-prior-knowledge -d “status=on” -X POST http://localhost:8080/” returns us with.

Curl is not something new, and it is not something too hard to learn, there are many guides, examples and videos on how to use curl.
Fun little challenge 🙂

Bonus

I did mess around with the website and curling and found two funky things about it, which I like as it guides newcomers to the correct path.

If you send a GET, you get this back “curl –http2-prior-knowledge -X POST http://localhost:8080/index.php?status=on”

Moreover, if you do get the command correct, but you send the wrong parameter, i.e. “curl –http2-prior-knowledge -d “param1=on” -X POST http://localhost:8080/” You get.

I liked this, as this challenge was forgiving and didn’t expect you to be a master of curl, N1 one devs <3.

References:
https://gist.github.com/subfuzion/08c5d85437d5d4f00e58

Leave a Comment

Your email address will not be published. Required fields are marked *