Last active
February 29, 2020 11:05
-
-
Save ngxson/4623850a5fbf7413cae24a63adcf5515 to your computer and use it in GitHub Desktop.
protectvideodownload dot com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -protocol_whitelist file,https,http,crypto,data,tls -i ./video.m3u8 -c copy -bsf:a aac_adtstoasc output.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// code to run in Console tab | |
var nUrl = 'https://gostreaming.tech/list/smil:1535100921-4a6071d47f80e678f88394e6fc89b8f018fde1c4-22238379.smil/1535100921-4a6071d47f80e678f88394e6fc89b8f018fde1c4-22238379.mp4_chunk.m3u8?nimblesessionid=21181'; | |
var nNumOfParts = 25; | |
function getPartUrl(num) { | |
return nUrl.replace('mp4_chunk.m3u8', 'mp4-n_' + num + '_0_0.ts'); | |
} | |
function getPartUrlToken(num) { | |
return new Promise(resolve => { | |
jQuery.ajax({ | |
url: "/video/touch.php", | |
success: function (_0xd85bx9) { | |
var _url = getPartUrl(num) + | |
"&token=" + function (_0xd85bxa) { | |
{ | |
var _0xd85bxb = ""; | |
var _0xd85bxc = "123456780ABCDEFGHKLMNOPYTRQW"; | |
for (var _0xd85bxd = 0; _0xd85bxd < _0xd85bxa.length; _0xd85bxd++) { | |
if (_0xd85bxd % 2 == 0) { | |
_0xd85bxb += _0xd85bxa[_0xd85bxd] | |
} else { | |
_0xd85bxb += _0xd85bxc[Math.floor((Math.random() * _0xd85bxc.length))]; | |
_0xd85bxb += _0xd85bxa[_0xd85bxd] | |
} | |
}; | |
return _0xd85bxb | |
} | |
}(_0xd85bx9); | |
//jQuery.get(_url) | |
// TODO: đoạn này cần tửi dữ liệu từ _url, lưu về máy rồi mới chạy tiếp part tiếp theo | |
// (vì token sẽ bị reset ngay sau khi mình tải part này) | |
resolve(_url); | |
}, | |
async: false, | |
cache: false | |
}) | |
}) | |
} | |
async function buildList(numOfParts) { | |
for (var i = 0 ; i < numOfParts ; i++) { | |
console.log(await getPartUrlToken(i)); | |
} | |
} | |
buildList(nNumOfParts); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment