Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Js sandbox causing errors #486

Open
Blatzar opened this issue Aug 22, 2020 · 4 comments · May be fixed by #491
Open

Js sandbox causing errors #486

Blatzar opened this issue Aug 22, 2020 · 4 comments · May be fixed by #491
Labels
bug Something isn't working

Comments

@Blatzar
Copy link
Collaborator

Blatzar commented Aug 22, 2020

Describe the bug

9e254cc seems to have caused issues with eval_in_node()

Without modifications it gives NameError: name 'path' is not defined

Editing https://github.com/vn-ki/anime-downloader/blob/master/anime_downloader/util.py#L402 to os.path will result in error below

To reproduce

anime -ll DEBUG dl "hunter x hunter" --provider animekisa -c 2
LOG
bl@arch ~> anime -ll DEBUG dl "hunter x hunter" --provider animekisa -c 2
2020-08-22 14:01:28 arch anime_downloader.util[84260] INFO anime-downloader 4.6.3
2020-08-22 14:01:28 arch anime_downloader.util[84260] DEBUG Platform: Linux-5.7.7-arch1-1-x86_64-with-glibc2.2.5
2020-08-22 14:01:28 arch anime_downloader.util[84260] DEBUG Python 3.8.3
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG -----
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG GET https://animekisa.tv/search
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG {'params': {'q': 'hunter x hunter'}}
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG {'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.9 Safari/536.5'}                                        
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG -----
2020-08-22 14:01:28 arch anime_downloader.session[84260] DEBUG cached request
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG https://animekisa.tv/search?q=hunter+x+hunter                                                                                                                  
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG /tmp/animedlm6tlqktt/tmpzys605nr
+--------+--------------------------------------------------+--------+
|     12 | Hunter x Hunter Movie 2: The Last Mission        |        |
|     11 | Hunter x Hunter Movie 2: The Last Mission Dubbed |        |
|     10 | Hunter x Hunter: Phantom Rouge                   |        |
|      9 | Hunter x Hunter: The Last Mission                |        |
|      8 | Hunter x Hunter: Phantom Rouge Dubbed            |        |
|      7 | Hunter x Hunter Dubbed                           |        |
|      6 | Hunter x Hunter (2011) Dubbed                    |        |
|      5 | Hunter X Hunter OVA 2                            |        |
|      4 | Hunter X Hunter OVA                              |        |
|      3 | Hunter X Hunter OVA 3                            |        |
|      2 | Hunter X Hunter                                  |        |
|      1 | Hunter x Hunter (2011)                           |        |
|--------+--------------------------------------------------+--------|
|   SlNo | Title                                            | Meta   |
+--------+--------------------------------------------------+--------+
2020-08-22 14:01:28 arch anime_downloader.util[84260] INFO Selected Hunter X Hunter
2020-08-22 14:01:28 arch anime_downloader.sites.anime[84260] INFO Extracting episode info from page
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG -----
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG GET https://www.animekisa.tv/hunter-x-hunter                                                                                                                   
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG {}
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG {'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.9 Safari/536.5'}                                        
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG -----
2020-08-22 14:01:28 arch anime_downloader.session[84260] DEBUG cached request
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG https://animekisa.tv/hunter-x-hunter
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG /tmp/animedlm6tlqktt/tmpainpf2o4
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG -----
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG GET https://www.animekisa.tv/hunter-x-hunter                                                                                                                   
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG {}
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG {'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.9 Safari/536.5'}                                        
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG -----
2020-08-22 14:01:28 arch anime_downloader.session[84260] DEBUG cached request
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG https://animekisa.tv/hunter-x-hunter
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG /tmp/animedlm6tlqktt/tmpls19pkb8
2020-08-22 14:01:28 arch anime_downloader.sites.anime[84260] DEBUG EPISODE IDS: length: 62, ids: ['https://animekisa.tv/hunter-x-hunter-episode-1', 'https://animekisa.tv/hunter-x-hunter-episode-2', 'https://animekisa.tv/hunter-x-hunter-episode-3', 'https://animekisa.tv/hunter-x-hunter-episode-4', 'https://animekisa.tv/hunter-x-hunter-episode-5', 'https://animekisa.tv/hunter-x-hunter-episode-6', 'https://animekisa.tv/hunter-x-hunter-episode-7', 'https://animekisa.tv/hunter-x-hunter-episode-8', 'https://animekisa.tv/hunter-x-hunter-episode-9', 'https://animekisa.tv/hunter-x-hunter-episode-10', 'https://animekisa.tv/hunter-x-hunter-episode-11', 'https://animekisa.tv/hunter-x-hunter-episode-12', 'https://animekisa.tv/hunter-x-hunter-episode-13', 'https://animekisa.tv/hunter-x-hunter-episode-14', 'https://animekisa.tv/hunter-x-hunter-episode-15', 'https://animekisa.tv/hunter-x-hunter-episode-16', 'https://animekisa.tv/hunter-x-hunter-episode-17', 'https://animekisa.tv/hunter-x-hunter-episode-18', 'https://animekisa.tv/hunter-x-hunter-episode-19', 'https://animekisa.tv/hunter-x-hunter-episode-20', 'https://animekisa.tv/hunter-x-hunter-episode-21', 'https://animekisa.tv/hunter-x-hunter-episode-22', 'https://animekisa.tv/hunter-x-hunter-episode-23', 'https://animekisa.tv/hunter-x-hunter-episode-24', 'https://animekisa.tv/hunter-x-hunter-episode-25', 'https://animekisa.tv/hunter-x-hunter-episode-26', 'https://animekisa.tv/hunter-x-hunter-episode-27', 'https://animekisa.tv/hunter-x-hunter-episode-28', 'https://animekisa.tv/hunter-x-hunter-episode-29', 'https://animekisa.tv/hunter-x-hunter-episode-30', 'https://animekisa.tv/hunter-x-hunter-episode-31', 'https://animekisa.tv/hunter-x-hunter-episode-32', 'https://animekisa.tv/hunter-x-hunter-episode-33', 'https://animekisa.tv/hunter-x-hunter-episode-34', 'https://animekisa.tv/hunter-x-hunter-episode-35', 'https://animekisa.tv/hunter-x-hunter-episode-36', 'https://animekisa.tv/hunter-x-hunter-episode-37', 'https://animekisa.tv/hunter-x-hunter-episode-38', 'https://animekisa.tv/hunter-x-hunter-episode-39', 'https://animekisa.tv/hunter-x-hunter-episode-40', 'https://animekisa.tv/hunter-x-hunter-episode-41', 'https://animekisa.tv/hunter-x-hunter-episode-42', 'https://animekisa.tv/hunter-x-hunter-episode-43', 'https://animekisa.tv/hunter-x-hunter-episode-44', 'https://animekisa.tv/hunter-x-hunter-episode-45', 'https://animekisa.tv/hunter-x-hunter-episode-46', 'https://animekisa.tv/hunter-x-hunter-episode-47', 'https://animekisa.tv/hunter-x-hunter-episode-48', 'https://animekisa.tv/hunter-x-hunter-episode-49', 'https://animekisa.tv/hunter-x-hunter-episode-50', 'https://animekisa.tv/hunter-x-hunter-episode-51', 'https://animekisa.tv/hunter-x-hunter-episode-52', 'https://animekisa.tv/hunter-x-hunter-episode-53', 'https://animekisa.tv/hunter-x-hunter-episode-54', 'https://animekisa.tv/hunter-x-hunter-episode-55', 'https://animekisa.tv/hunter-x-hunter-episode-56', 'https://animekisa.tv/hunter-x-hunter-episode-57', 'https://animekisa.tv/hunter-x-hunter-episode-58', 'https://animekisa.tv/hunter-x-hunter-episode-59', 'https://animekisa.tv/hunter-x-hunter-episode-60', 'https://animekisa.tv/hunter-x-hunter-episode-61', 'https://animekisa.tv/hunter-x-hunter-episode-62']                                                      
2020-08-22 14:01:28 arch anime_downloader.commands.dl[84260] INFO Found anime: Hunter X Hunter
2020-08-22 14:01:28 arch anime_downloader.commands.dl[84260] INFO Downloading to /home/bl
2020-08-22 14:01:28 arch anime_downloader.sites.anime[84260] DEBUG Extracting stream info of id: https://animekisa.tv/hunter-x-hunter-episode-1                                                                                             
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG -----
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG GET https://animekisa.tv/hunter-x-hunter-episode-1                                                                                                             
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG {}
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG {'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.9 Safari/536.5'}                                        
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG -----
2020-08-22 14:01:28 arch anime_downloader.session[84260] DEBUG cached request
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG https://animekisa.tv/hunter-x-hunter-episode-1                                                                                                                 
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG /tmp/animedlm6tlqktt/tmp8na8u6fg
2020-08-22 14:01:28 arch anime_downloader.sites.animekisa[84260] DEBUG Preferred server gcloud not found. Trying all supported servers                                                                                                      
2020-08-22 14:01:28 arch anime_downloader.sites.anime[84260] DEBUG Sources : [('mp4upload', 'https://www.mp4upload.com/embed-x50ng81bqkhy.html')]                                                                                           
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG -----
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG GET https://www.mp4upload.com/embed-x50ng81bqkhy.html                                                                                                          
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG {}
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG {'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.9 Safari/536.5'}                                        
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG -----
2020-08-22 14:01:28 arch anime_downloader.session[84260] DEBUG cached request
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG https://www.mp4upload.com/embed-x50ng81bqkhy.html                                                                                                              
2020-08-22 14:01:28 arch anime_downloader.sites.helpers.request[84260] DEBUG /tmp/animedlm6tlqktt/tmp6fycl4lg
internal/modules/cjs/loader.js:1033
  throw err;
  ^

