SafeExamBrowser / seb-win

Safe Exam Browser 2.x for Windows. IMPORTANT: This is the legacy version which isn't actively developed anymore.
https://safeexambrowser.org/windows/win_usermanual_en.html
69 stars 52 forks source link

.seb decryption for python #101

Closed semarainc closed 3 years ago

semarainc commented 4 years ago

Hi, i'm interested to learn how to unpack .seb file using python and what im doing is using RNCryptor like this post did https://github.com/SafeExamBrowser/seb-win/issues/73

What i was doing:

  1. decompress the seb file using gzip
  2. try to decrypt using RNCryptor (i also strip the header (my header: pwcc))
  3. decompress the decrypted file
  4. get the xml

but i failed when trying to decrypt on step 2 and it says "Bad Data"

i'm pretty sure that my .seb file is in good condition and the password is correct (Password: 1234)

i already read the documentation also the last post about similar issue, but i'm still getting "Bad Data" Link for documentation about .seb format: https://safeexambrowser.org/developer/seb-file-format.html

Here's what im doing so far

import zlib
import gzip
cryptor = rncryptor.RNCryptor()

binary = gzip.open("SEB_test.seb", 'rb')
f = binary.read()
binary.close()

#im  getting error here
dec_data = (rncryptor.decrypt(f[4:], '1234'))

Just if someone interested i provided the link for the seb config: https://drive.google.com/file/d/1WaLAXNVKC8V6c5COF53tLnvh9iNByro9/view?usp=sharing

i hope someone can give me a guidance for this issue

Thank you

dbuechel commented 3 years ago

Thanks for your report. SEB 2.x is no longer actively developed, we thus won't be able to solve this issue and highly recommend you using the latest version of SEB 3.x: https://github.com/SafeExamBrowser/seb-win-refactoring/releases. Should you encounter the same problem with SEB 3.x as well, please feel free to report it again under https://github.com/SafeExamBrowser/seb-win-refactoring/issues.