Week 7: Advanced Web
- URL hacking using GET
- You will find a super important voting website located at: https://stanford.edu/~tsarkar/simple_vote.html.
- Try voting using your web browser.
- You don't like candidates 1, 2, or 3, but the other people aren't in your district. Figure out how to vote for candidate 1000. Hint: Check your URL
- If you've figured out how to vote for candidate 1000 through your browser, try it again from the command line. NOTE: The voting page takes your input and passes it to a different page to process. To figure out where your input is passed, look at the HTML, or look at the URL after you hit submit. This is the same for the following problems and you will most definitely need this information. If all you're getting is the voting form in HTML, you are curling the wrong page.
- URL hacking a form submission using POST (cURL)
- Those tricky web admins have figured out your little ploys and have worked tirelessly to trump your little ploys. Their new website is at: https://stanford.edu/~tsarkar/secure_vote.html.
- Trump them again and vote for candidate 1000!
- So the president heard how awesome these guys were (they did a good job of keeping your little deeds under-wraps), so he hired them to make the new super-safe presidential voting system. The developers decided to ramp up their security even more and are now 100% sure you won’t hack them given they are using this super posh new technology called COOKIES. If you head over to their website: https://stanford.edu/~tsarkar/super_secure_vote.php you can’t even see the poll! But we learned the president’s identity has something to do with https://stanford.edu/~tsarkar/presidential.php.
- Don’t let them win!
- Download a photo using CURL!
- https://stanford.edu/~mayai/curl-meme.jpg (Hint: Check out the -o flag)
- If you're using a gnome desktop, you can use eog (eye of gnome) to open the photo from the command line.