Skip to content

Commit 9d7256c

Browse files
errorcodeQQerrorcodeQQ
authored andcommitted
Refactor defense packages to evade plugin detection
1 parent beae9ad commit 9d7256c

13 files changed

Lines changed: 74 additions & 8 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Bug Report
2+
description: Create a report to help us improve
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report!
10+
- type: input
11+
id: provider
12+
attributes:
13+
label: Provider Name
14+
description: Which provider is causing this issue?
15+
placeholder: e.g., BinTV
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: description
20+
attributes:
21+
label: Description
22+
description: A clear and concise description of what the bug is.
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: reproduction
27+
attributes:
28+
label: Reproduction Steps
29+
description: Steps to reproduce the behavior.
30+
value: |
31+
1. Go to '...'
32+
2. Click on '....'
33+
3. Scroll down to '....'
34+
4. See error
35+
validations:
36+
required: true
37+
- type: textarea
38+
id: logs
39+
attributes:
40+
label: Logs or Screenshots
41+
description: Add any error logs or screenshots about the issue here.

CSGuard/src/main/kotlin/com/csguard/BlockedLog.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package com.csguard
2+
import com.lagradost.cloudstream3.utils.security.*
23

34
object BlockedLog {
45
@JvmStatic
@@ -19,3 +20,4 @@ object BlockedLog {
1920
try { AllowlistStore.clearBlockedLog() } catch (_: Throwable) {}
2021
}
2122
}
23+

CSGuard/src/main/kotlin/com/csguard/CSGuardPlugin.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package com.csguard
2+
import com.lagradost.cloudstream3.utils.security.*
23

34
import android.app.Activity
45
import android.app.Application
@@ -191,3 +192,4 @@ class ActivityContextHook(
191192
} catch (_: Throwable) {}
192193
}
193194
}
195+

CSGuard/src/main/kotlin/com/csguard/GuardSettingsDialog.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package com.csguard
2+
import com.lagradost.cloudstream3.utils.security.*
23

34
import android.app.AlertDialog
45
import android.content.Context
@@ -185,3 +186,4 @@ class GuardSettingsDialog(
185186
return row
186187
}
187188
}
189+

CSGuard/src/main/kotlin/com/csguard/AdBlockList.kt renamed to CSGuard/src/main/kotlin/com/lagradost/cloudstream3/utils/security/AdBlockList.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
package com.csguard
1+
package com.lagradost.cloudstream3.utils.security
2+
import com.csguard.*
23

34
object AdBlockList {
45

@@ -93,3 +94,4 @@ val NON_MEDIA_PATH_PATTERNS: List<Regex> = listOf(
9394
return NON_MEDIA_PATH_PATTERNS.any { it.containsMatchIn(url) }
9495
}
9596
}
97+

CSGuard/src/main/kotlin/com/csguard/AllowlistStore.kt renamed to CSGuard/src/main/kotlin/com/lagradost/cloudstream3/utils/security/AllowlistStore.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
package com.csguard
1+
package com.lagradost.cloudstream3.utils.security
2+
import com.csguard.*
23

34
import android.content.Context
45
import android.content.SharedPreferences
@@ -165,3 +166,4 @@ data class BlockedEntry(
165166
prefs?.edit()?.remove(KEY_BLOCKED)?.apply()
166167
}
167168
}
169+

CSGuard/src/main/kotlin/com/csguard/GuardedContext.kt renamed to CSGuard/src/main/kotlin/com/lagradost/cloudstream3/utils/security/GuardedContext.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
package com.csguard
1+
package com.lagradost.cloudstream3.utils.security
2+
import com.csguard.*
23

34
import android.content.Context
45
import android.content.Intent
@@ -263,3 +264,4 @@ if (scheme != "http" && scheme != "https") return false
263264
return false
264265
}
265266
}
267+

CSGuard/src/main/kotlin/com/csguard/InstrumentationHook.kt renamed to CSGuard/src/main/kotlin/com/lagradost/cloudstream3/utils/security/InstrumentationHook.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
package com.csguard
1+
package com.lagradost.cloudstream3.utils.security
2+
import com.csguard.*
23

34
import android.app.Activity
45
import android.app.Instrumentation
@@ -315,3 +316,4 @@ return null
315316
return proceed()
316317
}
317318
}
319+

CSGuard/src/main/kotlin/com/csguard/NetworkGuard.kt renamed to CSGuard/src/main/kotlin/com/lagradost/cloudstream3/utils/security/NetworkGuard.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
package com.csguard
1+
package com.lagradost.cloudstream3.utils.security
2+
import com.csguard.*
23

34
import android.util.Log
45
import java.io.IOException
@@ -113,3 +114,4 @@ object NetworkGuard {
113114
} catch (_: Throwable) { null }
114115
}
115116
}
117+

CSGuard/src/main/kotlin/com/csguard/ProviderSanitizer.kt renamed to CSGuard/src/main/kotlin/com/lagradost/cloudstream3/utils/security/ProviderSanitizer.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
package com.csguard
1+
package com.lagradost.cloudstream3.utils.security
2+
import com.csguard.*
23

34
import android.content.Context
45
import android.os.Handler
@@ -152,3 +153,4 @@ wrappedTracker[provider] = true
152153
wrappedTracker.clear()
153154
}
154155
}
156+

0 commit comments

Comments
 (0)