Error: Cannot find module './lib/main'
Require stack:
- /home/bl/.local/lib/python3.8/site-packages/anime_downloader/node_modules/vm2/index.js
- /home/bl/[eval]
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
    at Function.Module._load (internal/modules/cjs/loader.js:899:27)
    at Module.require (internal/modules/cjs/loader.js:1090:19)
    at require (internal/modules/cjs/helpers.js:75:18)
    at Object.<anonymous> (/home/bl/.local/lib/python3.8/site-packages/anime_downloader/node_modules/vm2/index.js:3:18)
    at Module._compile (internal/modules/cjs/loader.js:1201:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
    at Module.load (internal/modules/cjs/loader.js:1050:32)
    at Function.Module._load (internal/modules/cjs/loader.js:938:14)
    at Module.require (internal/modules/cjs/loader.js:1090:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/bl/.local/lib/python3.8/site-packages/anime_downloader/node_modules/vm2/index.js',
    '/home/bl/[eval]'
  ]
}
Traceback (most recent call last):
  File "/home/bl/.local/bin/anime", line 8, in <module>
    sys.exit(main())
  File "/home/bl/.local/lib/python3.8/site-packages/anime_downloader/cli.py", line 53, in main
    cli()
  File "/home/bl/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/bl/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/bl/.local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/bl/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/bl/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/bl/.local/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/bl/.local/lib/python3.8/site-packages/anime_downloader/commands/dl.py", line 120, in command
    for episode in animes:
  File "/home/bl/.local/lib/python3.8/site-packages/anime_downloader/sites/anime.py", line 198, in __iter__
    yield episode_class(ep_id[1], parent=self, ep_no=ep_id[0])
  File "/home/bl/.local/lib/python3.8/site-packages/anime_downloader/sites/anime.py", line 293, in __init__
    try_data()
  File "/home/bl/.local/lib/python3.8/site-packages/anime_downloader/sites/anime.py", line 291, in try_data
    self.source().stream_url
  File "/home/bl/.local/lib/python3.8/site-packages/anime_downloader/extractors/base_extractor.py", line 29, in stream_url
    self.get_data()
  File "/home/bl/.local/lib/python3.8/site-packages/anime_downloader/extractors/base_extractor.py", line 41, in get_data
    data = self._get_data()
  File "/home/bl/.local/lib/python3.8/site-packages/anime_downloader/extractors/mp4upload.py", line 19, in _get_data
    script = util.deobfuscate_packed_js(script)
  File "/home/bl/.local/lib/python3.8/site-packages/anime_downloader/util.py", line 393, in deobfuscate_packed_js
    return eval_in_node('eval=console.log; ' + packedjs)
  File "/home/bl/.local/lib/python3.8/site-packages/anime_downloader/util.py", line 403, in eval_in_node
    output = subprocess.check_output(['node', '-e', sandboxedScript], env={'NODE_PATH': node_path})
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['node', '-e', "\n                    const {VM} = require('vm2');\n                    const js = Buffer.from('ZXZhbD1jb25zb2xlLmxvZzsgZXZhbChmdW5jdGlvbihwLGEsYyxrLGUsZCl7d2hpbGUoYy0tKWlmKGtbY10pcD1wLnJlcGxhY2UobmV3IFJlZ0V4cCgnXFxiJytjLnRvU3RyaW5nKGEpKydcXGInLCdnJyksa1tjXSk7cmV0dXJuIHB9KCduLjFxPXsxcDoiIixxOiJjIiwxbzoiMzovL3IuMi4xL2kvMW4vNi4xbSIsMWw6W3tiOiIzOi8vci4yLjE6MWsvZC8xai9jLnAiLHE6ImMvcCIsfV0sfTs5IG89bS4xaSgiMWgiKTtvLjFnPWwoKXtuLjFmKCk7ay4xZSgiMzovLzguMi4xLzYiKTsxZCAxY307JChtKS4xYihsKCl7MWEoJChrKS5hKCk8MTkpeyQoIiM1IikuNCgiYiIsIjM6Ly9qLjIuMS8xOC43Iik7JCgiIzUiKS40KCJoIiwiZyIpOyQoIiM1IikuNCgiYSIsIjE3Iil9MTZ7JCgiIzUiKS40KCJiIiwiMzovL2ouMi4xLzE1LjciKTskKCIjNSIpLjQoImgiLCJnIik7JCgiIzUiKS40KCJhIiwiMTQiKX19KTs5IDEzPSIzOi8vOC4yLjEvNiI7OSBmPVwnPGUgMTI9IjM6Ly84LjIuMS9mLTYuNyIgMTE9MCAxMD0wIHo9MCB5PXggdz12IHU9dCBzPjwvZT5cJzsnLDM2LDYzLCd8Y29tfG1wNHVwbG9hZHxodHRwc3xhdHRyfGFhMWZhNzkzfHg1MG5nODFicWtoeXxodG1sfHd3d3x2YXJ8d2lkdGh8c3JjfHZpZGVvfHxJRlJBTUV8ZW1iZWR8MjYwfGhlaWdodHx8Y2RufHdpbmRvd3xmdW5jdGlvbnxkb2N1bWVudHxwbGF5ZXJ8ZGx8bXA0fHR5cGV8d3d3NnxhbGxvd2Z1bGxzY3JlZW58MzYwfEhFSUdIVHw0OTR8V0lEVEh8Tk98U0NST0xMSU5HfE1BUkdJTkhFSUdIVHxNQVJHSU5XSURUSHxGUkFNRUJPUkRFUnxTUkN8bGlua3w2MjB8MmJifGVsc2V8MzEwfDFiYnw2NzB8aWZ8cmVhZHl8ZmFsc2V8cmV0dXJufG9wZW58cGF1c2V8b25jbGlja3xkb3dubG9hZHxnZXRFbGVtZW50QnlJZHxzZ3gzNmZxM3ozYjRxdXVvM293YWV6eXFqNXB5eXVoend2NzZncWJsd2VmbTRreTRrM2l0YWQydHwyODJ8c291cmNlc3xqcGd8MDEyMzl8cG9zdGVyfHRpdGxlfHNvdXJjZScuc3BsaXQoJ3wnKSkpCg==','base64').toString()\n                    console.log(new VM().run(js))\n                    "]' returned non-zero exit status 1.


