-
Notifications
You must be signed in to change notification settings - Fork 858
Agent Development Environment
This article aims to explain how to configure a development environment for the Frida agent used in objection
.
Although objection
is built using many languages, TypeScript is used for the Frida agent. Before the agent can be used in objection, it has to go through a compilation phase to translate the TypeScript to an ES5 compatible JavaScript agent.
To start off with configuring a development environment for the Frida agent, ensure that you have both the node
and npm
commands available. Both of there should be installable using your Operating Systems package manager. Installing the latest versions of both these commands is also recommended. For more detailed instructions on how to install these, please refer to documentation relevant to your Operating System.
With the node
and npm
commands available, the following steps should get you up and running, building the final agent.js
.
-
cd
to theobjection/agent
directory. - Run the
npm install
command to grab all of the gazillion dependencies needed. This command should drop the dependencies in anode_modules
folder in the current directory. - Depending on your version of
npm
, thenpm run build
command may automatically run. If not, runnpm run build
to generate theagent.js
from the current TypeScript source code.
Running the npm run build
command will fire off a one shot compilation of the agent. If you are planning on developing for a while then you may want to consider the npm run watch
command. This command will watch the filesystem for changes (such as when you save a file) and automatically fire off a new compilation run for you.