udpates
This commit is contained in:
parent
3a9cbc76eb
commit
b7d4aae21c
16
.vscode/launch.json
vendored
16
.vscode/launch.json
vendored
@ -34,7 +34,13 @@
|
|||||||
"skipFiles": [
|
"skipFiles": [
|
||||||
"<node_internals>/**"
|
"<node_internals>/**"
|
||||||
],
|
],
|
||||||
"program": "${workspaceFolder}/checker.js"
|
"program": "${workspaceFolder}/lib/checker.js",
|
||||||
|
"env": {
|
||||||
|
"HOST": "localhost",
|
||||||
|
"DBUSER": "root",
|
||||||
|
"DBPASS": "example",
|
||||||
|
"DATABASE":"BBLB_DNS"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "node",
|
"type": "node",
|
||||||
@ -43,7 +49,13 @@
|
|||||||
"skipFiles": [
|
"skipFiles": [
|
||||||
"<node_internals>/**"
|
"<node_internals>/**"
|
||||||
],
|
],
|
||||||
"program": "${workspaceFolder}/lib/addAccounts.js"
|
"program": "${workspaceFolder}/lib/addAccounts.js",
|
||||||
|
"env": {
|
||||||
|
"HOST": "localhost",
|
||||||
|
"DBUSER": "root",
|
||||||
|
"DBPASS": "example",
|
||||||
|
"DATABASE":"BBLB_DNS"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -28,9 +28,9 @@ CREATE TABLE `streams`
|
|||||||
INSERT INTO streams (
|
INSERT INTO streams (
|
||||||
streamName
|
streamName
|
||||||
, streamURL) VALUES
|
, streamURL) VALUES
|
||||||
('Gold', 'http://catenamode.cf:8090'),
|
('Gold', 'http://SERVER1.cheesywotsit.gq:8090'),
|
||||||
('Insanity', 'https://trippy.pro:443'),
|
('Insanity', 'https://trippy.pro:443'),
|
||||||
('PremiumPlus', 'https://itty.in:443'),
|
('PremiumPlus', 'http://kibb.link:8080'),
|
||||||
('GunSlinger', 'http://gunslingertv.org:8080'),
|
('GunSlinger', 'http://gunslingertv.org:8080'),
|
||||||
('VIP', 'http://shark.brokenwarrior.xyz:8080'),
|
('VIP', 'http://shark.brokenwarrior.xyz:8080'),
|
||||||
('Technoid', 'http://capoisagod2021.org:8080'),
|
('Technoid', 'http://capoisagod2021.org:8080'),
|
||||||
@ -51,7 +51,8 @@ streamName
|
|||||||
('KDB', 'http://mytv.digital:8080/'),
|
('KDB', 'http://mytv.digital:8080/'),
|
||||||
('PYTHON', 'http://foxmedia.bounceme.net:8282'),
|
('PYTHON', 'http://foxmedia.bounceme.net:8282'),
|
||||||
('KEANO', 'http://ip365.cx:80'),
|
('KEANO', 'http://ip365.cx:80'),
|
||||||
('FODEN', 'http://ac.mustardsubs.tk:8880')
|
('FODEN', 'http://ac.mustardsubs.tk:8880'),
|
||||||
|
('Titan', 'http://titanmedia.tech:8080');
|
||||||
ON DUPLICATE KEY
|
ON DUPLICATE KEY
|
||||||
UPDATE `streamName` = VALUES
|
UPDATE `streamName` = VALUES
|
||||||
(`streamName`), `streamURL` = VALUES
|
(`streamName`), `streamURL` = VALUES
|
||||||
@ -72,6 +73,8 @@ CREATE TABLE `userAccounts`
|
|||||||
(11) NOT NULL,
|
(11) NOT NULL,
|
||||||
`expiaryDate` int
|
`expiaryDate` int
|
||||||
(11) NOT NULL,
|
(11) NOT NULL,
|
||||||
|
`streamURL` varchar
|
||||||
|
(255) COLLATE utf8_bin NOT NULL,
|
||||||
PRIMARY KEY
|
PRIMARY KEY
|
||||||
(`id`)
|
(`id`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
@ -94,8 +97,9 @@ username
|
|||||||
('Karl150520', 'dc4c407fda600e361db82323cef5fc51c9c9cf67fbd67711b38a49f4c5b10b3dbf62d8b7a531252b35222b0186c876fbdfea39414484916765aabab08bbd828d67b6e668f89927f95a3e08f3b45206658ea516711a65c5c4e28d98b9236e5fd8a1317b78626e49572f83', 'Gold', 1, 1621103874),
|
('Karl150520', 'dc4c407fda600e361db82323cef5fc51c9c9cf67fbd67711b38a49f4c5b10b3dbf62d8b7a531252b35222b0186c876fbdfea39414484916765aabab08bbd828d67b6e668f89927f95a3e08f3b45206658ea516711a65c5c4e28d98b9236e5fd8a1317b78626e49572f83', 'Gold', 1, 1621103874),
|
||||||
('Karl1505', '7bfdf1ab7d86e07a3eb6c5614578c41c571ae6f3faaf836233a9b6f33538c6ea1125dab202d99325a92cd35856191fc495b7e5ec6cb2765d5bafa2af18f43c94f3392425a65a14e0e712d1c5de04f662fb84dc14b37151796db7f0eaec8b34351adfd2a93961125b04d9', 'Gold', 1, 1621103852),
|
('Karl1505', '7bfdf1ab7d86e07a3eb6c5614578c41c571ae6f3faaf836233a9b6f33538c6ea1125dab202d99325a92cd35856191fc495b7e5ec6cb2765d5bafa2af18f43c94f3392425a65a14e0e712d1c5de04f662fb84dc14b37151796db7f0eaec8b34351adfd2a93961125b04d9', 'Gold', 1, 1621103852),
|
||||||
('Karloss0403', '71f8993c61b41ece3e3a7e8b50ec956670998b9930e667e9f2881ce508effc5b98bac9ddc3579f0455111203e092713bc7375ddd552f0cd7a33c698c147a6d9eea623099c3f993ff8634ef42975c6f8f0e28fb5f81ab1fa3e17a9729388c4b9779e3e9e16204fa570bcb', 'KDB', 1, 1646394742),
|
('Karloss0403', '71f8993c61b41ece3e3a7e8b50ec956670998b9930e667e9f2881ce508effc5b98bac9ddc3579f0455111203e092713bc7375ddd552f0cd7a33c698c147a6d9eea623099c3f993ff8634ef42975c6f8f0e28fb5f81ab1fa3e17a9729388c4b9779e3e9e16204fa570bcb', 'KDB', 1, 1646394742),
|
||||||
('Karloss0403', '364cafa40eb896ffc220975d3b52431723a6d715a17c13f12296d62fa1e5f31f71ba2809e3fb9120231de8c388a736eec9064494a187fa7cf10357425d5b8c9d545487e5fed49407afad377f0225d935ea08e867dd803f5c12472a3e70cca7bd233a314a8c747e8ec751', 'DIAZ', 1, 1646394794);
|
('Karloss0403', '364cafa40eb896ffc220975d3b52431723a6d715a17c13f12296d62fa1e5f31f71ba2809e3fb9120231de8c388a736eec9064494a187fa7cf10357425d5b8c9d545487e5fed49407afad377f0225d935ea08e867dd803f5c12472a3e70cca7bd233a314a8c747e8ec751', 'DIAZ', 1, 1646394794),
|
||||||
|
('Karl0ss1703', 'b96aaf626027d671a0d0b3975bdc498631e33f9a177700b006db2edd1b31d3fc35bbc0812b6ee86e0693a76d358309ce1a070a7d35117cfd3fde8a6d7763766d42c35702b5cc0e933069a955ebd36c00349eedc2c9b80e5c493dcf69e9cfa62afdd81c0d9eadd67b405b', 'KDB', 1, 1647549531),
|
||||||
|
('Karl0ss1703', '2cfaf0ebd2aa3fc2f8b750cc24bdd54e3f2ea53ba7204e77ab35b85cb24a801fcaabffb74c7f755ab79646fcb36cd45cd3ce4de10148d006ede36154e86a839defc6d3f473e27f4cd520de11b179a1df445cb34cb9857128d440632c59c154a2118f46555d9b48afdc09', 'Titan', 1, 1647549703);
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `users`;
|
DROP TABLE IF EXISTS `users`;
|
||||||
CREATE TABLE `users`
|
CREATE TABLE `users`
|
||||||
|
@ -2,12 +2,12 @@ import React, { Component } from "react";
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import Dropdown from "react-dropdown";
|
import Dropdown from "react-dropdown";
|
||||||
import "react-dropdown/style.css";
|
import "react-dropdown/style.css";
|
||||||
import readCookie from "../checkAuth"
|
import readCookie from "../checkAuth";
|
||||||
|
|
||||||
let arr = [];
|
let arr = [];
|
||||||
class AddAccount extends Component {
|
class AddAccount extends Component {
|
||||||
constructor() {
|
constructor() {
|
||||||
readCookie();
|
// readCookie();
|
||||||
|
|
||||||
super();
|
super();
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -22,7 +22,9 @@ class AddAccount extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fetchOptions() {
|
fetchOptions() {
|
||||||
fetch("http://vps.k-world.me.uk:3001/getStreamNames")
|
try {
|
||||||
|
fetch("http://vps.k-world.me.uk:3001/getStreamNames",
|
||||||
|
{ withCredentials: true})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
return res.json();
|
return res.json();
|
||||||
})
|
})
|
||||||
@ -32,6 +34,9 @@ class AddAccount extends Component {
|
|||||||
});
|
});
|
||||||
this.setState({ options: arr });
|
this.setState({ options: arr });
|
||||||
});
|
});
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onSelect = (e) => {
|
_onSelect = (e) => {
|
||||||
@ -60,11 +65,15 @@ class AddAccount extends Component {
|
|||||||
console.log({ username, password, stream });
|
console.log({ username, password, stream });
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.post("http://vps.k-world.me.uk:3001/addAccount", {
|
.post(
|
||||||
|
"http://vps.k-world.me.uk:3001/addAccount",
|
||||||
|
{
|
||||||
username,
|
username,
|
||||||
password,
|
password,
|
||||||
stream,
|
stream,
|
||||||
}, { withCredentials: true })
|
},
|
||||||
|
{ withCredentials: true }
|
||||||
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
|
@ -13,7 +13,7 @@ function retrievePasswordFromDB(user, userAccUser) {
|
|||||||
let userId
|
let userId
|
||||||
try {
|
try {
|
||||||
userId = sql.query(`SELECT u.id FROM users u WHERE u.userName = '${user}'`);
|
userId = sql.query(`SELECT u.id FROM users u WHERE u.userName = '${user}'`);
|
||||||
userId = userId[0].idusers
|
userId = userId[0].id
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('User not found')
|
console.log('User not found')
|
||||||
return (error)
|
return (error)
|
||||||
@ -35,9 +35,12 @@ WHERE userAccounts.userID = ${userId} AND userAccounts.username = '${userAccUser
|
|||||||
} else {
|
} else {
|
||||||
const decryptedString = cryptr.decrypt(accountPassword[0].password);
|
const decryptedString = cryptr.decrypt(accountPassword[0].password);
|
||||||
console.log(decryptedString)
|
console.log(decryptedString)
|
||||||
|
return decryptedString
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// retrievePasswordFromDB('Karl', 'Karl2903')
|
// retrievePasswordFromDB('Karl', 'Karl2903')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -3,17 +3,31 @@ let streamArrays = require('./streamArray.json')
|
|||||||
|
|
||||||
let users = require('./logins.json')
|
let users = require('./logins.json')
|
||||||
|
|
||||||
|
const { getStreamsNew } = require('../routes/getStreams')
|
||||||
|
|
||||||
|
const { updateStreamData } = require('./updateStreams')
|
||||||
|
|
||||||
const { gotRequest } = require('./gotRequest')
|
const { gotRequest } = require('./gotRequest')
|
||||||
|
|
||||||
|
const { decryptPassword } = require('./password')
|
||||||
|
|
||||||
|
const { getAllUserAccounts } = require('./getUser')
|
||||||
|
|
||||||
const delay = ms => new Promise(res => setTimeout(res, ms));
|
const delay = ms => new Promise(res => setTimeout(res, ms));
|
||||||
|
|
||||||
|
async function buildURL(streamURL, username, password) {
|
||||||
|
let url = streamURL + "/player_api.php?username=" + username + "&password=" + password
|
||||||
|
return url
|
||||||
|
}
|
||||||
|
|
||||||
async function singleCheck(username) {
|
async function singleCheck(username) {
|
||||||
let user = users.find(user => user.username === username)
|
let user = users.find(user => user.username === username)
|
||||||
for (let index = 0; index < streamArrays.length; index++) {
|
for (let index = 0; index < streamArrays.length; index++) {
|
||||||
await delay(500);
|
await delay(500);
|
||||||
const stream = streamArrays[index];
|
const stream = streamArrays[index];
|
||||||
process.stdout.write('.')
|
process.stdout.write('.')
|
||||||
let url = stream.StreamURL + "/player_api.php?username=" + user.username + "&password=" + user.password
|
// let url = stream.StreamURL + "/player_api.php?username=" + user.username + "&password=" + user.password
|
||||||
|
let url = await buildURL(stream.streamURL, user.username, user.password)
|
||||||
let t = await gotRequest(url)
|
let t = await gotRequest(url)
|
||||||
let body = t.body
|
let body = t.body
|
||||||
if (t.statusCode == 200 && body !== "") {
|
if (t.statusCode == 200 && body !== "") {
|
||||||
@ -39,10 +53,11 @@ async function main() {
|
|||||||
await delay(500);
|
await delay(500);
|
||||||
const stream = streamArrays[index];
|
const stream = streamArrays[index];
|
||||||
process.stdout.write('.')
|
process.stdout.write('.')
|
||||||
let url = stream.StreamURL + "/player_api.php?username=" + user.username + "&password=" + user.password
|
let url = await buildURL(stream.streamURL, user.username, user.password)
|
||||||
let t = await gotRequest(url)
|
let t = await gotRequest(url)
|
||||||
let body = t.body
|
let body = t.body
|
||||||
if (t.statusCode == 200 && body !== "") {
|
if (t.statusCode == 200 && body !== "") {
|
||||||
|
try {
|
||||||
body = JSON.parse(body)
|
body = JSON.parse(body)
|
||||||
if (body.user_info.auth) {
|
if (body.user_info.auth) {
|
||||||
// var date = new Date(body.user_info.exp_date * 1000).toLocaleDateString('en-GB')
|
// var date = new Date(body.user_info.exp_date * 1000).toLocaleDateString('en-GB')
|
||||||
@ -50,6 +65,8 @@ async function main() {
|
|||||||
console.log('Match - ' + user.username + ' - ' + stream.StreamURL + ' - ' + stream.StreamName + ' - Expires - ' + body.user_info.exp_date)
|
console.log('Match - ' + user.username + ' - ' + stream.StreamURL + ' - ' + stream.StreamName + ' - Expires - ' + body.user_info.exp_date)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
process.stdout.write('\nEnd Of Streams\n\n')
|
process.stdout.write('\nEnd Of Streams\n\n')
|
||||||
@ -57,9 +74,49 @@ async function main() {
|
|||||||
console.log('Finished')
|
console.log('Finished')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function newCheck() {
|
||||||
|
streamURLS = await getStreamsNew()
|
||||||
|
let userAccounts = await getAllUserAccounts()
|
||||||
|
userAccounts = userAccounts.map(user => {
|
||||||
|
user.passwordDecryped = decryptPassword(user.password)
|
||||||
|
return user
|
||||||
|
})
|
||||||
|
for (let userAccount of userAccounts) {
|
||||||
|
console.log(userAccount.username)
|
||||||
|
for (let streamURL of streamURLS) {
|
||||||
|
process.stdout.write('.')
|
||||||
|
let url = await buildURL(streamURL, userAccount.username, userAccount.passwordDecryped)
|
||||||
|
let t = await gotRequest(url)
|
||||||
|
let body = t.body
|
||||||
|
if (t.statusCode == 200 && body !== "") {
|
||||||
|
try {
|
||||||
|
body = JSON.parse(body)
|
||||||
|
if (body.user_info.auth) {
|
||||||
|
// var date = new Date(body.user_info.exp_date * 1000).toLocaleDateString('en-GB')
|
||||||
|
process.stdout.write('\n')
|
||||||
|
console.log('Match - ' + userAccount.username + ' - ' + streamURL + ' - Expires - ' + body.user_info.exp_date)
|
||||||
|
await updateStreamData(userAccount, streamURL, body.user_info.exp_date)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log('Error - ' + userAccount.username + ' - ' + streamURL + ' - Expires - ' + body.user_info.exp_date)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// console.log(userAccounts)
|
||||||
|
// retrievePasswordFromDB()
|
||||||
|
}
|
||||||
|
|
||||||
// main()
|
// main()
|
||||||
|
// singleCheck('Karl2903')
|
||||||
|
newCheck()
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
newCheck,
|
||||||
singleCheck,
|
singleCheck,
|
||||||
main
|
main
|
||||||
}
|
}
|
@ -20,7 +20,22 @@ function getUserAccounts(user) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
function getAllUserAccounts() {
|
||||||
getUserAccounts
|
let data = sql.query(`SELECT
|
||||||
|
userAccounts.username,
|
||||||
|
userAccounts.password
|
||||||
|
FROM userAccounts
|
||||||
|
`)
|
||||||
|
// console.log(data)
|
||||||
|
if (data.length == 0) {
|
||||||
|
return 'User Not Found'
|
||||||
|
} else {
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
getUserAccounts,
|
||||||
|
getAllUserAccounts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,9 @@ const got = require('got')
|
|||||||
|
|
||||||
const gotRequest = async (url) => {
|
const gotRequest = async (url) => {
|
||||||
let returnResponse = {};
|
let returnResponse = {};
|
||||||
let options = {}
|
let options = {
|
||||||
|
timeout: 2000
|
||||||
|
}
|
||||||
await got(url, options)
|
await got(url, options)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
returnResponse = response;
|
returnResponse = response;
|
||||||
|
@ -66,5 +66,13 @@
|
|||||||
{
|
{
|
||||||
"username": "Karloss0403",
|
"username": "Karloss0403",
|
||||||
"password": "4V5t4M2DS3"
|
"password": "4V5t4M2DS3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"username": "Karl0ss1703",
|
||||||
|
"password": "xSZYpDWHo7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"username": "Karl0ss1703",
|
||||||
|
"password": "HTS4QUTV9V"
|
||||||
}
|
}
|
||||||
]
|
]
|
13
lib/password.js
Normal file
13
lib/password.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
const Cryptr = require('cryptr');
|
||||||
|
const cryptr = new Cryptr('BBLBTV-DNS-PASSWORDS');
|
||||||
|
|
||||||
|
function decryptPassword(password) {
|
||||||
|
const decryptedString = cryptr.decrypt(password);
|
||||||
|
// console.log(decryptedString)
|
||||||
|
return decryptedString
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
decryptPassword
|
||||||
|
}
|
||||||
|
|
@ -1 +1 @@
|
|||||||
[{"StreamName":"Insanity","StreamURL":"https://trippy.pro:443"},{"StreamName":"PremPlus","StreamURL":"https://itty.in:443"},{"StreamName":"GunSlinger","StreamURL":"http://gunslingertv.org:8080"},{"StreamName":"VIP","StreamURL":"http://shark.brokenwarrior.xyz:8080"},{"StreamName":"Technoid","StreamURL":"http://capoisagod2021.org:8080"},{"StreamName":"Old Premium","StreamURL":"https://caporeds.online:443"},{"StreamName":"??","StreamURL":"http://screamstreams.info:8080"},{"StreamName":"Gold","StreamURL":"http://catenamode.cf:8090"},{"StreamName":"??","StreamURL":"http://bigbox.me.uk:2086"},{"StreamName":"??","StreamURL":"http://beautifilm.xyz:8080"},{"StreamName":"??","StreamURL":"http://mytv.digital:8080/"},{"StreamName":"??","StreamURL":"http://v2servers.tk:2052"},{"StreamName":"??","StreamURL":"http://ac.mustardsubs.tk:8880"},{"StreamName":"??","StreamURL":"http://ip365.cx:80"},{"StreamName":"Gold","StreamURL":"http://stream.streamhubtv.xyz:8080"},{"StreamName":"??","StreamURL":"http://foxmedia.bounceme.net:8282"},{"StreamName":"??","StreamURL":"http://gold.mypsx.net:8880"},{"StreamName":"Foden","StreamURL":"https://rushem.in:443"},{"StreamName":"Shark","StreamURL":"http://pimptv.dnsabr.com:25461"},{"StreamName":"Keano","StreamURL":"http://tavaratv.xyz:2095"},{"StreamName":"??","StreamURL":"http://tanmedia.watch:8880"},{"StreamName":"Python","StreamURL":"http://streamknighttv.xyz:8080"},{"StreamName":"??","StreamURL":"http://covidsucks.xyz:8080"},{"StreamName":"??","StreamURL":"http://fckbrexit.link:8080"},{"StreamName":"??","StreamURL":"http://tv.realot.xyz:35001"},{"StreamName":"??","StreamURL":"http://iptv.satplex.co.uk:8080"},{"StreamName":"??","StreamURL":"http://sting.ltd:25461"},{"StreamName":"??","StreamURL":"http://gold.mypsx.net:8880"},{"StreamName":"??","StreamURL":"http://titanmedia.tech:8080"},{"StreamName":"??"},{"StreamName":"Gambler"},{"StreamName":"??"},{"StreamName":"??"},{"StreamName":"??"}]
|
[{"StreamName":"Insanity","StreamURL":"https://trippy.pro:443"},{"StreamName":"PremPlus","StreamURL":"https://itty.in:443"},{"StreamName":"GunSlinger","StreamURL":"http://gunslingertv.org:8080"},{"StreamName":"VIP","StreamURL":"http://shark.brokenwarrior.xyz:8080"},{"StreamName":"Technoid","StreamURL":"http://capoisagod2021.org:8080"},{"StreamName":"Old Premium","StreamURL":"https://caporeds.online:443"},{"StreamName":"??","StreamURL":"http://screamstreams.info:8080"},{"StreamName":"Gold","StreamURL":"http://bigbox.me.uk:2086"},{"StreamName":"??","StreamURL":"http://beautifilm.xyz:8080"},{"StreamName":"??","StreamURL":"http://mytv.digital:8080/"},{"StreamName":"??","StreamURL":"http://v2servers.tk:2052"},{"StreamName":"??","StreamURL":"http://ac.mustardsubs.tk:8880"},{"StreamName":"??","StreamURL":"http://ip365.cx:80"},{"StreamName":"??","StreamURL":"http://stream.streamhubtv.xyz:8080"},{"StreamName":"Gold","StreamURL":"http://foxmedia.bounceme.net:8282"},{"StreamName":"??","StreamURL":"http://gold.mypsx.net:8880"},{"StreamName":"??","StreamURL":"http://SERVER1.cheesywotsit.gq:8090"},{"StreamName":"Foden","StreamURL":"http://kibb.link:8080"},{"StreamName":"Shark","StreamURL":"http://pimptv.dnsabr.com:25461"},{"StreamName":"Keano","StreamURL":"http://tavaratv.xyz:2095"},{"StreamName":"??","StreamURL":"http://tanmedia.watch:8880"},{"StreamName":"Python","StreamURL":"http://streamknighttv.xyz:8080"},{"StreamName":"??","StreamURL":"http://covidsucks.xyz:8080"},{"StreamName":"??","StreamURL":"http://fckbrexit.link:8080"},{"StreamName":"??","StreamURL":"http://tv.realot.xyz:35001"},{"StreamName":"??","StreamURL":"http://iptv.satplex.co.uk:8080"},{"StreamName":"??","StreamURL":"http://sting.ltd:25461"},{"StreamName":"??","StreamURL":"http://gold.mypsx.net:8880"},{"StreamName":"??","StreamURL":"http://titanmedia.tech:8080"},{"StreamName":"??"},{"StreamName":"Gambler"},{"StreamName":"??"},{"StreamName":"??"},{"StreamName":"??"}]
|
16
lib/updateStreams.js
Normal file
16
lib/updateStreams.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
const sql = require('./mysql')
|
||||||
|
|
||||||
|
function updateStreamData(userAccount, streamURL, expiaryDate) {
|
||||||
|
let result
|
||||||
|
try {
|
||||||
|
result = sql.query(`UPDATE userAccounts SET streamURL = "${streamURL}", expiaryDate = ${expiaryDate} WHERE username = "${userAccount.username}" AND password = "${userAccount.password}"; `);
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
updateStreamData
|
||||||
|
}
|
||||||
|
|
@ -32,7 +32,7 @@ function mapToStream(DNSList) {
|
|||||||
return streamArrays
|
return streamArrays
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function getStreams() {
|
||||||
let requestData
|
let requestData
|
||||||
let jointArray = []
|
let jointArray = []
|
||||||
for (let index = 0; index < DNSArray.length; index++) {
|
for (let index = 0; index < DNSArray.length; index++) {
|
||||||
@ -47,12 +47,28 @@ async function main() {
|
|||||||
await mapToStream(jointArray)
|
await mapToStream(jointArray)
|
||||||
return streamArrays
|
return streamArrays
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getStreamsNew() {
|
||||||
|
let requestData
|
||||||
|
let jointArray = []
|
||||||
|
for (let index = 0; index < DNSArray.length; index++) {
|
||||||
|
const url = DNSArray[index];
|
||||||
|
requestData = await gotRequest(url)
|
||||||
|
let DNSList = JSON.parse(requestData.body)
|
||||||
|
DNSList = splitToArray(DNSList.su)
|
||||||
|
DNSList.forEach(url => {
|
||||||
|
jointArray.push(url)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return jointArray
|
||||||
|
}
|
||||||
/* GET users listing. */
|
/* GET users listing. */
|
||||||
router.get('/', async function (req, res, next) {
|
router.get('/', async function (req, res, next) {
|
||||||
let fullStreamArray = await main()
|
let fullStreamArray = await main()
|
||||||
res.send(fullStreamArray)
|
res.send(fullStreamArray)
|
||||||
});
|
});
|
||||||
|
|
||||||
// main()
|
module.exports = {
|
||||||
|
router, getStreams, getStreamsNew
|
||||||
module.exports = router;
|
}
|
||||||
|
;
|
Loading…
x
Reference in New Issue
Block a user