Sunday, April 17, 2011

APK to ascii or png

Hi !

Today, I updated the source code of Androguard by adding a new tool called androdd which dump an entire application. For now, I added only dot or png
(or any format supported by pydot) :
Usage: [options]
-h, --help show this help message and exit
-i INPUT, --input=INPUT
file : use this filename
-o OUTPUT, --output=OUTPUT
base directory to output all files
-d, --dot write the method in dot format
-f FORMAT, --format=FORMAT write the method in specific format (png, ...)
-v, --version         version of the API

desnos@destiny:~/androguard$ ./ -i examples/android/TC/bin/TC-debug.apk -o output -d -f png
desnos@destiny:~/androguard$ find output/org/t0t0/androguard/TC/

You can used this tool or directly the API :
desnos@destiny:~/androguard$ ./ -s
Androlyze version BETA 0

In [1]: a = APK( "./examples/android/TC/bin/TC-debug.apk" )
In [2]: d = DalvikVMFormat( a.get_dex() )
In [3]: dx = VM_BCA( d )
In [4]: ExportVMToPython( d )
In [5]: method2png( "myfunc.png", dx.get_method( d.CLASS_Lorg_t0t0_androguard_TC_TCMod1.METHOD_T1 ) )

But now, the pretty print function to show a method has basic color, and it's very cool ;) :

The TODO list of Androguard is very important, so if would like to join this open-source project, contact us !

See ya !

No comments:

Post a Comment