-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix #138, add globbing to stdapi_fs_ls #139
Conversation
This is timing out currently on iOS |
What do you mean by timing out? |
We might just override glob in iOS's libc with the musl one unconditionally https://git.musl-libc.org/cgit/musl/tree/src/regex/glob.c |
It seems the call to glob (https://github.com/rapid7/mettle/pull/139/files#diff-5bf4b5b8f1b639f9de20cda70d2fdb28R93) never returns so we get:
How would I go about overriding the libc version? Just add it to mettle/src/compat/glob.c? |
That could be one way. If glob is not a weak symbol in libc (meaning you can easily override it via the linker), you could also rename the exported function to 'musl_glob' or something. If you wanted to selectively redirect 'glob' to 'musl_glob' then, you could do something like this with a preprocessor define, or just call it directly: https://github.com/libressl-portable/portable/blob/master/include/compat/stdio.h#L33 |
Marking this unblocked, @space-r7 and I can look at it today. |
Looks good, landing. |
This is a large update to mettle payloads including: * Adds globbing support to the `ls` command (rapid7/mettle#139) * Fixes crashes on iOS platforms when cryptTLV is enabled (rapid7/mettle#142) * Fixes display of the OS version on macOS and iOS (rapid7/mettle#143) * Fixes the local port handling for pivoted client network connections (rapid7/mettle#144) * Fixes an unaligned memory access in TLV packet handling, needed for some CPUs (rapid7/mettle#145) * Fixes some compatibility issues building on Solaris (rapid7/mettle#147) * Updated libpcap, mbedtls, and libcurl to the latest versions (rapid7/mettle#146)
Now that we have this, I say we just go ahead and implement fs_search. I can probably pull that together real quick since we have the primitives. |
This implements support for globbing on stdapi_fs_ls.
This is mostly useful because it fixes the tab completion :)
Unfortunately we still get:
even though it is supported by this pr.
To fix that we can either implement stdapi_fs_search (in a separate pull request) or find another way for the framework side of things to know if globbing is supported.
See #138 for more details.