Kali fixes

Check the new database config location.
Don't crash on sporadic JRE style error.
bug/bundler_fix
scriptjunkie 2013-03-24 21:00:38 -05:00
parent 16fad29cb0
commit 438d348fda
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