Generic
Difficulty: Medium
This problem will introduce you to copying and replicating a network request that a site is making.
Visit https://generic.cs161.org in your browser. Here, you’ll see a generic web app’s landing page. Go to the login page, and click “Forgot Password” to request a new password corresponding to your SID. Then, open up the network inspector, and log in with your SID. What requests are being sent? What are the cookies that the site is storing? What are the headers in each request?
Once you’re logged in, you should be redirected to a page with some generic data. Look at how this data is being fetched from the server. Pay attention to the headers; in particular, there’s a header that uniquely identifies you to the application. (This is called an authentication token).
Using the process here, try replicating this request using Python and the Python Requests module.
Task Questions
- What is the 100th value for the table (zero-indexed, so tableData[99])?