@Blatzar Blatzar added the bug Something isn't working label Aug 22, 2020
@IguanasInPyjamas
Copy link
Contributor

Wow you still get different errors.. You don't seem to have the path one at all.

@Blatzar
Copy link
Collaborator Author

Blatzar commented Aug 22, 2020

@LiteracyFanatic any ideas how to solve this?

@LiteracyFanatic
Copy link
Contributor

Here's what I've got so far. Adding from os import path resolves the error you found. I'm not really sure why that's necessary; I'll have to do some reading. However, this still doesn't work properly because the value from the js is being returned incorrectly. Here's the raw js run through a formatter.

eval = console.log;
eval(
  (function (p, a, c, k, e, d) {
    while (c--)
      if (k[c])
        p = p.replace(new RegExp("\\b" + c.toString(a) + "\\b", "g"), k[c]);
    return p;
  })(
    'n.1q={1p:"",q:"c",1o:"3://r.2.1/i/1n/6.1m",1l:[{b:"3://r.2.1:1k/d/1j/c.p",q:"c/p",}],};9 o=m.1i("1h");o.1g=l(){n.1f();k.1e("3://8.2.1/6");1d 1c};$(m).1b(l(){1a($(k).a()<19){$("#5").4("b","3://j.2.1/18.7");$("#5").4("h","g");$("#5").4("a","17")}16{$("#5").4("b","3://j.2.1/15.7");$("#5").4("h","g");$("#5").4("a","14")}});9 13="3://8.2.1/6";9 f=\'<e 12="3://8.2.1/f-6.7" 11=0 10=0 z=0 y=x w=v u=t s></e>\';',
    36,
    63,
    "|com|mp4upload|https|attr|aa1fa793|x50ng81bqkhy|html|www|var|width|src|video||IFRAME|embed|260|height||cdn|window|function|document|player|dl|mp4|type|www6|allowfullscreen|360|HEIGHT|494|WIDTH|NO|SCROLLING|MARGINHEIGHT|MARGINWIDTH|FRAMEBORDER|SRC|link|620|2bb|else|310|1bb|670|if|ready|false|return|open|pause|onclick|download|getElementById|sgx36fq3z3b4quuo3owaezyqj5pyyuhzwv76gqblwefm4ky4kzzdvpy4|282|sources|jpg|01239|poster|title|source".split(
      "|"
    )
  )
);

