7 Commits

Author SHA1 Message Date
6583b0c15c Updated version 2021-09-13 17:14:30 +02:00
038f708b36 Fixed vivo.sx / vivo.st regex and unwanted return 2021-09-13 17:13:49 +02:00
f0f8bc9189 Added id 2021-09-13 01:57:41 +02:00
b45c1410f2 Added 7 new sites and general refactoring 2021-09-13 01:36:00 +02:00
4907448aa6 Add overflow 2021-09-13 01:14:00 +02:00
4f08fee7b4 Typo fix 2021-09-02 09:38:25 +02:00
3624317116 Update README.md 2021-09-01 22:18:20 +02:00
7 changed files with 92 additions and 23 deletions

View File

@ -24,11 +24,11 @@ The addon was tested on
### Firefox ### Firefox
Install the `.xpi` (firefox addon) file from the [latest release](https://github.com/ByteDream/vivosx-source-redirector/releases/latest). Install the addon directly from the [firefox addon store](https://addons.mozilla.org/de/firefox/addon/stream-bypass/).
### Chromium / Google Chrome ### Chromium / Google Chrome
1. Download the `stream-bypass-<version>.zip` file from the [latest release](https://github.com/ByteDream/vivosx-source-redirector/releases/latest) and unzip it (with [7zip](https://www.7-zip.org/) or something like that). 1. Download the `stream-bypass-<version>.zip` file from the [latest release](https://github.com/ByteDream/stream-bypass/releases/latest) and unzip it (with [7zip](https://www.7-zip.org/) or something like that).
2. Go into your browser and type `chrome://extensions` in the address bar. 2. Go into your browser and type `chrome://extensions` in the address bar.
3. Turn the developer mode in the top right corner on. 3. Turn the developer mode in the top right corner on.
4. Click Load unpacked. 4. Click Load unpacked.
@ -36,7 +36,7 @@ Install the `.xpi` (firefox addon) file from the [latest release](https://github
### Opera ### Opera
1. Download the `stream-bypass-<version>.zip` file from the [latest release](https://github.com/ByteDream/vivosx-source-redirector/releases/latest) and unzip it (with [7zip](https://www.7-zip.org/) or something like that). 1. Download the `stream-bypass-<version>.zip` file from the [latest release](https://github.com/ByteDream/stream-bypass/releases/latest) and unzip it (with [7zip](https://www.7-zip.org/) or something like that).
2. Go into your browser and type `opera://extensions` in the address bar. 2. Go into your browser and type `opera://extensions` in the address bar.
3. Turn the developer mode in the top right corner on. 3. Turn the developer mode in the top right corner on.
4. Click Load unpacked. 4. Click Load unpacked.
@ -77,7 +77,7 @@ For this, you need [docker](https://www.docker.com/) to be installed.
``` ```
- Compile - Compile
``` ```
$ docker rum --rm -v build:/build stream-bypass $ docker run --rm -v build:/build stream-bypass
``` ```
The compiled output will remain in a (new created if not existing) `build` directory. The compiled output will remain in a (new created if not existing) `build` directory.

View File

@ -1,4 +1,11 @@
evoload.io
mixdrop.co
streamtape.com streamtape.com
streamzz.to
thevideome.com
vidlox.me
vidoza.net vidoza.net
vivo.st
vivo.sx vivo.sx
voe.sx
vupload.com vupload.com

9
build.py Executable file → Normal file
View File

@ -55,17 +55,12 @@ def copy_built():
subprocess.call(['tsc', '-p', 'src']) subprocess.call(['tsc', '-p', 'src'])
build_path = Path('build') build_path = Path('build')
if build_path.is_dir(): if not build_path.is_dir():
for file in build_path.rglob('*'):
if file.is_dir():
shutil.rmtree(str(file))
else:
file.unlink()
else:
build_path.mkdir() build_path.mkdir()
for file in Path('src').rglob('*'): for file in Path('src').rglob('*'):
build_file = build_path.joinpath(str(file)[4:]) build_file = build_path.joinpath(str(file)[4:])
if file.is_dir(): if file.is_dir():
if not build_file.exists():
build_file.mkdir(parents=True) build_file.mkdir(parents=True)
elif file.suffix == '.sass': elif file.suffix == '.sass':
css_file = str(file)[:-4] + 'css' css_file = str(file)[:-4] + 'css'

View File

@ -1,3 +1,7 @@
function hasSuffix(content: string, suffix: string) {
return content.indexOf(suffix, content.length - suffix.length) !== -1
}
// @ts-ignore // @ts-ignore
chrome.storage.local.get(['all', 'disabled'], function (result) { chrome.storage.local.get(['all', 'disabled'], function (result) {
let keys = Object.keys(result) let keys = Object.keys(result)
@ -12,10 +16,24 @@ chrome.storage.local.get(['all', 'disabled'], function (result) {
let matchClass = match[2] as Match let matchClass = match[2] as Match
let re let re
if (regex !== null) {
if ((re = document.body.innerHTML.match(regex)) === null) {
continue
}
} else {
re = document.body.innerHTML.match(regex)
}
if (matchClass === null) {
if (regex === null) { if (regex === null) {
location.assign(matchClass === null ? document.body.innerHTML : matchClass.match(new RegExp('').exec(document.body.innerHTML))) location.assign(document.body.innerHTML)
} else if ((re = regex.exec(document.body.innerHTML)) !== null) { } else {
location.assign(matchClass === null ? re[0] : matchClass.match(re)) location.assign(hasSuffix(re[0], 'm3u8') ? `https://bharadwajpro.github.io/m3u8-player/player/#${re[0]}`: re[0])
}
} else {
matchClass.match(re).then(function (path) {
location.assign(hasSuffix(path, 'm3u8') ? `https://bharadwajpro.github.io/m3u8-player/player/#${path}`: path)
})
} }
} }
return return

View File

@ -3,15 +3,27 @@
"name": "Stream Bypass", "name": "Stream Bypass",
"author": "ByteDream", "author": "ByteDream",
"description": "", "description": "",
"version": "1.0.0", "version": "1.1.4",
"homepage_url": "https://github.com/ByteDream/stream-bypass", "homepage_url": "https://github.com/ByteDream/stream-bypass",
"browser_specific_settings": {
"gecko": {
"id": "{55dd42e8-3dd9-455a-b4fe-86664881b10c}"
}
},
"content_scripts": [ "content_scripts": [
{ {
"all_frames": true, "all_frames": true,
"matches": [ "matches": [
"*://evoload.io/*",
"*://mixdrop.co/*",
"*://streamtape.com/*", "*://streamtape.com/*",
"*://streamzz.to/*",
"*://thevideome.com/*",
"*://vidlox.me/*",
"*://vidoza.net/*", "*://vidoza.net/*",
"*://vivo.st/*",
"*://vivo.sx/*", "*://vivo.sx/*",
"*://voe.sx/*",
"*://vupload.com/*" "*://vupload.com/*"
], ],
"js": [ "js": [

View File

@ -1,16 +1,44 @@
interface Match { interface Match {
match(match: RegExpMatchArray): string match(match: RegExpMatchArray): Promise<string>
}
class Evoload implements Match {
async match(match: RegExpMatchArray): Promise<string> {
const code = window.location.pathname.split('/').slice(-1)[0]
const response = await fetch('https://evoload.io/SecurePlayer', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({code: code})
})
const json = await response.json()
return json['stream']['src']
}
}
class Mixdrop implements Match {
async match(match: RegExpMatchArray): Promise<string> {
return `https://a-${match[1]}.${match[4]}.${match[5]}/v/${match[2]}.${match[6]}?s=${match[12]}&e=${match[13]}`
}
} }
class Streamtape implements Match { class Streamtape implements Match {
match(match: RegExpMatchArray): string { async match(match: RegExpMatchArray): Promise<string> {
return `https://streamtape.com/get_video?${match[0]}` return `https://streamtape.com/get_video?${match[0]}`
} }
} }
class TheVideoMe implements Match {
async match(match: RegExpMatchArray): Promise<string> {
return `https://thevideome.com/${match[5]}.mp4`
}
}
class Vivo implements Match { class Vivo implements Match {
match(match: RegExpMatchArray): string { async match(match: RegExpMatchArray): Promise<string> {
return this.rot47(decodeURIComponent(match[1])) return this.rot47(decodeURIComponent(match[0]))
} }
// decrypts a string with the rot47 algorithm (https://en.wikipedia.org/wiki/ROT13#Variants) // decrypts a string with the rot47 algorithm (https://en.wikipedia.org/wiki/ROT13#Variants)
@ -29,15 +57,22 @@ class Vivo implements Match {
} }
class Vupload implements Match { class Vupload implements Match {
match(match: RegExpMatchArray): string { async match(match: RegExpMatchArray): Promise<string> {
return `https://www3.megaupload.to/${match[0]}/v.mp4` return `https://www3.megaupload.to/${match[0]}/v.mp4`
} }
} }
// every match HAS to be on an separate line // every match HAS to be on an separate line
const matches = [ const matches = [
['evoload.io', null, new Evoload()],
['mixdrop.co', new RegExp(/(?<=\|)\w{2,}/gm), new Mixdrop()],
['streamtape.com', new RegExp(/id=\S*(?=')/gm), new Streamtape()], ['streamtape.com', new RegExp(/id=\S*(?=')/gm), new Streamtape()],
['streamzz.to', new RegExp(/https?:\/\/get.streamz.tw\/getlink-\w+\.dll/gm), null],
['thevideome.com', new RegExp(/(?<=\|)\w{2,}/gm), new TheVideoMe()],
['vidlox.me', new RegExp(/(?<=\[")\S+?(?=")/gm), null],
['vidoza.net', new RegExp(/(?<=src:(\s*)?")\S*(?=")/gm), null], ['vidoza.net', new RegExp(/(?<=src:(\s*)?")\S*(?=")/gm), null],
['vivo.sx', new RegExp(/source:\s*'(\S+)'/gm), new Vivo()], ['vivo.st', new RegExp(/(?<=source:\s')(\S+)(?=')/gm), new Vivo()],
['vivo.sx', new RegExp(/(?<=source:\s')(\S+)(?=')/gm), new Vivo()],
['voe.sx', new RegExp(/https?:\/\/\S*m3u8(?=")/gm), null],
['vupload.com', new RegExp(/(?<=class\|)\w*/gm), new Vupload()] ['vupload.com', new RegExp(/(?<=class\|)\w*/gm), new Vupload()]
] ]

View File

@ -2,6 +2,8 @@ body
background-color: #2b2a33 background-color: #2b2a33
font-weight: bold font-weight: bold
max-height: 500px max-height: 500px
overflow-x: hidden
overflow-y: auto
a, p a, p