Skip to content
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

CodeSearch not working #9

Open
su-vikas opened this issue Apr 14, 2024 · 3 comments
Open

CodeSearch not working #9

su-vikas opened this issue Apr 14, 2024 · 3 comments

Comments

@su-vikas
Copy link

su-vikas commented Apr 14, 2024

Hi,

I am exploring the code search functionality of this library. While running the script 'api-search-for-function-use.py' I get,

ImportError: cannot import name 'CodeSearch' from 'strongarm.objc' (/opt/homebrew/lib/python3.11/site-packages/strongarm/objc/__init__.py)

And on looking in the objc folder, there is no corresponding code either. Is this functionality is internal to DataTheorem or am I missing something?

@codyd51
Copy link
Contributor

codyd51 commented Apr 14, 2024

Hi! The CodeSearch implementation and functionality is indeed internal to Data Theorem.

However, you can achieve the same sort of goal via publicly available APIs such as these:

MachoAnalyzer.calls_to(self, address: VirtualMemoryPointer) -> List[CallerXRef]
MachoAnalyzer.objc_calls_to(
    self, 
    objc_class_names: List[str], 
    objc_selectors: List[str], 
    requires_class_and_sel_found: bool,
) -> List[ObjcMsgSendXref]

These APIs leverage functionality provided by the strongarm-dataflow package, which is closed source and is distributed as a compiled wheel here.

@su-vikas
Copy link
Author

I will look into the alternatives you mentioned. And thanks for this library :). Do you guys plan to update this library to support swift as well, anytime in future?

@codyd51
Copy link
Contributor

codyd51 commented Apr 18, 2024

No worries, I hope you get some use out of it!

I wrote the bulk of this library, but no longer work at Data Theorem (as of last month). You'd have to get some input from my former colleagues re Swift support, but I wouldn't imagine it'll land any time in the foreseeable future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants