This article describes the most basic setup environment for the Maltego TRX Python Library in a development environment.
Creating a Transform Server
By design, the Transform Server should sit within a network that has access to the endpoint that exposes the data you need it to interact with, such as a SQL Server or REST APIs. Maltego, therefore, does not prescribe what such a server should be nor does it provide an installable version of the Server itself such as a Docker or VM image. Any server or Virtual Machine will be enough to act as a Transform Server if it can expose port 8080 (or 80) to the iTDS and allow HTTP (XML) traffic through.
The Maltego TRX Python Library requires Python 3 to be installed. This can be installed through the various Linux distribution’s package manager, or with a Windows installer directly from the source. Be sure to also install the Python package installer, PIP.
The Maltego TRX Python Library is hosted on PyPI, the Python Package Index. Therefore, you can install it using PIP:
$ pip install maltego-trx
Following installation you can create a new project in your preferred folder, using:
$ maltego-trx start <project name>
Transforms will be added to the ‘Transforms’ folder within the new project folder. A sample ‘GreetPerson.py’ file is included for reference.
To start the server in Developer mode, run this command from within the project folder:
$ python project.py runserver
This will start up a development server that automatically reloads every time the code is changed.