Add new command to try when starting msfrpcd.
git-svn-id: file:///home/svn/framework3/trunk@10801 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
ed52da9ee9
commit
cdef02c382
Binary file not shown.
|
@ -144,24 +144,28 @@ public class MsfguiApp extends SingleFrameApplication {
|
||||||
System.arraycopy(args, 0, winArgs, 3, args.length);
|
System.arraycopy(args, 0, winArgs, 3, args.length);
|
||||||
winArgs[0] = "cmd";
|
winArgs[0] = "cmd";
|
||||||
winArgs[1] = "/c";
|
winArgs[1] = "/c";
|
||||||
File dir = new File(System.getenv("PROGRAMFILES") + "\\Metasploit\\Framework3\\bin\\");
|
|
||||||
if (msfCommand.equals("msfencode"))
|
if (msfCommand.equals("msfencode"))
|
||||||
winArgs[2] = "ruby.exe";
|
winArgs[2] = "ruby.exe";
|
||||||
else
|
else
|
||||||
winArgs[2] = "rubyw.exe";
|
winArgs[2] = "rubyw.exe";
|
||||||
winArgs[3] = "/msf3/" + msfCommand;
|
winArgs[3] = msfCommand;
|
||||||
proc = Runtime.getRuntime().exec(winArgs, null, dir);
|
proc = Runtime.getRuntime().exec(winArgs);
|
||||||
} catch (IOException ex4) {
|
} catch (IOException ex4){
|
||||||
try {
|
try{
|
||||||
File dir = new File(System.getenv("PROGRAMFILES(x86)")
|
winArgs[3] = "/msf3/" + msfCommand;
|
||||||
+ "\\Metasploit\\Framework3\\bin\\");
|
File dir = new File(System.getenv("PROGRAMFILES") + "\\Metasploit\\Framework3\\bin\\");
|
||||||
proc = Runtime.getRuntime().exec(winArgs, null, dir);
|
proc = Runtime.getRuntime().exec(winArgs, null, dir);
|
||||||
} catch (IOException ex5) {
|
} catch (IOException ex5) {
|
||||||
try {
|
try {
|
||||||
File dir = new File(prefix);
|
File dir = new File(System.getenv("PROGRAMFILES(x86)") + "\\Metasploit\\Framework3\\bin\\");
|
||||||
proc = Runtime.getRuntime().exec(winArgs, null, dir);
|
proc = Runtime.getRuntime().exec(winArgs, null, dir);
|
||||||
} catch (IOException ex6) {
|
} catch (IOException ex6) {
|
||||||
throw new MsfException("Executable not found for "+msfCommand);
|
try {
|
||||||
|
File dir = new File(prefix);
|
||||||
|
proc = Runtime.getRuntime().exec(winArgs, null, dir);
|
||||||
|
} catch (IOException ex7) {
|
||||||
|
throw new MsfException("Executable not found for "+msfCommand);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue