Socket
Socket
Sign inDemoInstall

wikiextensions-flix

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wikiextensions-flix - npm Package Compare versions

Comparing version 1.7.5 to 1.7.6

2

.vscode/settings.json
{
"editor.inlineSuggest.showToolbar": "onHover"
"editor.inlineSuggest.showToolbar": "always"
}

@@ -23,3 +23,2 @@ "use strict";

const movieDetail = $(el).find('.sc-detail > .scd-item');
const fyurl = $(el).find('a').attr('href')?.slice(1);
const movieGenre = $(movieDetail.get()[3]).find('a').get();

@@ -29,3 +28,2 @@ slider.push({

title: title,
fyurl: fyurl,
detail: {

@@ -32,0 +30,0 @@ quality: $(movieDetail).find('span.quality').text(),

@@ -26,57 +26,12 @@ "use strict";

};
let res = undefined;
//let result = undefined;
let sources = undefined;
res = await axios_1.default.get(`${isAlternative ? this.host2 : this.host}/ajax/embed-4/getSources?id=${id}`, options);
//console.log("res", res)
/* Desencrypted Key */
const getPairs = (scriptText) => {
const script = scriptText.toString();
const startOfSwitch = script.lastIndexOf('switch');
const endOfCases = script.indexOf('partKeyStartPosition');
const switchBody = script.slice(startOfSwitch, endOfCases);
const matches = switchBody.matchAll(/:[a-zA-Z0-9]+=([a-zA-Z0-9]+),[a-zA-Z0-9]+=([a-zA-Z0-9]+);/g);
const nums = [];
for (const match of matches) {
const innerNumbers = [];
for (const varMatch of [match[1], match[2]]) {
const regex = new RegExp(`${varMatch}=0x([a-zA-Z0-9]+)`, 'g');
const varMatches = [...script.matchAll(regex)];
const lastMatch = varMatches[varMatches.length - 1];
if (!lastMatch) return null;
const number = parseInt(lastMatch[1], 16);
innerNumbers.push(number);
}
nums.push([innerNumbers[0], innerNumbers[1]]);
}
return nums;
}
/*- branch: e1
script_url: https://megacloud.tv/js/player/a/prod/e1-player.min.js
- branch: e6
script_url: https://rapid-cloud.co/js/player/prod/e6-player-v2.min.js
- branch: e4
script_url: https://rabbitstream.net/js/player/prod/e4-player.min.js
*/
const fileUrl = 'https://rabbitstream.net/js/player/prod/e4-player.min.js';
const { data } = await axios_1.default.get(fileUrl);
const pairs = getPairs(data);
/* End Desencrypted Key */
if (!(0, utils_1.isJson)(res.data.sources)) {
//let { data: key } = await axios_1.default.get('https://raw.githubusercontent.com/Phantom-KNA/GeneratorFlixHQ/e4/key');
let { data: key } = pairs;
key = key;
if (!key) {
//key = await (await axios_1.default.get('https://raw.githubusercontent.com/Phantom-KNA/GeneratorFlixHQ/e4/key')).data;
key = pairs;
}
console.log("pairs", pairs)
console.log("key", key)
const sourcesArray = res.data.sources.split('');
const { data } = await axios_1.default.get(`${isAlternative ? this.host2 : this.host}/ajax/embed-4/getSources?id=${id}`, options);
console.log(data);
let sources = null;
if (!(0, utils_1.isJson)(data.sources)) {
// const key = await (await axios.get('https://raw.githubusercontent.com/enimax-anime/key/e4/key.txt')).data;
//const key = await (await axios.get('https://raw.githubusercontent.com/theonlymo/keys/e4/key')).data;
const fileUrl = 'https://keys4.fun/';
const keyData = (await axios_1.default.get(fileUrl)).data;
const key = keyData.rabbitstream.keys;
/*const sourcesArray = data.sources.split('');
let extractedKey = '';

@@ -88,3 +43,3 @@ let currentIndex = 0;

for (let i = start; i < end; i++) {
extractedKey += res.data.sources[i];
extractedKey += data.sources[i];
sourcesArray[i] = '';

@@ -94,47 +49,27 @@ }

}
key = extractedKey;
//console.log("extractedKey", extractedKey)
res.data.sources = sourcesArray.join('');
const decryptedVal = crypto_js_1.default.AES.decrypt(res.data.sources, key).toString(crypto_js_1.default.enc.Utf8);
sources = (0, utils_1.isJson)(decryptedVal) ? JSON.parse(decryptedVal) : res.data.sources;
//console.log("extractedKey", res.data.sources)
//console.log(sources)
console.log("sources", sources)
//key = extractedKey;
data.sources = sourcesArray.join('');*/
let keyString = btoa(String.fromCharCode.apply(null, (key)));
sources = JSON.parse(crypto_js_1.default.AES.decrypt(data.sources, keyString).toString(crypto_js_1.default.enc.Utf8));
}
this.sources = sources.map((s) => ({
url: s.file,
isM3U8: s.file.includes('.m3u8'),
}));
videoResult.sources.push(...this.sources);
videoResult.sources = [];
this.sources = [];
//console.log("this.sources", this.sources)
for (const source of sources) {
const { data } = await axios_1.default.get(source.file, options);
const urls = data.split('\n').filter((line) => line.includes('.m3u8'));
const qualities = data.split('\n').filter((line) => line.includes('RESOLUTION='));
const TdArray = qualities.map((s, i) => {
const f1 = s.split('x')[1];
const f2 = urls[i];
return [f1, f2];
const videoUrls = data.split('\n').filter((line) => line.includes('.m3u8'));
const videoQualities = data.split('\n').filter((line) => line.includes('RESOLUTION='));
videoQualities.map((item, i) => {
const quality = item.split(',')[2].split('x')[1];
const url = videoUrls[i];
videoResult.sources.push({
url: url,
quality: quality,
isM3U8: url.includes('.m3u8'),
});
});
for (const [f1, f2] of TdArray) {
this.sources.push({
url: f2,
quality: f1,
isM3U8: f2.includes('.m3u8'),
});
}
videoResult.sources.push(...this.sources);
}
videoResult.sources.push({
url: sources[0].file,
isM3U8: sources[0].file.includes('.m3u8'),
quality: 'auto',
videoResult.subtiles = data.tracks.map((track) => {
return {
url: track.file,
lang: track.label ?? 'Default',
};
});
videoResult.subtiles = res.data.tracks.map((s) => ({
url: s.file,
lang: s.label ? s.label : 'Default (maybe)',
}));
return videoResult;

@@ -141,0 +76,0 @@ }

@@ -9,3 +9,3 @@ "use strict";

MovieType["ALL"] = "all";
})(MovieType = exports.MovieType || (exports.MovieType = {}));
})(MovieType || (exports.MovieType = MovieType = {}));
var MovieReport;

@@ -17,3 +17,3 @@ (function (MovieReport) {

MovieReport["COMING_SOON"] = "Coming Soon";
})(MovieReport = exports.MovieReport || (exports.MovieReport = {}));
})(MovieReport || (exports.MovieReport = MovieReport = {}));
var Filter;

