Send to URL is a developer-friendly feature in Maltego. It takes the selected segment of the graph and posts a hybrid GraphML/XML to the page and returns a URL which Maltego opens in a browser.
This feature gives developers the flexibility to process the information from Maltego in any way they need to.
This feature can be used as follows:
This image below indicates where you can find the feature, Send to URL:
Following this, you will be asked for a URL. This URL is a web app/page that accepts data and processes it.
The image below shows a screenshot of the intercepted request made by Maltego with hybrid GraphML/XML in its POST request:
The web app then returns a URL to Maltego which is then opened in the web browser by Maltego.
The PHP Version 7.2.11 code (plot.php) used in this example is given below:
<?php
//pick POST data from GraphML
$xml = file_get_contents('php://input');
$xml_string = simplexml_load_string($xml);
//fetch details from GraphHML
$rows="";
foreach($xml_string->children() as $entity) {
if($entity->getName()=='entity')
$rows.="<tr><td>".$entity['type']."</td><td>".$entity->prop[0]."</td></tr>";
else
break;
}
//generate HTML table to plot details
$data="<table border='1'>
<tr>
<th>Entity Type</th><th>Entity Value</th>
</tr>
$rows
</table>";
//write details to a resource
file_put_contents("view.html",$data);
//return the URL of the resource to view it in a web browser
echo "http://".$_SERVER['SERVER_NAME']."/view.html";
?>