Cortana Tutorial - Armitage
Cortana Tutorial - Armitage
Cortana Tutorial - Armitage
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
filter host_image {<br />
$address = $2['address'];<br />
}<br />
if ($address hasservice 22) {<br />
push($1, script_resource("ssh.png"));<br />
}<br />
if ($address hasservice 80) {<br />
push($1, script_resource("www.png"));<br />
}<br />
if ($address hasservice 445) {<br />
push($1, script_resource("smb.png"));<br />
}<br />
return @_;<br />
Here's a screenshot of this filter in action:<br />
6. Building User Interfaces<br />
Figure 4. <strong>Armitage</strong> Hosts with <strong>Cortana</strong>-altered Icons<br />
<strong>Cortana</strong> User Interfaces<br />
So far, we've learned how to build simple bots and write scripts to add popups and bind<br />
keyboard shortcuts in <strong>Armitage</strong>. This section will show you how to create simple user<br />
interfaces using <strong>Cortana</strong>.<br />
<strong>Armitage</strong> uses text consoles and tables to present information to the user. That's it. 90% of<br />
the <strong>Armitage</strong> functionality can be replicated with a text console or a simple table. Showing<br />
you how to replicate this functionality is the purpose of this section.<br />
Text Tabs<br />
<strong>Cortana</strong> presents a simple text console that is very full featured and easy to work with. To<br />
create a console tab from your script, use the &open_text_tab function. Here are its<br />
arguments:<br />
$tab = open_text_tab("tab title", $argument, "all", "tab_hook", &foo, 1);<br />
The only required argument is the first one. This string is the title of the tab. The<br />
&open_text_tab function returns a reference to the text tab. You may write to the text tab<br />
with the &append function.<br />
29