Skip to content

Commit 4f6281e

Browse files
committed
do not cache packages versions.
1 parent a11bdaa commit 4f6281e

File tree

3 files changed

+3
-29
lines changed

3 files changed

+3
-29
lines changed

cSploit/src/org/csploit/android/SettingsActivity.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,6 @@ public void run() {
495495

496496
private void onMsfPathChanged() {
497497
measureMsfSize();
498-
System.updateLocalRubyVersion();
499-
System.updateLocalMsfVersion();
500498
boolean haveMsf = false;
501499
File dir;
502500
File [] content;

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

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,6 @@ public class System
130130
private static String mSessionName = null;
131131

132132
private static String mApkVersion = null;
133-
private static String mCoreVersion = null;
134-
private static String mRubyVersion = null;
135-
private static String mMsfVersion = null;
136133

137134
private static Object mCustomData = null;
138135

@@ -715,40 +712,23 @@ private static String readFirstLine(String filePath) {
715712
* @return the version of the core, null if not present.
716713
*/
717714
public static String getCoreVersion() {
718-
if(mCoreVersion == null)
719-
mCoreVersion = readFirstLine(getCorePath() + "/VERSION");
720-
return mCoreVersion;
715+
return readFirstLine(getCorePath() + "/VERSION");
721716
}
722717

723718
/**
724719
* get version of installed ruby
725720
* @return the installed version of ruby
726721
*/
727722
public static String getLocalRubyVersion() {
728-
if(mRubyVersion ==null)
729-
mRubyVersion = readFirstLine(getRubyPath() + "/VERSION");
730-
return mRubyVersion;
731-
}
732-
733-
public static void updateLocalRubyVersion() {
734-
mRubyVersion =null;
735-
getLocalRubyVersion();
723+
return readFirstLine(getRubyPath() + "/VERSION");
736724
}
737725

738726
/**
739727
* get version of installed MetaSploit Framework
740728
* @return the version of installed MetaSploit Framework
741729
*/
742730
public static String getLocalMsfVersion() {
743-
if(mMsfVersion ==null)
744-
mMsfVersion = readFirstLine(getMsfPath() + "/VERSION");
745-
746-
return mMsfVersion;
747-
}
748-
749-
public static void updateLocalMsfVersion() {
750-
mMsfVersion = null;
751-
getLocalMsfVersion();
731+
return readFirstLine(getMsfPath() + "/VERSION");
752732
}
753733

754734
public static boolean isServiceRunning(String name){

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,10 +1401,6 @@ else if (what_to_do == action.core_update)
14011401
mCurrentTask.errorOccurred = exitForError = false;
14021402
}
14031403

1404-
if(what_to_do==action.msf_update)
1405-
System.updateLocalMsfVersion();
1406-
if(what_to_do==action.ruby_update)
1407-
System.updateLocalRubyVersion();
14081404
sendDone(what_to_do);
14091405
} catch ( SecurityException e) {
14101406
sendError(what_to_do, R.string.bad_permissions);

0 commit comments

Comments
 (0)