Main pyREtic decompilation functionality Encompasses both a way to walk a series of objects (filesystem or memory) as well as the way in which the bytecode is obtained (via unmarshalling or importing)
Mirror all the attributes of the module we are masquearding as so that we can be called as that module would be from other areas of the code and expected functionality is maintained
Walk the filesystem from start directory indicated & to the depth indicated
For each object and traverse into children and decompile - no unmarshaling
No access to unmarshaling required
Walk the filesystem from start directory indicated & to a depth inidicated
The unmarshal technique will be used on each .pyc/.pyo found
Setup the initial project structure on the filesystem
Return False on error & True on successful creation of new project dirs
Pure in-memory decompile.
Start at the specified object and traverse into children and decompile
No file system access, marshal access or bytecode access required
Create a new project, setting the version of python it is for to the version supplied
Try and expand environment variables and ‘~’ etc that are in paths
If there was a problem creating the new project structure restore the previous values