From cdef02c382c799d9aace939a2259b353e0753f1d Mon Sep 17 00:00:00 2001 From: Matt Weeks Date: Sat, 23 Oct 2010 23:13:12 +0000 Subject: [PATCH] Add new command to try when starting msfrpcd. git-svn-id: file:///home/svn/framework3/trunk@10801 4d416f70-5f16-0410-b530-b9f4589650da --- data/gui/msfgui.jar | Bin 682297 -> 682356 bytes .../gui/msfguijava/src/msfgui/MsfguiApp.java | 22 +++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/data/gui/msfgui.jar b/data/gui/msfgui.jar index ca8dc85dae05b50466e164ad5e3fd736055ccbc2..be669a5ae44357f77d175d180ba4d8d1455e1e71 100644 GIT binary patch delta 4857 zcmZWt3tW^{7C+~kJM(>W`Op!D#{kMp1i=+B%N5^>JVXpcFnl2bBIc{oRyPgYe5ADs zYMf0s3)dn`1@l2_8kP2NbxYgIQd6wl&9==nGi$XycfKKWclgcy?)jf{&-veT&fM?* z*n6V;cPF}=c{w&A0Stihx;nGFR#vyT&(c1)w2!vCkFDc1mRqu}+2%NnvbwPY=6?Rs zwcV}aXFDFFR)^RY_bx=hdk_!D;SM+fL*RYLg}=ij_yA_WhcKJvdGIl<(ZwWxwf^Ly zCAIH#1$c*U=%QQo7f#UOvV=$AiiGdrst(^v5O7U0{DThHCHx3KDd9hUkP0_+xT&5$ zO9VuQQB#A>K;Z|y(XOMzKwU>ef?GLsqf-qi`Oi-crjGswc97T+T?TeCsxiR8KnZ^6 zHZaJ*U;{&R3^mZBOu`Hdm(Ud>)Y8rdcF{4?z$ghx3~}6OCkTu&;JA*lObffJAx_6` zDrmfc3F;Z4n05EVL`?F-9{3wI^wcrg5Bg(DwSlQBdM^X-FtE3QcPjWU9s5W~#|RyN zDDj`i`KkToD0cseihCwReU^OJEVTi(pD#pXqkgkT|24+ai#4H1|4IH7M934kW zD26KrR_96_g?F=rd1}a4;%GH1P_r>Q78+Q@HNvqH@4;dN$4MNI6AYYa;3Nf=7&uw! zOAVZ&a#rT#2<2+y6$V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M@V%?{M#n(!s>TozLumgqxcb7hKF zHi|Cf%E&c8X*z|D;VK-? zpp%8{{X&D?%afbM{dso&_y!Jka=zU~`FS!0AEAakIn;L75<9gmwENPzJYGN^bSx;N?Wwy<0V+VRup`UJ{lmbStZ*`+S^hAM75mkpd$f~2vck-~^ptA+s z2(ylNV(rH{w-d3P+wwDZFMc=Z%q^1&3T26Q?kg%Rlu=g0v=?%-#ay@3yzBM=`nDH) z4MWH6UO@Mal*6>QJZa!a-j6LKIf3u{JAex7H9xw{q9zB>%u&qfZr^V*99|TX#ee#2 zq#2{+Xe}jEX(O$8w?@ezv2hB!Uzq9$r-7wRSyaSrXs6mDS!7#U>!9{pM=XsW!KwVt z8sYJvWgTiUUa`CbU!m8EWsW$#p%e8QE$U@J^=a-jITFj6>>kbBB_|mB`HX|l?P%V@=P9&=xsRMzmK)HQ=9MtIk+zq}A!6)R zMpJ)tgj(k;X$<=xy4HzRl<@AjPuicAV#vQc75m1>J8Va9I4Jz4BiibtM_sy?*|k@x zE?RLvpWH1jy`xQc2J5$P%QR}bUk(>7VLJDEi0(&e#k>H$lson>{pet+3|8BbsvRF- z3FAxbx|PdwY{QT41EqZG8#65}H+KN_%Km>ToEf5YJ*}#*9LvO>Ra99ieQ5t!nX6sw z5W>o2mR3`3X&x?^|lGJKr36K z1Ydf8i5_KTF{F|UTTc@zrc9a$|v!y>)h9czB-AIW&Vd< zfTNm$r@!n1Dim<>QWwy!h~BPdqU7scsOMyk_mG_i)kq(A0@Vt5-KPsk_BHI}SHm?* zk2G#?;h!TqjWV^qDV=j4dSD7OJe<)598|!G5nVvwR0cxJx_~+bOsweyB)v10`{3vt XH$cuBc{lE-fi*J8p-1q4mEivX^39+M diff --git a/external/source/gui/msfguijava/src/msfgui/MsfguiApp.java b/external/source/gui/msfguijava/src/msfgui/MsfguiApp.java index 6ddc5434ed..8d19fc1d87 100644 --- a/external/source/gui/msfguijava/src/msfgui/MsfguiApp.java +++ b/external/source/gui/msfguijava/src/msfgui/MsfguiApp.java @@ -144,24 +144,28 @@ public class MsfguiApp extends SingleFrameApplication { System.arraycopy(args, 0, winArgs, 3, args.length); winArgs[0] = "cmd"; winArgs[1] = "/c"; - File dir = new File(System.getenv("PROGRAMFILES") + "\\Metasploit\\Framework3\\bin\\"); if (msfCommand.equals("msfencode")) winArgs[2] = "ruby.exe"; else winArgs[2] = "rubyw.exe"; - winArgs[3] = "/msf3/" + msfCommand; - proc = Runtime.getRuntime().exec(winArgs, null, dir); - } catch (IOException ex4) { - try { - File dir = new File(System.getenv("PROGRAMFILES(x86)") - + "\\Metasploit\\Framework3\\bin\\"); + winArgs[3] = msfCommand; + proc = Runtime.getRuntime().exec(winArgs); + } catch (IOException ex4){ + try{ + winArgs[3] = "/msf3/" + msfCommand; + File dir = new File(System.getenv("PROGRAMFILES") + "\\Metasploit\\Framework3\\bin\\"); proc = Runtime.getRuntime().exec(winArgs, null, dir); } catch (IOException ex5) { try { - File dir = new File(prefix); + File dir = new File(System.getenv("PROGRAMFILES(x86)") + "\\Metasploit\\Framework3\\bin\\"); proc = Runtime.getRuntime().exec(winArgs, null, dir); } 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); + } } } }