[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-18 Thread Massimo Sala
Massimo Sala added the comment: I choosed to use the internal variable *concat* because - if I recollect correctly, it is calculated before successive routines; - I didn't see your solution (!), there is a very nice computed variable in front of my eyes. Mmh 1) Reliability Cannot be sure

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-18 Thread Massimo Sala
Massimo Sala added the comment: Sorry I forgot to mention one specific case. We have valid archives with a starting "blob": digitally signed zip files, their filename extension is ".zip.p7m". I agree your tip can be useful to other readers. Best regards, Sala On Sat,

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-18 Thread Massimo Sala
Massimo Sala added the comment: Hi Daniel Could you please elaborate the advantages of your loop versus my two lines of code? I don't grasp... Thanks, Massimo On Sat, 18 Apr 2020 at 03:26, Daniel Hillier wrote: > > Daniel Hillier added the comment: > > Could something si

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-18 Thread Massimo Sala
Massimo Sala added the comment: Hi Serhiy Thanks for the suggestion but I don't need to analyse different self-extraction payloads (and I think it is always unreliable, there are too many self-extractors in the wild). I spend two words about my work. I analyze ZIP archives because the

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-18 Thread Massimo Sala
Massimo Sala added the comment: On Sat, 18 Apr 2020 at 04:37, Steven D'Aprano wrote: If we made an exception for you, then people using Python 2.7 still couldn't use this feature: `myzipfile.offset` would fail on code using Python 2.7, 2.7.1, 2.7.2, 2.7.3, ... 2.7.17 and

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-17 Thread Massimo Sala
Massimo Sala added the comment: Hi Steven Every software "ecosystem" has its guidelines and I am a newbie about python development. Mmh I see your concerns. I agree about your deletions of all py 3 versions before the latest 3.9. About Py 2, I remark these facts: - there ar

[issue40271] Allow shell like paths in

2020-04-16 Thread Massimo Sala
Massimo Sala added the comment: Gavin, zipfile works on all the operating systems where python runs. Your request is OS dependent... BSD? linux? The tilde isn't into the ZIP file specifications. I have to agree with Serhiy: the correct solution is os.path.expanduser(&qu

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-16 Thread Massimo Sala
Change by Massimo Sala : -- title: zipfile module: new feature (two lines of code) -> zipfile module: new feature (two lines of code), useful for test, security and forensics ___ Python tracker <https://bugs.python.org/issu

[issue40301] zipfile module: new feature (two lines of code)

2020-04-16 Thread Massimo Sala
New submission from Massimo Sala : module zipfile Tag "Components": I am not sure "Library (Lib)" is the correct one. If it isn't, please fix. I use python to check zip files against malware. In these files the are binary blobs outside the ZIP archive. The malware