@@ -23,3 +23,3 @@ (function (Filter) {

Filter["COUNTRY"] = "country";
})(Filter = exports.Filter || (exports.Filter = {}));
})(Filter || (exports.Filter = Filter = {}));
var StreamingServers;

@@ -30,3 +30,3 @@ (function (StreamingServers) {

StreamingServers["MixDrop"] = "MixDrop";
})(StreamingServers = exports.StreamingServers || (exports.StreamingServers = {}));
})(StreamingServers || (exports.StreamingServers = StreamingServers = {}));
//# sourceMappingURL=types.js.map
{
"name": "wikiextensions-flix",
"version": "1.7.5",
"version": "1.7.6",
"description": "Nodejs library that provides an Api for obtaining the movies information from FlixHQ website.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -27,32 +27,31 @@ import axios from 'axios';

console.log(data);
let sources = null;
if (!isJson(data.sources)) {
// const key = await (await axios.get('https://raw.githubusercontent.com/enimax-anime/key/e4/key.txt')).data;
// const key = await (await axios.get('https://raw.githubusercontent.com/enimax-anime/key/e4/key.txt')).data;
//const key = await (await axios.get('https://raw.githubusercontent.com/theonlymo/keys/e4/key')).data;
let { data: key } = await axios.get('https://raw.githubusercontent.com/theonlymo/keys/e4/key');
key = key;
if (!key) {
key = await (await axios.get('https://raw.githubusercontent.com/theonlymo/keys/e4/key')).data;
}
const fileUrl = 'https://keys4.fun/';
const keyData = (await axios.get(fileUrl)).data;
const sourcesArray = data.sources.split('');
let extractedKey = '';
let currentIndex = 0;
for (const index of key) {
let start = index[0] + currentIndex;
let end = start + index[1];
for (let i = start; i < end; i++) {
extractedKey += data.sources[i];
sourcesArray[i] = '';
}
currentIndex += index[1];
const key = keyData.rabbitstream.keys;
/*const sourcesArray = data.sources.split('');
let extractedKey = '';
let currentIndex = 0;
for (const index of key) {
let start = index[0] + currentIndex;
let end = start + index[1];
for (let i = start; i < end; i++) {
extractedKey += data.sources[i];
sourcesArray[i] = '';
}
key = extractedKey;
data.sources = sourcesArray.join('');
sources = JSON.parse(cryptoJs.AES.decrypt(data.sources, key).toString(cryptoJs.enc.Utf8));
currentIndex += index[1];
}
//key = extractedKey;
data.sources = sourcesArray.join('');*/
let keyString = btoa(String.fromCharCode.apply(null, (key)))
sources = JSON.parse(cryptoJs.AES.decrypt(data.sources, keyString).toString(cryptoJs.enc.Utf8));
}

@@ -90,5 +89,5 @@

}
export default VidCloud;
import { MOVIES } from "../src";
import { IVideoResult, StreamingServers } from "../src/types/types";
(async () => {
const FlixHQ = new MOVIES.FlixHQ();
const data = await FlixHQ.fetchMovieInfo('tv/watch-junji-ito-maniac-japanese-tales-of-the-macabre-92398');
console.log(data);
const data = await FlixHQ.fetchMovieInfo('movie/watch-aquaman-and-the-lost-kingdom-104119');
const server = await FlixHQ.fetchEpisodeServers(data.id, data.episodes[0].id);
console.log(JSON.stringify(server));
const source = await FlixHQ.fetchEpisodeSources(data.id, data.episodes[0].id, StreamingServers.VidCloud) as IVideoResult;
console.log(JSON.stringify(source));
console.log("FINAL:"+JSON.stringify(source));
})();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc