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

How to find out in which method a string is used? #113

Closed
zyrikby opened this issue Jul 1, 2015 · 2 comments
Closed

How to find out in which method a string is used? #113

zyrikby opened this issue Jul 1, 2015 · 2 comments
Assignees

Comments

@zyrikby
Copy link
Contributor

zyrikby commented Jul 1, 2015

I would like to find out how to detect a method in an application where a particular string is used? E.g., it is common to specify content provider by a string. So I would like to know in which method the string is used.

@adesnos adesnos self-assigned this Jul 17, 2015
@leonid-s-usov
Copy link
Contributor

just iterate over tainted strings; when you find the matching string value get the method reference from the TaintedVariable

for tv, candidate in self.vmx.get_tainted_variables().get_strings():
    # if match(candidate):
        # tv.show_paths()

@adesnos
Copy link
Member

adesnos commented Sep 14, 2015

With the new analysis you can do:
In [7]: print dx.get_strings_analysis()["YOUR_STRING"]

@adesnos adesnos closed this as completed Sep 14, 2015
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

3 participants