Skip to content

Console

metall0id edited this page Nov 25, 2014 · 2 revisions

The drozer Console is a command-line application, that connects to an Agent or a Server. It is written in Python, conforming to Python 2.7.3 syntax, because a dynamic language gives us the most flexibility for adding new functionality on-the-fly.

Command-line Interface

The Console is implemented using the Python cmd module. This provides a basic command-line environment, with readline support.

The Console reads commands a line at a time. It parses the command using shlex, and reads any command-line parameters using the argparse module.

drozer uses a subclass of cmd.Cmd, which implements several advanced features such as output stream redirection and Bash-style special variables.

Running in Development Mode

The drozer Console and Server are distributed as a single repository. A number of scripts are run to combine this repository with a release of the Agent, and transform the resultant objects into a release package.

In order to use the development package, you must set a number of environment variables:

  • add /path/to/drozer/bin to PATH; and
  • add /path/to/drozer/src to PYTHONPATH.

You should now be able to invoke drozer by running drozer console.

Building Java Libraries

Some modules push custom Java libraries to the Agent. These are implemented as .java source files, within the module repository. A Makefile is provided that compiles and dexes these to create a .apk file, that can be pushed to the device.

To build these files, execute the apks target.

Clone this wiki locally