EC-DIGIT-CSIRC / sysdiagnose

Forensic toolkit for iOS sysdiagnose feature
European Union Public License 1.2
114 stars 8 forks source link

[Bug] Can't run the scripts from another folder because of relative paths used #49

Open Te-k opened 1 year ago

Te-k commented 1 year ago

If you run the tools from another folder, it wont' work :

$ python ~/tools/forensic/sysdiagnose/initialyze.py file FILE      
Could not read version info, bailing out. Something is wrong: [Errno 2] No such file or directory: 'VERSION.txt'

This is because the get_version function checks for VERSION.txt in the local folder instead of the script folder. It would be nice to allow to run it from another folder

kwouffe commented 1 year ago

Fixed in cce398f

However, it create a new potential issue:

data folders (extracted data and parsed data) and cases json are created in the folder from where the initialize script is executed. We may want to discuss the expected behavior:

Te-k commented 1 year ago

I think the final parsed data should be generated in the local folder or at least have an option to do so, it doesn't seem logical to me to have parsed data in the tool folder.

cvandeplas commented 1 month ago

This will be addressed in a way in the new model of things in the big cleanup PR #64 (work in progress). In short: for now parsers should always be called from the parsing.py script. In a later iteration we can re-initiate the standalone behaviour of the parsers, whenever we refactor them as subclass of a Parser class.

cvandeplas commented 1 month ago

hmm, now I notice there are much more things that break, keeping this open until we fix it