Skip to content

Commit a39bf9e

Browse files
committed
fixes #412
1 parent 1211689 commit a39bf9e

File tree

5 files changed

+11
-25
lines changed

5 files changed

+11
-25
lines changed

cSploit/src/org/csploit/android/core/ExecChecker.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,9 @@ private String getRealPath(final String file) {
122122
updateFuseBinds();
123123

124124
synchronized (mFuseBinds) {
125-
if(mFuseBinds.size()>0) {
126-
for(FuseBind b : mFuseBinds) {
127-
if(file.startsWith(b.mountpoint)) {
128-
return b.source + file.substring(b.mountpoint.length());
129-
}
125+
for(FuseBind b : mFuseBinds) {
126+
if(file.startsWith(b.mountpoint)) {
127+
return b.source + file.substring(b.mountpoint.length());
130128
}
131129
}
132130
return null;

cSploit/src/org/csploit/android/core/System.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,8 +845,10 @@ public static void loadSession(String filename) throws Exception{
845845
}
846846

847847
public synchronized static ToolBox getTools() {
848-
if(mTools == null)
848+
if(mTools == null) {
849849
mTools = new ToolBox();
850+
mTools.reload();
851+
}
850852
return mTools;
851853
}
852854

cSploit/src/org/csploit/android/tools/MsfRpcd.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ public void onEvent(Event e) {
2222

2323
public MsfRpcd() {
2424
mHandler = "msfrpcd";
25-
26-
setEnabled();
27-
28-
if(mEnabled)
29-
setupEnvironment();
30-
31-
registerSettingReceiver();
3225
}
3326

3427
/**

cSploit/src/org/csploit/android/tools/Ruby.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ public class Ruby extends Tool {
3030

3131
private final static String rubyLib = "%1$s/site_ruby/1.9.1:%1$s/site_ruby/1.9.1/arm-linux-androideabi:%1$s/site_ruby:%1$s/vendor_ruby/1.9.1:%1$s/vendor_ruby/1.9.1/arm-linux-androideabi:%1$s/vendor_ruby:%1$s/1.9.1:%1$s/1.9.1/arm-linux-androideabi";
3232

33-
3433
public Ruby() {
3534
mHandler = "raw";
35+
}
3636

37+
public void init() {
3738
setEnabled();
3839

3940
if(mEnabled)

cSploit/src/org/csploit/android/tools/ToolBox.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,26 +57,18 @@ public ToolBox() {
5757
public void reload() {
5858
raw.setEnabled();
5959
shell.setEnabled();
60-
ruby.setEnabled();
6160
nmap.setEnabled();
6261
hydra.setEnabled();
6362
arpSpoof.setEnabled();
6463
ettercap.setEnabled();
6564
fusemounts.setEnabled();
6665
ipTables.setEnabled();
6766
tcpDump.setEnabled();
68-
msf.setEnabled();
6967
networkRadar.setEnabled();
70-
msfrpcd.setEnabled();
7168
logcat.setEnabled();
7269

73-
if(ruby.isEnabled())
74-
ruby.setupEnvironment();
75-
76-
if(msf.isEnabled())
77-
msf.setupEnvironment();
78-
79-
if(msfrpcd.isEnabled())
80-
msfrpcd.setupEnvironment();
70+
ruby.init();
71+
msf.init();
72+
msfrpcd.init();
8173
}
8274
}

0 commit comments

Comments
 (0)