mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
Reduce number of menu items on module lists to work with a little bit smaller screens and clean up log output.
git-svn-id: file:///home/svn/framework3/trunk@11378 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
3f7809ca5a
commit
d390c2eb80
Binary file not shown.
@ -34,7 +34,7 @@ import org.jdesktop.swingworker.SwingWorker;
|
||||
|
||||
/** The application's main frame. */
|
||||
public class MainFrame extends FrameView {
|
||||
public static final int MENU_SIZE_LIMIT = 30;
|
||||
public static final int MENU_SIZE_LIMIT = 25;
|
||||
|
||||
public HashMap sessionPopupMap;
|
||||
public RpcConnection rpcConn;
|
||||
|
@ -139,6 +139,7 @@ public class MsfguiLog {
|
||||
consoleLog = new ArrayList(30);
|
||||
session.put("console",consoleLog);
|
||||
}
|
||||
message = htmlEntities(message); // Fix dangerous characters XSS-wise
|
||||
if(sending)
|
||||
consoleLog.add(now() + " >>>" + message);
|
||||
else
|
||||
@ -152,6 +153,10 @@ public class MsfguiLog {
|
||||
save(destination);
|
||||
return destination;
|
||||
}
|
||||
public String htmlEntities(String input){
|
||||
return input.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">")
|
||||
.replaceAll("\"", """);
|
||||
}
|
||||
/** Saves the file and returns where */
|
||||
public String save(String filename) throws IOException{
|
||||
activityLog.add(now()+" msfgui log created.");
|
||||
@ -223,7 +228,7 @@ public class MsfguiLog {
|
||||
//Activity log
|
||||
fout.write("<h1>Activities</h1><table><tbody>\n");
|
||||
for(Object o : activityLog)
|
||||
fout.write("<tr><td>"+o.toString()+"</td></tr>\n");
|
||||
fout.write("<tr><td>"+htmlEntities(o.toString())+"</td></tr>\n");
|
||||
fout.write("</tbody></table>\n\n");
|
||||
|
||||
//Complete console logs
|
||||
|
Loading…
Reference in New Issue
Block a user