资 源 简 介
PyMaltego is a python module which provides facilities for creating and interacting with Maltego Transforms. The module provides both a WSGI compliant server application, and also client utilities.
The PyMaltego module is primarily designed for creating new Transforms, however it is equally capable of querying remote Transforms. Using PyMaltego, it is possible to easily create Transform middleware.
An example transform:
```
import maltego
import socket
class DNSToIPAddress(maltego.Transform):
def init(self):
super(DNSToIPAddress, self).init(
display_name = "DNS name to IP Address",
author = "My Self",
input = maltego.DNSName,
output = maltego.IPAddress,
)
def transfrom(self, entities, *args, **kwargs):
ret_list = []
for dnsname in entities:
ip = socket.gethosybyname( dnsname.value )
ipaddr = maltego.IPAddress( ip )
ret_list.append( ipaddr )
return ret_list
```