Which can be rewritten like this:

let p = 'n.1q={1p:"",q:"c",1o:"3://r.2.1/i/1n/6.1m",1l:[{b:"3://r.2.1:1k/d/1j/c.p",q:"c/p",}],};9 o=m.1i("1h");o.1g=l(){n.1f();k.1e("3://8.2.1/6");1d 1c};$(m).1b(l(){1a($(k).a()<19){$("#5").4("b","3://j.2.1/18.7");$("#5").4("h","g");$("#5").4("a","17")}16{$("#5").4("b","3://j.2.1/15.7");$("#5").4("h","g");$("#5").4("a","14")}});9 13="3://8.2.1/6";9 f=\'<e 12="3://8.2.1/f-6.7" 11=0 10=0 z=0 y=x w=v u=t s></e>\';';
let a = 36;
let c = 63;
let k = "|com|mp4upload|https|attr|aa1fa793|x50ng81bqkhy|html|www|var|width|src|video||IFRAME|embed|260|height||cdn|window|function|document|player|dl|mp4|type|www6|allowfullscreen|360|HEIGHT|494|WIDTH|NO|SCROLLING|MARGINHEIGHT|MARGINWIDTH|FRAMEBORDER|SRC|link|620|2bb|else|310|1bb|670|if|ready|false|return|open|pause|onclick|download|getElementById|sgx36fq3z3b4quuo3owaezyqj5pyyuhzwv76gqblwefm4ky4kzzdvpy4|282|sources|jpg|01239|poster|title|source".split("|");

