sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.58k stars 856 forks source link

[Feature] Add the possibility to pipe the outputs of a device #363

Open Arenash13 opened 4 years ago

Arenash13 commented 4 years ago

Is your feature request related to a problem? Please describe. I am trying to pipe the outputs of my frida scripts injected with Objection. It is possible with Frida core as explained here https://frida.re/news/2018/05/05/frida-11-0-released/. However it is not possible for the moment with Objection agent. (see snippet )

Describe the solution you'd like A solution could be to specify a flag like --stdio 'pipe' in the cli that would be passed to the Agent. (something like: see image ). By default stdio is set to None.

As it its a really small feature, I can add it myself and then open a PR if you find it to be useful.

Best regards

Additional context Snippet : https://github.com/sensepost/objection/blob/master/objection/utils/agent.py#L166

Image: spawned_device

leonjza commented 4 years ago

Yeah I think this will be good. A PR would be awesome. Right now we catch send()'s with this on_message handler and log output to the logfile located at ~/.objection/objection.log as a result of a monkey patch to click.secho here. These will have to be modified as well for something like this.