small security improved

This commit is contained in:
hexated 2022-10-17 13:32:34 +07:00
parent 211f85f16d
commit f7cae662ef
2 changed files with 12 additions and 3 deletions

View file

@ -31,10 +31,15 @@ class Loklok : MainAPI() {
// no license found // no license found
// thanks to https://github.com/napthedev/filmhot for providing API // thanks to https://github.com/napthedev/filmhot for providing API
companion object { companion object {
private val api = base64Decode("aHR0cHM6Ly9nYS1tb2JpbGUtYXBpLmxva2xvay50dg==") private val api = base64DecodeAPI("dg==LnQ=b2s=a2w=bG8=aS4=YXA=ZS0=aWw=b2I=LW0=Z2E=Ly8=czo=dHA=aHQ=")
private val apiUrl = "$api/${base64Decode("Y21zL2FwcA==")}" private val apiUrl = "$api/${base64Decode("Y21zL2FwcA==")}"
private val searchApi = base64Decode("aHR0cHM6Ly9sb2tsb2suY29t") private val searchApi = base64Decode("aHR0cHM6Ly9sb2tsb2suY29t")
private const val mainImageUrl = "https://images.weserv.nl" private const val mainImageUrl = "https://images.weserv.nl"
private fun base64DecodeAPI(api: String): String {
return api.chunked(4).map { base64Decode(it) }.reversed().joinToString("")
}
} }
private fun encode(input: String): String = private fun encode(input: String): String =

View file

@ -30,8 +30,8 @@ open class SoraStream : TmdbProvider() {
companion object { companion object {
private const val tmdbAPI = "https://api.themoviedb.org/3" private const val tmdbAPI = "https://api.themoviedb.org/3"
private const val apiKey = "b030404650f279792a8d3287232358e3" // PLEASE DON'T STEAL private const val apiKey = "b030404650f279792a8d3287232358e3" // PLEASE DON'T STEAL
private var mainAPI = base64Decode("aHR0cHM6Ly94cHdhdGNoLnZlcmNlbC5hcHA=") val mainAPI = base64DecodeAPI("cHA=LmE=ZWw=cmM=dmU=aC4=dGM=d2E=eHA=Ly8=czo=dHA=aHQ=")
var mainServerAPI = base64Decode("aHR0cHM6Ly9zb3JhLW1vdmllLnZlcmNlbC5hcHA=") val mainServerAPI = base64DecodeAPI("cA==YXA=bC4=Y2U=ZXI=LnY=aWU=b3Y=LW0=cmE=c28=Ly8=czo=dHA=aHQ=")
const val twoEmbedAPI = "https://www.2embed.to" const val twoEmbedAPI = "https://www.2embed.to"
const val vidSrcAPI = "https://v2.vidsrc.me" const val vidSrcAPI = "https://v2.vidsrc.me"
@ -56,6 +56,10 @@ open class SoraStream : TmdbProvider() {
else -> ShowStatus.Completed else -> ShowStatus.Completed
} }
} }
private fun base64DecodeAPI(api: String): String {
return api.chunked(4).map { base64Decode(it) }.reversed().joinToString("")
}
} }
override val mainPage = mainPageOf( override val mainPage = mainPageOf(