Recent

Author Topic: Help with decrypting OpenDocument files  (Read 4584 times)

rvk

  • Hero Member
  • *****
  • Posts: 6199
Re: Help with decrypting OpenDocument files
« Reply #15 on: July 28, 2023, 11:24:33 am »
If I zip files with 7zip and use 0 - Store as compression level, I notice the resulting zip has "Copy" as method.
While the pwd 123.ods (when opened with 7zip) shows "Store" as method.
Maybe zipper can handle "Copy" but not "Store"  ::)
(you could create a zip with 7zip
Sorry about this confusion but the "Copy" method in 7zip is only for 7zip format, not for .zip  :-[

I did notice that the file mimetype in "no pwd.zip" is also Store, and that one can be extracted.
It can even be extracted from the "pwd 123.zip". Weird that content.xml fails.

I also noticed that the "Version" in the pwd and nopwd are 20, while my 7zip created zip with version 10.
But because zipper can extract the content.xml from no pwd (with version 20) this should matter much.


wp

  • Hero Member
  • *****
  • Posts: 12013
Re: Help with decrypting OpenDocument files
« Reply #16 on: July 28, 2023, 11:51:53 pm »
Used the code below to unzip the "pwd 123.ods" file in Delphi, and this extracts the encrypted files correctly. Indicates that there really is a bug in our zipper...

Code: Pascal  [Select][+][-]
  1. // Delphi code!
  2. uses
  3.   System.SysUtils,
  4.   System.Zip;
  5. var
  6.   zipfile: TZipFile;
  7. begin
  8.   zipFile := TZipFile.Create;
  9.   try
  10.     zipFile.Open('..\..\..\pwd 123.ods', zmRead);
  11.     zipFile.Extract('content.xml');
  12.     zipFile.Close;
  13.   finally
  14.     zipFile.Free;
  15.   end;
  16. end.

wp

  • Hero Member
  • *****
  • Posts: 12013
Re: Help with decrypting OpenDocument files
« Reply #17 on: July 29, 2023, 04:45:21 pm »

 

TinyPortal © 2005-2018