mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
encrypt api url
This commit is contained in:
parent
9b7d064694
commit
f6c547242f
2 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 6
|
version = 7
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.elostoratv
|
package com.elostoratv
|
||||||
|
|
||||||
|
import android.util.Base64
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
|
@ -22,7 +23,7 @@ class ElOstoraTV : MainAPI() {
|
||||||
setOf(
|
setOf(
|
||||||
TvType.Live
|
TvType.Live
|
||||||
)
|
)
|
||||||
private val apiUrl = "https://z420572.radwan.shop/api/v4_8.php"
|
private val apiUrl = "aHR0cHM6Ly96NDIwNTcyLnJhZHdhbi5zaG9wL2FwaS92NF84LnBocA=="
|
||||||
|
|
||||||
override val mainPage = generateServersHomePage()
|
override val mainPage = generateServersHomePage()
|
||||||
private fun generateServersHomePage() : List<MainPageData> {
|
private fun generateServersHomePage() : List<MainPageData> {
|
||||||
|
@ -167,6 +168,7 @@ class ElOstoraTV : MainAPI() {
|
||||||
}
|
}
|
||||||
private fun getDecoded(payload: Map<String, String>): String {
|
private fun getDecoded(payload: Map<String, String>): String {
|
||||||
|
|
||||||
|
val api = Base64.decode(apiUrl, Base64.DEFAULT).toString(charset("UTF-8"))
|
||||||
val t = (System.currentTimeMillis() / 1000).toString()
|
val t = (System.currentTimeMillis() / 1000).toString()
|
||||||
|
|
||||||
val client = app.baseClient.newBuilder()
|
val client = app.baseClient.newBuilder()
|
||||||
|
@ -174,7 +176,7 @@ class ElOstoraTV : MainAPI() {
|
||||||
|
|
||||||
val request = requestCreator(
|
val request = requestCreator(
|
||||||
method = "POST",
|
method = "POST",
|
||||||
url = apiUrl,
|
url = api,
|
||||||
headers = mapOf(
|
headers = mapOf(
|
||||||
"User-Agent" to "Mozilla/5.0 (Linux; U; Android 10; en; YAL-L41 Api/HUAWEIYAL-L41) AppleWebKit/534.30 (KHTML, like Gecko) Version/5.0 Mobile Safari/534.30",
|
"User-Agent" to "Mozilla/5.0 (Linux; U; Android 10; en; YAL-L41 Api/HUAWEIYAL-L41) AppleWebKit/534.30 (KHTML, like Gecko) Version/5.0 Mobile Safari/534.30",
|
||||||
"Time" to t,
|
"Time" to t,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue