pkumza / LibRadar

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

Output format #20

Closed singhaniashrinkhala closed 7 years ago

singhaniashrinkhala commented 7 years ago

On one system, when I run the script, I get the output as:

fringi@ubuntu:~/Desktop/RA/redis-3.2.7/LibRadar$ python LibRadar/libradar.py /home/fringi/Desktop/intent_classification/download/com.noodlecake.bitcoin.apk 

===== RESULT: ============
==========================
==========================

However, on the other, I get:

/Desktop/RA/redis-3.2.7/LibRadar$ python LibRadar/libradar.py /home/intent_classification/download/com.noodlecake.bitcoin.apk []

What could possibly be the reason?

pkumza commented 7 years ago

Version 2.1.0:

===== RESULT: ============
==========================
==========================

Version 2.1.1

[]

Recently I convert output format from raw print into JSON.

In this case, that means LibRadar could not find any libs in your apk, or there's something wrong with your Redis configuration.

singhaniashrinkhala commented 7 years ago

Any pointers on what could possibly be wrong with the Redis config? Because I ran the script for about 283 apks and it didn't pull up data for even one of them.

Thanks!

pkumza commented 7 years ago

Yes.

And you can use a way to determine whether the redis configuration is ok.

redis-cli -n 3

>>>keys *

If it's empty database, that means you haven't configure LibRadarData.rdb well.

singhaniashrinkhala commented 7 years ago

:/home$ redis-cli -n 3 127.0.0.1:6379[3]> keys (error) ERR wrong number of arguments for 'keys' command

pkumza commented 7 years ago
redis-cli -n 3
>>> keys *

and I got 276800 results from my database.

singhaniashrinkhala commented 7 years ago

Its empty.

The path that we have to edit in the redis.conf file, I have set it to: dir /home/redis-3.2.7/LibRadarData.rdb

Does this look okay?

`ubuntu@ip:/home/redis-3.2.7$ pwd /home/redis-3.2.7

ubuntu@ip:/home/redis-3.2.7$ ls 00-RELEASENOTES deps Makefile runtest src BUGS INSTALL MANIFESTO runtest-cluster tests CONTRIBUTING LibRadar README.md runtest-sentinel utils COPYING LibRadarData.rdb redis.conf sentinel.conf

ubuntu@ip:/home/redis-3.2.7$ `

pkumza commented 7 years ago

Oh no. LibRadarData.rdb is a file In your case, dir should be '/home/redis-3.2.7'

By the way, use 'ls -al' command to make sure that LibRadarData.rdb is a file.

singhaniashrinkhala commented 7 years ago
capture
singhaniashrinkhala commented 7 years ago

Still shows it to be empty.

pkumza commented 7 years ago

I mean...

Have you tried 'ls -al' at your home directory to exam if your LibRadarData.rdb is empty? (If possible, give me a screenshot of 'ls -al')

singhaniashrinkhala commented 7 years ago

:/home/redis-3.2.7# ls -al total 28728 drwxrwxr-x 7 root root 4096 Feb 24 05:29 . drwxr-xr-x 5 root root 4096 Feb 24 05:26 .. -rw-rw-r-- 1 root root 84607 Jan 31 15:32 00-RELEASENOTES -rw-rw-r-- 1 root root 53 Jan 31 15:32 BUGS -rw-rw-r-- 1 root root 1805 Jan 31 15:32 CONTRIBUTING -rw-rw-r-- 1 root root 1487 Jan 31 15:32 COPYING drwxrwxr-x 7 root root 4096 Feb 24 05:27 deps -rw-rw-r-- 1 root root 363 Jan 31 15:32 .gitignore -rw-rw-r-- 1 root root 11 Jan 31 15:32 INSTALL drwxr-xr-x 8 root root 4096 Feb 24 05:35 LibRadar -rw-r--r-- 1 root root 29189662 Feb 24 05:29 LibRadarData.rdb -rw-rw-r-- 1 root root 151 Jan 31 15:32 Makefile -rw-rw-r-- 1 root root 4223 Jan 31 15:32 MANIFESTO -rw-rw-r-- 1 root root 6834 Jan 31 15:32 README.md -rw-rw-r-- 1 root root 46695 Jan 31 15:32 redis.conf -rwxrwxr-x 1 root root 271 Jan 31 15:32 runtest -rwxrwxr-x 1 root root 280 Jan 31 15:32 runtest-cluster -rwxrwxr-x 1 root root 281 Jan 31 15:32 runtest-sentinel -rw-rw-r-- 1 root root 7606 Jan 31 15:32 sentinel.conf drwxrwxr-x 2 root root 4096 Feb 24 05:27 src drwxrwxr-x 10 root root 4096 Jan 31 15:32 tests drwxrwxr-x 7 root root 4096 Jan 31 15:32 utils

singhaniashrinkhala commented 7 years ago

I can see the database now, however:

python LibRadar/libradar.py /home/intent_classification/download/com.noodlecake.bitcoin.apk Segmentation fault

pkumza commented 7 years ago

Ah....

I never found Segmentation fault in LibRadar, even in python. Sorry I have totally no idea what happened to your environment.

In my opinion, it's still some bugs about Database configuration. If LibRadar gets wrong, commonly it will tell you which sentence goes wrong. Not this fatal fault type.

singhaniashrinkhala commented 7 years ago

It is working for some of the APKs though :)

Thank you so much for all your help!

pkumza commented 7 years ago

Oh, GREAT

You're welcome.. HAHA..