mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
Add Ctrl+C and Ctrl+Z support to gui console.
git-svn-id: file:///home/svn/framework3/trunk@10641 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
b6c4d1fc00
commit
e981b89ed4
Binary file not shown.
@ -334,6 +334,18 @@ public class InteractWindow extends MsfFrame {
|
||||
}else if(evt.getKeyCode() == KeyEvent.VK_DOWN){
|
||||
currentCommand = (currentCommand + 1) % commands.size();
|
||||
inputField.setText(commands.get(currentCommand).toString());
|
||||
}else if (evt.isControlDown() && cmdPrefix.equals("console.")) {
|
||||
try {
|
||||
if (evt.getKeyCode() == KeyEvent.VK_C){
|
||||
rpcConn.execute("console.session_kill", session.get("id"));
|
||||
outputArea.append("killing session...\n");
|
||||
}else if (evt.getKeyCode() == KeyEvent.VK_Z){
|
||||
rpcConn.execute("console.session_detach", session.get("id"));
|
||||
outputArea.append("backgrounding session...\n");
|
||||
}
|
||||
} catch (MsfException ex) {
|
||||
JOptionPane.showMessageDialog(null, ex);
|
||||
}
|
||||
}
|
||||
}//GEN-LAST:event_inputFieldKeyPressed
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user