Monday, April 8, 2013

TRX - Framework for writing Python transforms with the TDS

Hi there people from the Interwebs,

We wrote a 'framework' for writing Python transforms with the Maltego TDS. It's called TRX and it's pretty light, easy to use and very hip. It should see you writing kick ass transforms in no time - a complete transform could look as simple as this:

def trx_DNS2IP(m):
  TRX = MaltegoTransform()
  DNSName=None
  try:
    DNSName = socket.gethostbyname(m.Value)
    TRX.addEntity("maltego.IPv4Address",DNSName)
  except socket.error as msg:
    TRX.addUIMessage("Problem:"+str(msg),UIM_PARTIAL)
  return TRX.returnOutput() 


The document nicely explains the differences between local transforms and TDS transforms and also includes a complete entity reference guide as well as addressing the confusion between V2 and V3 entities - a must read for any transform developer. The document also takes a look at the future of the TDS.

Here is the index of the document - click to read.

Finally the framework / source code can be found [here]. We recommend that you print out the guide and keep it next to your bed. Or in the bathroom - where ever you are going to have the most free time.

Enjoy!

RT

No comments:

Post a Comment