asthook-manager

Usage

usage: asthook-manager [-h] {list,remove,start_server,stop_server,diff} ...

Asthook manager

optional arguments:
  -h, --help            show this help message and exit

service:
  {list,remove,start_server,stop_server,diff}
    list                list project
    remove              remove project
    start_server        start server
    stop_server         stop server
    diff                difference between 2 compilers or/and 2 projects

Warning

If you want to use asthook-manager when you are in dev environment. modify asthook-manager and change variable DEV to True

Server

Server option allows users to make ast tree on another server or locally keep in ram a previous analyses. (in both cases the analysis will be done quickly than before)

To use it you should start the server with asthook-manager start_server, by default, hostname is localhost and port is 6000. But you can change it with options –hostname and –port

Now the server was started you can use asthook with –server <hostname>:<port> to launch ast analysis on the server.

List

Option –list basically list all project already analyses if you want to filter projects you can add option –search with a regexp

Remove

Option –remove <project> basically remove project target

diff

Option –diff make possible to compare 2 APKs or/and 2 compilers

usage: asthook-manager diff [-h] [--project1 PROJECT1] [--project2 PROJECT2]
                            [--decompiler1 DECOMPILER1]
                            [--decompiler2 DECOMPILER2] [--globing GLOBING]

optional arguments:
  -h, --help            show this help message and exit
  --project1 PROJECT1   project1
  --project2 PROJECT2   project2
  --decompiler1 DECOMPILER1
                        decompiler1
  --decompiler2 DECOMPILER2
                        decompiler2
  --globing GLOBING     globing to include only certain files

When you precise only one decompiler the same will be chosen for comparing 2 APKs. When you precise only one project, the same will be chosen for comparing 2 version of the APK.

To analyse only a part of the APK you can set a blobbing path by default the value is “**/*