Skip to content

Commit 52fca0f

Browse files
committed
fixed deadlock on system cleanup when a proxy is blocking network content.
1 parent 13678a9 commit 52fca0f

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import org.csploit.android.net.Endpoint;
4848
import org.csploit.android.net.GitHubParser;
4949
import org.csploit.android.net.Network;
50+
import org.csploit.android.net.RemoteReader;
5051
import org.csploit.android.net.Target;
5152
import org.csploit.android.net.Target.Exploit;
5253
import org.csploit.android.net.Target.Type;
@@ -1199,6 +1200,8 @@ public static void clean(boolean releaseLocks){
11991200
mWakeLock.release();
12001201
}
12011202

1203+
RemoteReader.terminateAll();
1204+
12021205
GitHubParser.resetAll();
12031206

12041207
synchronized (mTargets) {

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,14 @@ public String getErrorMessage() {
323323
return res;
324324
}
325325

326+
public static void terminateAll() {
327+
synchronized (readers) {
328+
for(RemoteReader r : readers) {
329+
r.terminate();
330+
}
331+
}
332+
}
333+
326334
private void addFirst(Task task) {
327335
synchronized (tasks) {
328336
((Deque<Task>) tasks).addFirst(task);

0 commit comments

Comments
 (0)