Closed ChiChou closed 1 year ago
Before merging it, I wonder if we can maybe it zip safe instead
@yotamN then you have to add extra checks in all of them to read from zip (.egg) format instead of constructing paths from __file__
https://github.com/frida/frida-tools/blob/f0867e206f7b9127940c18e1a985626223c03c69/frida_tools/ls.py#L41 https://github.com/frida/frida-tools/blob/f0867e206f7b9127940c18e1a985626223c03c69/frida_tools/push.py#L51 https://github.com/frida/frida-tools/blob/f0867e206f7b9127940c18e1a985626223c03c69/frida_tools/pull.py#L62 https://github.com/frida/frida-tools/blob/f0867e206f7b9127940c18e1a985626223c03c69/frida_tools/tracer.py#L343 https://github.com/frida/frida-tools/blob/f0867e206f7b9127940c18e1a985626223c03c69/frida_tools/rm.py#L44
It seems that the property is deprecated so I don't think it's worth refactoring everything to be zip safe.
Keeping the property is fine I guess, so I will merge.
tracer.py uses relative path to locate
tracer_agent.js
. If the package has been installed as zip (.egg),frida-trace
can't read from the tracer template, thus result in failure.To reproduce, clone this repo and run
python3 setup.py install
on a clean machine (that has not installedfrida-tools
before), then usefrida-trace
command. Then it will complain[Errno 20] Not a directory: ...tracer_agent.js