December 2017
Intermediate to advanced
860 pages
16h 1m
English
Cortana also provides a flexible approach while working with interfaces. Cortana provides options and functions to create shortcuts, tables, switching tabs, and various other operations. Suppose we want to add a custom functionality, such as when we press the F1 key from the keyboard, Cortana displays the UID of the target host. Let's see an example of a script that will enable us to achieve this feature:
bind F1 {
$sid ="3";
spawn(&gu, \$sid);
}
sub gu{
m_cmd($sid,"getuid");
on meterpreter_getuid {
show_message( " $3 ");
}
}
The preceding script will add a shortcut key, F1, that will display the UID of the target system when pressed. The bind keyword in the script denotes binding of functionality with the F1 key. ...
Read now
Unlock full access