diff --git a/data/gui/msfgui.jar b/data/gui/msfgui.jar
index d077263e34..b9742c4e94 100644
Binary files a/data/gui/msfgui.jar and b/data/gui/msfgui.jar differ
diff --git a/external/source/gui/msfguijava/src/msfgui/InteractWindow.java b/external/source/gui/msfguijava/src/msfgui/InteractWindow.java
index b9833bfc52..4cbc81ea2d 100644
--- a/external/source/gui/msfguijava/src/msfgui/InteractWindow.java
+++ b/external/source/gui/msfguijava/src/msfgui/InteractWindow.java
@@ -151,7 +151,8 @@ public class InteractWindow extends MsfFrame implements ClipboardOwner {
publish(received);
} catch (MsfException ex) {
MsfguiApp.showMessage(null, ex);
- if(!ex.getMessage().contains("timed out")) // on timeout, just retry
+ if(ex.getMessage().toLowerCase().contains("unknown session") // we're dead.
+ || !ex.getMessage().contains("timed out")) // on timeout, just retry
timerCommand.setCharAt(0, STOP_POLLING);
}
lock.unlock();
diff --git a/external/source/gui/msfguijava/src/msfgui/MainFrame.form b/external/source/gui/msfguijava/src/msfgui/MainFrame.form
index 6455f7c0c3..3ea7f50905 100644
--- a/external/source/gui/msfguijava/src/msfgui/MainFrame.form
+++ b/external/source/gui/msfguijava/src/msfgui/MainFrame.form
@@ -874,9 +874,6 @@
-
-
-
diff --git a/external/source/gui/msfguijava/src/msfgui/MainFrame.java b/external/source/gui/msfguijava/src/msfgui/MainFrame.java
index 82f421c049..8ef59de34d 100644
--- a/external/source/gui/msfguijava/src/msfgui/MainFrame.java
+++ b/external/source/gui/msfguijava/src/msfgui/MainFrame.java
@@ -228,7 +228,9 @@ public class MainFrame extends FrameView {
publish(sessionList);
}
//Update jobs
- Map jlist = (Map) ((Map)rpcConn.execute("job.list")).get("jobs");
+ Map jlist = (Map) ((Map)rpcConn.execute("job.list"));
+ if(jlist.containsKey("jobs"))
+ jlist = (Map)jlist.get("jobs");
TreeMap orderedJobsList = new TreeMap();
orderedJobsList.putAll(jlist);
int i = 0;
@@ -1633,13 +1635,15 @@ nameloop: for (int i = 0; i < names.length; i++) {
jobPopupMenu = new JPopupMenu();
addSessionItem("Info",jobPopupMenu,new RpcAction() {
public void action() throws Exception {
- Object obj = ((Map)rpcConn.execute("job.info", clickedJob)).get("info");
+ Object obj = rpcConn.execute("job.info", clickedJob);
+ if(obj instanceof Map && ((Map)obj).containsKey("info"))
+ obj = ((Map)obj).get("info");
(new JobInfoPopup(null, true, obj)).setVisible(true);
}
});
addSessionItem("Stop",jobPopupMenu,new RpcAction() {
public void action() throws Exception {
- if(!((Map)rpcConn.execute("job.stop", clickedJob)).get("result").equals("success"))
+ if(!"success".equals(((Map)rpcConn.execute("job.stop", clickedJob)).get("result")))
MsfguiApp.showMessage(null, "stop failed.");
}
});
@@ -1650,9 +1654,12 @@ nameloop: for (int i = 0; i < names.length; i++) {
return;
jobsList.setSelectedIndex(indx);
clickedJob = jobsList.getSelectedValue().toString().split(" ")[0];
- if(e.getClickCount() > 1)
- (new JobInfoPopup(null, true,
- ((Map)rpcConn.execute("job.info", clickedJob)).get("info"))).setVisible(true);
+ if(e.getClickCount() > 1){
+ Object obj = rpcConn.execute("job.info", clickedJob);
+ if(obj instanceof Map && ((Map)obj).containsKey("info"))
+ obj = ((Map)obj).get("info");
+ (new JobInfoPopup(null, true, obj)).setVisible(true);
+ }
}
public void showPopup(MouseEvent e) {
jobPopupMenu.show(jobsList, e.getX(), e.getY() );
diff --git a/external/source/gui/msfguijava/src/msfgui/MeterpFileBrowser.java b/external/source/gui/msfguijava/src/msfgui/MeterpFileBrowser.java
index 9715bf110c..5a13efea54 100644
--- a/external/source/gui/msfguijava/src/msfgui/MeterpFileBrowser.java
+++ b/external/source/gui/msfguijava/src/msfgui/MeterpFileBrowser.java
@@ -221,10 +221,6 @@ public class MeterpFileBrowser extends MsfFrame {
public void actionPerformed(ActionEvent e) {
try {
Map received = (Map) rpcConn.execute("session.meterpreter_read", session.get("id"));
- if (! received.get("encoding").equals("base64")) {
- MsfguiApp.showMessage(null, "uhoh. encoding changed. Time to update msfgui?");
- return;
- }
byte[] decodedBytes = RpcConnection.getData(received);
if (decodedBytes.length == 0)
return;
@@ -263,7 +259,7 @@ public class MeterpFileBrowser extends MsfFrame {
}
} catch (Exception ex) {
ex.printStackTrace();
- if(ex.getMessage().contains("unknown session"))
+ if(ex.getMessage().toLowerCase().contains("unknown session"))
readTimer.stop();
MsfguiApp.showMessage(null, ex);
}
diff --git a/external/source/gui/msfguijava/src/msfgui/MsfguiApp.java b/external/source/gui/msfguijava/src/msfgui/MsfguiApp.java
index 6cf09a4780..fd22141d28 100644
--- a/external/source/gui/msfguijava/src/msfgui/MsfguiApp.java
+++ b/external/source/gui/msfguijava/src/msfgui/MsfguiApp.java
@@ -243,7 +243,7 @@ public class MsfguiApp extends SingleFrameApplication {
MsfguiLog.defaultLog.logMethodCall("module.execute", new Object[]{moduleType, fullName, hash});
} else { // Non-console; just fire away
Map info = (Map) rpcConn.execute("module.execute",moduleType, fullName,hash);
- if (!info.get("result").equals("success"))
+ if (!info.containsKey("job_id") && !info.get("result").equals("success"))
MsfguiApp.showMessage(parentFrame.getFrame(), info);
}
MsfguiApp.addRecentModule(java.util.Arrays.asList(new Object[]{moduleType, fullName, hash}), rpcConn, parentFrame);
diff --git a/external/source/gui/msfguijava/src/msfgui/OpenConnectionDialog.java b/external/source/gui/msfguijava/src/msfgui/OpenConnectionDialog.java
index 271f4d5aba..1267e3aa68 100644
--- a/external/source/gui/msfguijava/src/msfgui/OpenConnectionDialog.java
+++ b/external/source/gui/msfguijava/src/msfgui/OpenConnectionDialog.java
@@ -357,12 +357,8 @@ public class OpenConnectionDialog extends javax.swing.JDialog {
int port = Integer.parseInt(portField.getText());
boolean ssl = checkCrypto(sslBox.isSelected());
String type = "xml";
- if(msgpackButton.isSelected()){
- if(JOptionPane.showConfirmDialog(this, "MsgPack RPC is not currently supported. Continue anyway?",
- "Warning",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.WARNING_MESSAGE) != JOptionPane.YES_OPTION)
- return;
+ if(msgpackButton.isSelected())
type = "msg";
- }
try {
rpcConn = RpcConnection.getConn(type, username, password, host, port, ssl);
} catch (MsfException mex) {
@@ -394,14 +390,10 @@ public class OpenConnectionDialog extends javax.swing.JDialog {
private void startNewButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_startNewButtonActionPerformed
//Setup defaults
- if(msgpackButton.isSelected()){
- if(JOptionPane.showConfirmDialog(this, "MsgPack RPC is not currently supported. Continue anyway?",
- "Warning",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.WARNING_MESSAGE) != JOptionPane.YES_OPTION)
- return;
+ if(msgpackButton.isSelected())
RpcConnection.defaultType = "msg";
- }else{
+ else
RpcConnection.defaultType = "xml";
- }
RpcConnection.defaultUser = usernameField.getText();
if(passwordField.getPassword().length > 0)
RpcConnection.defaultPass = new String(passwordField.getPassword());
diff --git a/external/source/gui/msfguijava/src/msfgui/ProcessList.java b/external/source/gui/msfguijava/src/msfgui/ProcessList.java
index 27375038d9..eddd97dbf5 100755
--- a/external/source/gui/msfguijava/src/msfgui/ProcessList.java
+++ b/external/source/gui/msfguijava/src/msfgui/ProcessList.java
@@ -87,10 +87,6 @@ public class ProcessList extends MsfFrame {
public void actionPerformed(ActionEvent e) {
try {
Map received = (Map) rpcConn.execute("session.meterpreter_read", session.get("id"));
- if (!received.get("encoding").equals("base64")) {
- MsfguiApp.showMessage(null, "uhoh. encoding changed. Time to update msfgui?");
- return;
- }
byte[] decodedBytes = RpcConnection.getData(received);
if (decodedBytes.length == 0)
return; //no data
@@ -128,7 +124,7 @@ public class ProcessList extends MsfFrame {
rpcConn.execute("session.meterpreter_run_single", session.get("id"),cmd);
} catch (Exception ex) {
MsfguiApp.showMessage(this, ex);
- if (ex.getMessage().contains("unknown session"))
+ if (ex.getMessage().toLowerCase().contains("unknown session"))
return true;
}
return false;