pkumza / LibRadar

LibRadar - A detecting tool for 3rd-party libraries in Android apps.
Apache License 2.0
256 stars 51 forks source link

Lite version still "requires" Redis #38

Closed IzzySoft closed 7 years ago

IzzySoft commented 7 years ago

I tried to follow your short guide on the Lite version, but the call in step 3 failed:

$ python LibRadar/libradar.py foo.apk
Traceback (most recent call last):
  File "LibRadar/libradar.py", line 25, in <module>
    import dex_tree
  File "/x/LibRadar/dex_tree.py", line 28, in <module>
    import redis
ImportError: No module named redis

Wouldn't help to simply comment out that import, as the modul is used in multiple places in dex_tree.py (and thus commenting out would break the "ordinary version"). But even with commenting out (including the two places it is adressed), the data file is not found as it's looked for relative from where the module was called – so one must cd into the LibRadar directory and call it from there. Which then works.

PS: the library definition changes from V1 should be adopted. It e.g. still counts "Package": "Lcom/bumptech" as "Bump Pay", which is definitely wrong (that would be com/bump – and what that test APK had (and was detected in addition) was "Glide", com/bumptech/glide :flushed:

pkumza commented 7 years ago

Oh...I'll check it out and create a definitely lite version tonight.

(In fact you could use pip install redis to solve this as in current lite version it just import redis but never connect to a redis server.)

I've migrate many from V1 to V2 but not all. There's too much work to do.

This is the rule:

Lcom/bump,Bump pay,Payment,
Lcom/bumptech,no,,
Lcom/bumptech/glide,Glide,Development Aid,https://github.com/bumptech/glide/

It should be the reason that com/bumptech/glide matches com/bump first. I will check the matching algorithm to solve the bug today.

I didn't take "Lcom/bumptech" as "Bump Pay", I take "Lcom/bump" as "Bump Pay".

so one must cd into the LibRadar directory and call it from there. Which then works.

I've found that's definitely trouble and I've solved this problem today.

pkumza commented 7 years ago

Lite version finished! Check this https://github.com/pkumza/LiteRadar @IzzySoft