Suspend data base64 decoding (spoofing interaction data)

Hi there,

Wondering if anyone has any ideas on the below.

Publishing a course as SCORM 1.2 and SCORM 2004, trying to create a solution to allow our customer to do some data analytics on suspend data. Either formats would work for us. This is post discovering that Evolve does not push interaction data in SCORM 2004 3rd Edition. We wanted to pull question data and responses.

In its most basic form to prove the concept, I have a variable created called “Q1Answer”.
After completing an MCQ the variable is set to “Q1Correct” or “Q2Correct”. All working, fairly easy to do.

However, when looking at how Evolve deals with the suspend data, I’ve been able to inject into the javascript a console log to see what the suspend data looks like before it’s converted to base64 format. Prior to this, it’s readable, clear to see the variable result, and something that I could pull from the LMS to analyse. However, Evolve converts this into Base64 format from what I can see which actually puts a series of letters and numbers, nothing readable.

With this, understanding that it needs to go into Base64 to allow for this volume of data (the module we have in real life is fairly large), does anyone know of a method for decoding this data outside of the LMS?

For note, this encoding to Base64 is being performed in the “scorm-extension.min.js” located in the “player/js/” folder.

Any help or advice is greatly received!

Haven’t tried it myself but I think the LZ-UTF8 Demo should work

@Matt_Leathes thanks for this… unfortunately it needs to be the other way round… or rather… enter the base64, return the decompressed output. This example is looking for the pre-base64 (which wouldn’t be available to the client in their LMS).

I tried other simple converters online, but most only did a partial decompression, left weird characters in some places.

Sorry @AlBourne I didn’t spot that was only one-way.

If it helps at all, it’s using the decompress function of this library to decompress the data, specifically:

const decompressed = LZUTF8.decompress(suspend_data, { inputEncoding: 'Base64' });
1 Like

Fab. Managed to hack a few things and make that work as a proof of concept anyways. Cheers @Matt_Leathes

1 Like