Official Maltego Documentation » Developer Portal » Reference Guides » Python TRX Library Reference (iTDS)

Python TRX Library Reference (iTDS)

Input Entity Object

This object is used to read the Maltego request. It is passed along to each transform and is assigned to the variable "m". The attributes below provide details about the input entity.

Member Name Description
m.Value (String) The value of the node as displayed on the graph. Note that this is not necessarily the value you want work with (see URL entity).
m.Weight (Integer) The weight of the node.
m.Slider (Integer) The slider's value – e.g. how many results should be returned.
m.Type (String) The type of the input node. See entity definitions for possible values.
m.Property (List) A list of properties of the node. Name, value pairs as strings
m.TransformSettings (List) The settings for the transform. A list of name, value pairs as strings.


Available Methods

The following methods are defined to read entity properties and transform settings. You can read it straight out of the Property and TransformSettings list, but it's nicer to use these functions as they do some error checking:

Member Name Description Returns
(String property name)
Returns the value of the key, None if not defined Value
(String transform setting name)
Returns the value of the key, None if not defined Value

Transform Object

This is used to construct the reply to the iTDS. All values are strings.

TRX = MaltegoTransform()

Available Methods

Method Name Description Returns
([String Type,
String Value])
Adds an entity to the return vessel with type 'Type' and value 'Value'. Note that these can be set using functions in MaltegoEntity library. MaltegoEntity
(String msg,
Const type)
Shows a message 'msg' in the Maltego GUI. Types could be
  • UIM_FATAL (pop up window)
  • UIM_PARTIAL (yellow)
  • UIM_INFORM (default)
  • UIM_DEBUG (light gray)
(String msg)
Throws a transform exception None
TRX.returnOutput() Returns the XML of the vessel None

Entity Object

This is the object that defines a single entity within Maltego. An entity can be created using the 'addEntity' method in the MaltegoTransform class.

me = TRX.addEntity(type, value)
Method Name Description
(String Type)
Sets the type of the entity – see list of Entity definitions for possible values
(String Value)
Sets the value of the entity
(Integer weight)
Sets the weight of the entity
(String Value,
[String Label])
Adds display information for label named 'Label'. This field is rendered as HTML within Maltego. Default label is 'Info'.
(String propertyname,
String displayname,
String matchingrule,
String value)
Adds a property to the entity. Each property has a name, value and a display name. The display name is how it will be represented within Maltego. The matching rule determines how entities will be matched and could be 'strict' (default) or 'loose'
(String URL)
If set it will change the appearance of the icon. The URL should point to a PNG or JPG file. Maltego will size to fit but lots of large files will drain resources.
(String HexColor)
Sets the color of the link to the node. Colors are in hex –for example '0xff00ff'
(Const Style)
Sets the style of the link to the node. The following constants should be used:
(Integer thickness)
Sets the thickness of the link to the node. Value is in pixels.
(String value)
Sets the label of the link to the node.
(Const Color)
Sets the bookmark color of the node. Keep in mind that these are chosen from a set number of colors. Use the following constants:
(String note)
Creates an annotation to the node with value 'note'. If a subsequent transform sets an annotation on the node it will appended to the note.
Continue to the Python Local Library Reference page.

Official Maltego Documentation
Developer Portal
Reference Guides
Python TRX Library Reference (iTDS)

© Copyright 2017, Paterva PTY Limited