while (c--) {
    if (k[c]) {
        p = p.replace(new RegExp("\\b" + c.toString(a) + "\\b", "g"), k[c]);
    }
}

console.log(p);

And evaluates to this:

player.source = {
  title: "",
  type: "video",
  poster: "https://www6.mp4upload.com/i/01239/x50ng81bqkhy.jpg",
  sources: [
    {
      src:
        "https://www6.mp4upload.com:282/d/sgx36fq3z3b4quuo3owaezyqj5pyyuhzwv76gqblwefm4ky4kzzdvpy4/video.mp4",
      type: "video/mp4",
    },
  ],
};
var dl = document.getElementById("download");
dl.onclick = function () {
  player.pause();
  window.open("https://www.mp4upload.com/x50ng81bqkhy");
  return false;
};
$(document).ready(function () {
  if ($(window).width() < 670) {
    $("#aa1fa793").attr("src", "https://cdn.mp4upload.com/1bb.html");
    $("#aa1fa793").attr("height", "260");
    $("#aa1fa793").attr("width", "310");
  } else {
    $("#aa1fa793").attr("src", "https://cdn.mp4upload.com/2bb.html");
    $("#aa1fa793").attr("height", "260");
    $("#aa1fa793").attr("width", "620");
  }
});
var link = "https://www.mp4upload.com/x50ng81bqkhy";
var embed =
  '<IFRAME SRC="https://www.mp4upload.com/embed-x50ng81bqkhy.html" FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO WIDTH=494 HEIGHT=360 allowfullscreen></IFRAME>';

I believe there is an issue related to the use of console.log and eval that is keeping the actual value we want from being returned properly. I'll need to do a bit more digging to figure out for sure what's going on.

@LiteracyFanatic LiteracyFanatic linked a pull request Aug 23, 2020 that will close this issue
@LiteracyFanatic
Copy link
Contributor

I've added a preliminary fix. There's more work to be done to make sure all the other sites work as well, but this should be usable as is if you need it now.

@Blatzar Blatzar linked a pull request Aug 23, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants