diff --git a/data/gui/msfgui.jar b/data/gui/msfgui.jar index d0c4e0b294..6d20524f28 100644 Binary files a/data/gui/msfgui.jar and b/data/gui/msfgui.jar differ diff --git a/external/source/gui/msfguijava/src/msfgui/MainFrame.java b/external/source/gui/msfguijava/src/msfgui/MainFrame.java index 8df848821e..0c297be2d8 100644 --- a/external/source/gui/msfguijava/src/msfgui/MainFrame.java +++ b/external/source/gui/msfguijava/src/msfgui/MainFrame.java @@ -39,6 +39,7 @@ public class MainFrame extends FrameView { private JPopupMenu jobPopupMenu, shellPopupMenu, meterpreterPopupMenu, sessionPopupMenu; private String clickedJob; public Map[] selectedSessions; + private MsfTable[] tables; private SearchWindow searchWin; private javax.swing.JTable eventsTable; private javax.swing.JScrollPane eventsPane; @@ -147,6 +148,9 @@ public class MainFrame extends FrameView { } } MsfFrame.updateSizes(getFrame()); + this.tables = new MsfTable[]{(MsfTable)eventsTable, (MsfTable)hostsTable, + (MsfTable)clientsTable, (MsfTable)servicesTable, (MsfTable)vulnsTable, + (MsfTable)notesTable, (MsfTable)lootsTable, (MsfTable)credsTable}; // Setup table autoquery code ((MsfTable)eventsTable).addAutoAdjuster(eventsPane); ((MsfTable)hostsTable).addAutoAdjuster(hostsPane); @@ -1321,14 +1325,10 @@ nameloop: for (int i = 0; i < names.length; i++) { } try { //Now load data out of current workspace MsfguiApp.workspace = ((Map) rpcConn.execute("db.current_workspace")).get("workspace").toString(); - ((MsfTable)eventsTable).reAddQuery(all, 0); - ((MsfTable)lootsTable).reAddQuery(all, 0); - ((MsfTable)hostsTable).reAddQuery(all, 0); - ((MsfTable)clientsTable).reAddQuery(all, 0); - ((MsfTable)servicesTable).reAddQuery(all, 0); - ((MsfTable)vulnsTable).reAddQuery(all, 0); - ((MsfTable)notesTable).reAddQuery(all, 0); - ((MsfTable)credsTable).reAddQuery(all, 0); + for(MsfTable table : tables){ + table.rpcConn = rpcConn; + table.reAddQuery(all, 0); + } } catch (MsfException mex) { if(!mex.getMessage().equals("database not loaded")) mex.printStackTrace(); diff --git a/external/source/gui/msfguijava/src/msfgui/MsfTable.java b/external/source/gui/msfguijava/src/msfgui/MsfTable.java index 798e6301db..e32ca95f8b 100644 --- a/external/source/gui/msfguijava/src/msfgui/MsfTable.java +++ b/external/source/gui/msfguijava/src/msfgui/MsfTable.java @@ -25,7 +25,7 @@ import javax.swing.table.DefaultTableModel; public class MsfTable extends javax.swing.JTable { private final String[] dbNames; private final String dbTable; - private final RpcConnection rpcConn; + public RpcConnection rpcConn; /** * Default constructor just takes column names * @param colnames The names of the columns in the table @@ -121,7 +121,6 @@ public class MsfTable extends javax.swing.JTable { row[i] = new java.util.Date(Long.parseLong(row[i].toString()) * 1000); }catch(NumberFormatException nfex){ //don't do anything - } } mod.addRow(row);