Skip to content

Commit c63b55f

Browse files
committed
reset github cache on close
1 parent 5c0c02b commit c63b55f

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import org.csploit.android.WifiScannerActivity;
4646
import org.csploit.android.gui.dialogs.FatalDialog;
4747
import org.csploit.android.net.Endpoint;
48+
import org.csploit.android.net.GitHubParser;
4849
import org.csploit.android.net.Network;
4950
import org.csploit.android.net.Network.Protocol;
5051
import org.csploit.android.net.Target;
@@ -1203,6 +1204,8 @@ public static void clean(boolean releaseLocks){
12031204
mWakeLock.release();
12041205
}
12051206

1207+
GitHubParser.resetAll();
1208+
12061209
synchronized (mTargets) {
12071210

12081211
for (Target t : mTargets)

cSploit/src/org/csploit/android/net/GitHubParser.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class GitHubParser {
5454
private static GitHubParser coreRepo = new GitHubParser("cSploit", "android.native");
5555
private static GitHubParser rubyRepo = new GitHubParser("cSploit", "android.native.ruby");
5656

57-
public static GitHubParser getMsfRepo() {
57+
public synchronized static GitHubParser getMsfRepo() {
5858
String customUsername = System.getSettings().getString("MSF_GITHUB_USERNAME", "cSploit");
5959
String customProject = System.getSettings().getString("MSF_GITHUB_PROJECT", "android.MSF");
6060

@@ -79,6 +79,13 @@ public static GitHubParser getRubyRepo() {
7979
return rubyRepo;
8080
}
8181

82+
public static void resetAll() {
83+
cSploitRepo.reset();
84+
coreRepo.reset();
85+
rubyRepo.reset();
86+
msfRepo.reset();
87+
}
88+
8289
public GitHubParser(String username, String project) {
8390
this.username = username;
8491
this.project = project;

0 commit comments

Comments
 (0)