Skip to content

Commit

Permalink
Update vidcloud.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
eatmynerds authored Feb 17, 2024
1 parent beb68e6 commit 167dc41
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/extractors/vidcloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,11 @@ class VidCloud extends VideoExtractor {
);

if (!isJson(res.data.sources)) {
const keys = await (await this.client.get('https://keys4.fun')).data["rabbitstream"]["keys"];
const keyString = btoa(String.fromCharCode.apply(null, Array.from(new Uint8Array(keys))));
const decryptedVal = CryptoJS.AES.decrypt(res.data.sources, keyString).toString(CryptoJS.enc.Utf8);
sources = JSON.parse(CryptoJS.AES.decrypt(res.data.sources, keyString).toString(CryptoJS.enc.Utf8));


sources = isJson(decryptedVal) ? JSON.parse(decryptedVal) : res.data.sources;

let keys = await (await this.client.get('https://raw.githubusercontent.com/eatmynerds/key/e4/key.txt')).data;
const keyString = btoa(String.fromCharCode.apply(null, Array.from(new Uint8Array(JSON.parse(keys)))));
const decryptedVal = CryptoJS.AES.decrypt(res.data.sources, keyString).toString(CryptoJS.enc.Utf8);
sources = JSON.parse(CryptoJS.AES.decrypt(res.data.sources, keyString).toString(CryptoJS.enc.Utf8));
sources = isJson(decryptedVal) ? JSON.parse(decryptedVal) : res.data.sources;
}

this.sources = sources.map((s: any) => ({
Expand Down

0 comments on commit 167dc41

Please sign in to comment.