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.Properties (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
m.getProperty
(String property name)
Returns the value of the key, None if not defined Value
m.getTransformSetting
(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
TRX.addEntity
([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
TRX.addUIMessage
(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)
None
TRX.addException
(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
me.setType
(String Type)
Sets the type of the entity – see list of Entity definitions for possible values
me.setValue
(String Value)
Sets the value of the entity
me.setWeight
(Integer weight)
Sets the weight of the entity
me.addDisplayInformation
(String Value,
[String Label])
Adds display information for label named 'Label'. This field is rendered as HTML within Maltego. Default label is 'Info'.
me.addProperty
(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'
me.setIconURL
(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.
me.setLinkColor
(String HexColor)
Sets the color of the link to the node. Colors are in hex –for example '0xff00ff'
me.setLinkStyle
(Const Style)
Sets the style of the link to the node. The following constants should be used:
  • LINK_STYLE_NORMAL
  • LINK_STYLE_DASHED
  • LINK_STYLE_DOTTED
  • LINK_STYLE_DASHDOT
me.setLinkThickness
(Integer thickness)
Sets the thickness of the link to the node. Value is in pixels.
me.setLinkLabel
(String value)
Sets the label of the link to the node.
me.setBookmark
(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:
  • BOOKMARK_COLOR_NONE
  • BOOKMARK_COLOR_BLUE
  • BOOKMARK_COLOR_GREEN
  • BOOKMARK_COLOR_YELLOW
  • BOOKMARK_COLOR_ORANGE
  • BOOKMARK_COLOR_RED
me.setNote
(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