-
Notifications
You must be signed in to change notification settings - Fork 818
Console
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.
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.
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/bintoPATH; and - add
/path/to/drozer/srctoPYTHONPATH.
You should now be able to invoke drozer by running drozer console.
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.