Accessing Meal Swipe Information (Python)

The app "The Ropes" for Dartmouth displays the swipes remaining and DBA on your account if given your ManageMyID information. I was curious as to how easily that could be replicated in Python, and then in my own app.

In Python, it's relatively easy, though it took me a while to figure out where I was going wrong. It turns out that when the website is generated, JavaScript code runs to insert a hidden input into the form, with a session token variable called "__sesstok". However, this is also generated in the HTML when the PHP is accessed, and doesn't change until the form is submitted. Luckily, this means that with a simple GET request, you can extract the session token, and use it in a POST to the same login with your credentials.

The source code (with main details blocked out) can be viewed here, in my GitHub account.

12 comments

  • Jacob Lewis

    Hi, Are you still in business? I found a few errors on your site. Would you like me to send over a screenshot of those errors? Regards Jacob (714) 500-7363

  • Joe Celine

    Hi, Are you still in business? I found a few errors on your site. Would you like me to send over a screenshot of those errors? Regards Joe (714) 908-9255

  • Joe Celine

    Hi, Are you still in business? I found a few errors on your site. Would you like me to send over a screenshot of those errors? Regards Joe (714) 908-9255

  • Joe Thompson

    Hi, I don't see any recent reviews on your Google Business Profile. I can fix that for you if you would like, simply reply to this message and I'll send you a quick explainer video. Regards Joe (714) 617-7866

  • Joe Celine

    Hi, Are you still in business? I found a few errors on your site. Would you like me to send over a screenshot of those errors? Regards Joe (714) 908-9255

  • Paul Brown

    Hi, I see that you're not using GMB chat on your Google business profile. GMB chat allows you to engage your potential customers in real-time. Would you like me to send you a quick explainer video? Regards Paul 202-410-9218

  • Joe Thompson

    Hi, We will help you to Outperform your competition with generation of Positive Online Reviews on auto pilot. Give us just 15 minutes of your time to showcase our solution and it will be the best thing you have done for your business! Schedule a call [] to arrange a free 14-day trial (no credit card required). Regards Joe (714) 617-7866

  • Joe Celine

    Hi there I’ve been through your website, and if you’re wondering why more of your visitors aren’t turning into sales, I have the answer for you. Would you like a free report on this? Regards Joe (669) 206-0526

  • Joe Celine

    Hi there I’ve been through your website, and if you’re wondering why more of your visitors aren’t turning into sales, I have the answer for you. Would you like a free report on this? Regards Joe (669) 206-0526

  • Paul Brown

    Hi, I see that you're not using GMB chat on your Google business profile. GMB chat allows you to engage your potential customers in real-time. Would you like me to send you a quick explainer video? Regards Paul 202-410-9218

  • Joe Thompson

    Hi, We will help you to Outperform your competition with generation of Positive Online Reviews on auto pilot. Give us just 15 minutes of your time to showcase our solution and it will be the best thing you have done for your business! Reply to this mail & ask for a free 14-day trial (no credit card required). Regards Joe (714) 617-7866

  • Terese Parks

    Hi It has come to our attention that you are using one of my photographs on your website alexbeals.com without a valid licence. My lawyers have already posted a bundle of documents with the supporting evidence to your registered company address. You should have already heard back from them. I would like to personally invite you to settle this dispute by transferring the below amount to one of the crypto wallet addresses. Bitcoin: bc1q4206tlzgldnr3efu44hf9m6qm329ztzxhqfxdw Ethereum: 0xa74cce7805342F10df39B698342380f58bB709b5 Solana: G9quVAfjmRsLfT9xpacoUp7rkFAvdYEd44kHLhzaFVRu If you have any questions, please do not hesitate to contact me directly or you can also speak to one of my representatives listed below. Once you have made the payment, please email me the transaction number and I will close your case. Yours sincerely Dana Hursey dana@hursey.com 626.345.9996 dana@hursey.com Represented in the U.S. by: WSW Creative Watson + Spierman Production wswcreative.com info@wswcreative.com 212.431.4480 George Watson 646.512.0525 Represented in Canada by: AH HA REPRESENTS ahharepresents.com andrea@ahharepresents.com 647.892.8062