]> xmof Git - DeDRM.git/commitdiff
Merge pull request #848 from sretlawd/kfx_dsn_fix
authorApprentice Harper <apprenticeharper@gmail.com>
Thu, 30 Jan 2020 12:04:00 +0000 (12:04 +0000)
committerGitHub <noreply@github.com>
Thu, 30 Jan 2020 12:04:00 +0000 (12:04 +0000)
Allow decryption with DSN only.

1  2 
dedrm_src/kfxdedrm.py

index aed38d98313d9ceb8ed84aa90dac77541b477ea0,4648893e52cea547e954688b5c6cc2082c2c77ed..1520f79180d81f57699f209f61a2c57b35d557f8
@@@ -66,10 -65,10 +66,10 @@@ class KFXZipBook
              else:
                  raise Exception(u'The .kfx-zip archive contains an encrypted DRMION file without a DRM voucher')
  
 -        print u'Decrypting KFX DRM voucher: {0}'.format(info.filename)
 +        print(u'Decrypting KFX DRM voucher: {0}'.format(info.filename))
  
          for pid in [''] + totalpids:
-             for dsn_len,secret_len in [(0,0), (16,0), (16,40), (32,40), (40,40)]:
+             for dsn_len,secret_len in [(0,0), (16,0), (16,40), (32,40), (40,0), (40,40)]:
                  if len(pid) == dsn_len + secret_len:
                      break       # split pid into DSN and account secret
              else: