Merge pull request #1650 from scriptjunkie/msfguiKaliConnect

Kali fixes, changes only affect msfgui
bug/bundler_fix
Josh 2013-03-24 19:34:22 -07:00
commit dfcce010c1
3 changed files with 18 additions and 9 deletions

Binary file not shown.

View File

@ -244,7 +244,11 @@ public class DbConnectDialog extends OptionsDialog {
try{
s = new Scanner(new File(System.getenv("BASE")+"config/database.yml"));
} catch (FileNotFoundException fnfox){
s = new Scanner(new File(MsfguiApp.getMsfRoot()+"/../config/database.yml"));
try{
s = new Scanner(new File(MsfguiApp.getMsfRoot()+"/../config/database.yml"));
} catch (FileNotFoundException fnfx){
s = new Scanner(new File("/opt/metasploit/apps/pro/ui/config/database.yml"));
}
}
String token = s.next();
while(!token.equals("production:"))

View File

@ -366,14 +366,19 @@ nameloop: for (int i = 0; i < names.length; i++) {
currentMenu.add(men);
currentMenu = (JMenu) men;
} else {
JMenuItem men = new JMenuItem(names[i]);
if(recentlyAdded)
men.setFont(men.getFont().deriveFont(men.getFont().getStyle() | java.awt.Font.BOLD));
men.setName(names[i]);
currentMenu.add(men);
ActionListener actor = factory.getActor(fullName.toString(),type,rpcConn);
men.addActionListener(actor);
searchWin.modules.add(new Object[]{type, fullName.toString(),actor});
try{
JMenuItem men = new JMenuItem(names[i]);
if(recentlyAdded)
men.setFont(men.getFont().deriveFont(men.getFont().getStyle() | java.awt.Font.BOLD));
men.setName(names[i]);
currentMenu.add(men);
ActionListener actor = factory.getActor(fullName.toString(),type,rpcConn);
men.addActionListener(actor);
searchWin.modules.add(new Object[]{type, fullName.toString(),actor});
}catch(ClassCastException cce){
System.err.println(names[i]);
cce.printStackTrace();
}
}
}//end for each subname
}//end for each module