Search code examples
javascriptapiscriptingbotsreverse-engineering

Reverse engineering API, object generation


First off I'm reverse engineering an API for a site. I'm making solid progress by using the Chrome Console and grep. I have the calls that are needed to perform the actions I need doing however I few problems. One of the calls submits 3 things, rock, paper and visitID. These are easily attainable command.command["paper/rock/visitID"] the problem is it changes for every single page I visit on the site and there's probably 300 or so pages. Its scrapable with selenium and chromedriver but takes forever and I need it mobile. After examining rock it submits same thing for every account so nothing hard there. Paper looks completely random but some similarities between different papers some examples: "0LDqrWA**wfj.axKDL2ueHCIaoaWXzIflETI*5W4P5fcXLcuBDlLfWNub5EfE1dig05rcK*LQhOy4.UNEokGMRgUsLoFS27Sgsi*8QLh7Q7KRmKrx.HQjKVMroZCnmT3mXI9aPdFcM71.CYxCSXBYlZAiIlksk5avBFomUQiHhAr7rk8zSengWYJnQYZyOrMn6YostqjQ" "qalKU2TsrHPI88zWHs10NUkYVOEk1zDWGY5KS8m7qxKcR1BDlKWcbifVA3VLwlAa9DjQpKTf.A6Sh7QEQ.QE0IR0yswEhBY7wmUrxAt975HKAkPhlosqfxpxMSXRBXc1VsBtxlUb7Inm4n.OpaTe.KhVmylIjqOuQKabC75dfMBucjMvyMNab.COI.KO8RjuzYRAMdA"

Example of visitid: 247439064$70863449$9ed2e4b398f77f4dc67b7da11d269ab06d303bec

The site is made up of playlists and videos and everything is stored in command.data and this data is read/write for users (lol) on the playlist page the rock and stuff does not exist but once you go to a video its there in chrome console and I cannot figure out how it's made and once it's made it does not change for that playlist until the next data. Can the site just load those somehow and it not be in the JS?


Solution

  • There are many ways for this to appear on a non static webpage like serving with express in nodejs, basic php, etc