Try ruby.exe first.

git-svn-id: file:///home/svn/framework3/trunk@10807 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
Matt Weeks 2010-10-24 00:59:11 +00:00
parent 6dc76cb091
commit 780bdb32d3
2 changed files with 5 additions and 4 deletions

Binary file not shown.

View File

@ -144,14 +144,15 @@ public class MsfguiApp extends SingleFrameApplication {
System.arraycopy(args, 0, winArgs, 3, args.length);
winArgs[0] = "cmd";
winArgs[1] = "/c";
if (msfCommand.equals("msfencode"))
winArgs[2] = "ruby.exe";
else
winArgs[2] = "rubyw.exe";
winArgs[2] = "ruby.exe";
winArgs[3] = msfCommand;
proc = Runtime.getRuntime().exec(winArgs);
} catch (IOException ex4){
try{
if (msfCommand.equals("msfencode"))
winArgs[2] = "ruby.exe";
else
winArgs[2] = "rubyw.exe";
winArgs[3] = "/msf3/" + msfCommand;
File dir = new File(System.getenv("PROGRAMFILES") + "\\Metasploit\\Framework3\\bin\\");
proc = Runtime.getRuntime().exec(winArgs, null, dir);