When trying to understand PRONOTE requests, we most of the time open the DevTools and try to read directly the response in the "Network" tab.
Even though, some instances have encrypted and/or compressed data in the payload/response.
So here's a solution to read these data, right into your browser.
Drop this function into your browser console when you're on the Pronote page :
const decrypt = (data) => copy(JSON.stringify(JSON.parse(require('ObjetCryptage.js').GCryptage.decrypter({
genreCryptage: (GApplication.getCommunication().constructor.optionsSecurite.sansCryptageAES ?? false) ? 1 : 2,
chaine: data,
cle: GApplication.getCommunication().cleAES,
iv: GApplication.getCommunication().ivAES,
avecCompression: !(GApplication.getCommunication().constructor.optionsSecurite.sansCompressionAES ?? false)
})), null, 2));
Now, simply use it like this : decrypt("value_from_donneesSec")
It'll copy the uncompressed/decrypted value in your clipboard, and you're now able to drop it wherever you want.
Since I often need to make TypeScript types out of these, I paste the value directly into this tool https://transform.tools/json-to-typescript.
Hope it helped some of y'all.
So actually the
copy
function doesn't seems to work (in Firefox, maybe it will work with other browsers), here is the function to return the JSON data directly: