--aux can only pass string, bool and int values to Device.spawn(), while
the env/envp options take a mapping, so there was no way to set an
environment variable when spawning, e.g. DISABLE_TWAKS=1 to work around
ellekit crashes on iOS.
Add a repeatable --env KEY=VALUE that feeds the env parameter, which
merges into the environment the spawn would otherwise inherit.
Fixes#193
It now writes all events to the ringbuffer, so the file no longer
contains start and compile messages. Change its magic to "ITR2", and
drop the basic block count from the progress display.
TypeScript 6 no longer picks up all @types packages by default, so list
them explicitly, and set rootDir as it no longer defaults to the common
source directory.
Publishing will be done from CI using trusted publishing, so the twine
issue that made us revert to setuptools no longer applies.
Also install tracer_ui.zip where the tracer expects it, and make the
wrapper scripts optional so they don't end up in wheels, which get
theirs from the entry points.
Explain in --help what a target can be, that arguments after it are
passed to the spawned program, and that -- is needed before ones that
start with -.
Fixes#188
Some devices fail the whole full-scope enumeration when an app icon
cannot be loaded, e.g. Android raising Resources$NotFoundException for
sym_def_app_icon. Retry with the minimal scope and warn, so the listing
still works.
Refs frida/frida#3762
MemoryRepository keyed its handlers by TraceTarget, which is unhashable,
so every handlers:get request raised a TypeError. Key by its identifier
instead.
A message queued on the reactor before stop() could be handled after it,
reaching self._script.post() with _script set to None. Ignore messages
once stopped.
Make test_basics fail when the reactor thread raises, and add tests for
both cases.
Fixes#150
Browsers send IPv6 origins as http://[::1]:PORT, but the allow-list
was built as http://::1:PORT, so with --ui-host ::1 every request to
the UI was rejected with 403.
Fixes#203
While investigating the repl_inspect.py regression (addressed in the
previous commit), it was spotted that other files are missing from the
sources list. The consequences have not been investigated specifically
but it seems prudent to ship all those files.
Commit f7384b5498 introduces a dependency
on a new file (repl_inspect.py) without adding it to meson.build; this
means that `make install` doesn't deploy this file, leading to trivial
import issues down the line.
Spotted with trivial commands like `frida -f /usr/bin/df` initially, but
even `frida --help` fails:
$ frida --help
Traceback (most recent call last):
File "/usr/bin/frida", line 6, in <module>
import frida_tools.repl
File "/usr/lib/python3/dist-packages/frida_tools/repl.py", line 32, in <module>
from frida_tools import _repl_magic, repl_inspect
ImportError: cannot import name 'repl_inspect' from 'frida_tools' (/usr/lib/python3/dist-packages/frida_tools/__init__.py)
Regression first published with 17.15.0, while 17.14.1 was still fine.
When completing in an interactive session one is normally not interested
in names like `__defineGetter__` and `__lookupGetter__`, but they were
listed first. Sort names starting with an underscore after the others,
with dunder names at the very end, and compare case-insensitively.
Evaluating an expression that yields a generator or other iterator object
printed an empty object, since such objects have no own enumerable keys.
Encode them as a new tagged value by pulling up to 100 items, marking when
more remain, and label them by their toStringTag so a generator shows as
Generator[...] and a Map iterator as Map Iterator[...]. The iterator is
consumed by the display, as it would be by any other means of looking at
its items.
Emit a package's modules, declarations and patterns into a directory
through Compiler.build_library(), or keep them fresh with -w through
watch_library().