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

What did you do to get it to work?

Hey, in the end we used the library matt posted, and decompressed the suspend data, processed in google docs using their script functionality as we’re processing large volumes of data.

If you head over to the website that Matt gave, there is a link to a live example of the library where you can try it out. I downloaded a copy of this and re-engineered using the decompress function. My JavaScript skills aren’t the best but managed to fumble through it.

LZ-UTF8 Demo (rotemdan.github.io)

If you don’t have much coding skills, this might be a little challenging, if you do, then you should be able to figure it with normal coding approach.

Got it. Thank you!

Have a great day!

James

1 Like