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

[Site-Support-Request] openload.co / openload.io #8489

Closed
Delivator opened this issue Feb 9, 2016 · 31 comments
Closed

[Site-Support-Request] openload.co / openload.io #8489

Delivator opened this issue Feb 9, 2016 · 31 comments
Labels
site-support-request Add extractor(s) for a new domain

Comments

@Delivator
Copy link

Main Site:
https://openload.co
https://openload.io

Examples:

Site:
https://openload.co/f/kUEfGclsU9o or
https://openload.co/f/kUEfGclsU9o/skyrim_no-audio_1080.mp4
When i hit the "Download" Button ->
https://1fgm8g5.oloadcdn.net/dl/l/L-cXcAg4l1I/kUEfGclsU9o/skyrim_no-audio_1080.mp4
[Edit] It looks like it's only for my IP or something.

Embedded:
https://openload.co/embed/kUEfGclsU9o/ or
https://openload.co/embed/kUEfGclsU9o/skyrim_no-audio_1080.mp4

Raw:
https://openload.co/stream/kUEfGclsU9o~1455150454~2a02:908::~kUlsCIZZ?mime=true
When you open it ->
https://1fgm8g5.oloadcdn.net/dl/l/46qaqObFdNY/kUEfGclsU9o/skyrim_no-audio_1080.mp4?mime=true

Thumbnail:
https://thumb.openload.co/splash/kUEfGclsU9o/ePl2KfL6O2E.jpg

In some cases i have an openload.io/embed/VIDEO_ID url, but when i change the embed to f (which should me give the video page) it don't work!

I hope you can add it! ♥

@phihag
Copy link
Contributor

phihag commented Feb 10, 2016

Judging by the URLs alone, this page seems to specialize in infringing copyright. See our FAQ for more details.

@phihag phihag closed this as completed Feb 10, 2016
@Delivator
Copy link
Author

I'ts not (as far as i know), maby in this case, but it's only an example.
Copyright Videos/Films will be deleted.

It's similar to streamcloud.eu which is also supported.

@phihag
Copy link
Contributor

phihag commented Feb 10, 2016

Alright, then please provide an example URL that does not infringe copyright and we will reopen this issue.

@Delivator
Copy link
Author

So should i upload a video by myself? Is that okay?

@phihag
Copy link
Contributor

phihag commented Feb 10, 2016

Just pick any video - uploaded by you or anyone else.

@Delivator
Copy link
Author

All links are updated!

@yan12125
Copy link
Collaborator

Javascript at openload.co also uses eval() but is much complicated than Vidzi, VideoMega or iQiyi. I guess either rewriting jsinterp.py or using external libraries is inevitable.

@Hrxn
Copy link

Hrxn commented Feb 29, 2016

I just looked at the source of a video there, that is some nasty looking Javascript, holy mother of god..

I mean, where do you even start, honestly?

@yan12125
Copy link
Collaborator

Take https://openload.co/f/kUEfGclsU9o for example. There's a <script> in <video> tag:

゚ω゚ノ= /`m´)ノ ~┻━┻   //*´∇`*/ ['_']; o=(゚ー゚)  =_=3; c=(゚Θ゚) =(゚ー゚)-(゚ー゚); (゚Д゚) =(゚Θ゚)= (o^_^o)/ (o^_^o);(゚Д゚)={゚Θ゚: '_' ,゚ω゚ノ : ((゚ω゚ノ==3) +'_') [゚Θ゚] ,゚ー゚ノ :(゚ω゚ノ+ '_')[o^_^o -(゚Θ゚)] ,゚Д゚ノ:((゚ー゚==3) +'_')[゚ー゚] }; (゚Д゚) [゚Θ゚] =((゚ω゚ノ==3) +'_') [c^_^o];(゚Д゚) ['c'] = ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ];(゚Д゚) ['o'] = ((゚Д゚)+'_') [゚Θ゚];(゚o゚)=(゚Д゚) ['c']+(゚Д゚) ['o']+(゚ω゚ノ +'_')[゚Θ゚]+ ((゚ω゚ノ==3) +'_') [゚ー゚] + ((゚Д゚) +'_') [(゚ー゚)+(゚ー゚)]+ ((゚ー゚==3) +'_') [゚Θ゚]+((゚ー゚==3) +'_') [(゚ー゚) - (゚Θ゚)]+(゚Д゚) ['c']+((゚Д゚)+'_') [(゚ー゚)+(゚ー゚)]+ (゚Д゚) ['o']+((゚ー゚==3) +'_') [゚Θ゚];(゚Д゚) ['_'] =(o^_^o) [゚o゚] [゚o゚];(゚ε゚)=((゚ー゚==3) +'_') [゚Θ゚]+ (゚Д゚) .゚Д゚ノ+((゚Д゚)+'_') [(゚ー゚) + (゚ー゚)]+((゚ー゚==3) +'_') [o^_^o -゚Θ゚]+((゚ー゚==3) +'_') [゚Θ゚]+ (゚ω゚ノ +'_') [゚Θ゚]; (゚ー゚)+=(゚Θ゚); (゚Д゚)[゚ε゚]='\\'; (゚Д゚).゚Θ゚ノ=(゚Д゚+ ゚ー゚)[o^_^o -(゚Θ゚)];(o゚ー゚o)=(゚ω゚ノ +'_')[c^_^o];(゚Д゚) [゚o゚]='\"';(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+(゚Д゚)[゚o゚]+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (+!+[])+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (+!+[])+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((c^_^o)+(c^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (o^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~1)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ (!+[]+!+[])+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((c^_^o)+(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((c^_^o)+(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ (!+[]+!+[])+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (o^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~1)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~1)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (-~-~1)+ (゚Д゚)[゚o゚]) (゚Θ゚)) ('_');

Paste this scripts to a file tmp.js and run it:

node tmp.js

You'll get some errors, while the video link is in the error message:

$ node tmp.js 
undefined:2
window.vr='https://1fgm8g5.oloadcdn.net/dl/l/LespohJ7Azk/kUEfGclsU9o/skyrim_no-audio_1080.mp4?mime=true';window.vt='video/mp4' ;
^

ReferenceError: window is not defined
    at eval (eval at <anonymous> (/home/yen/tmp.js:2:857), <anonymous>:2:1)
    at Object.<anonymous> (/home/yen/tmp.js:2:8010)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)
    at startup (node.js:141:18)
    at node.js:933:3

Things are changed since 3 days ago. I guess this approach won't be valid for a long time.

@Hrxn
Copy link

Hrxn commented Feb 29, 2016

What kind of black magic is this? ;-)

@yan12125
Copy link
Collaborator

Some luck :D

@noromanba
Copy link

FYI @yan12125
That script section obfuscated w/ aaencode (by @hasegawayosuke)
You can decode online w/ aadecode (by @cat-in-136)

゚ω゚ノ= /´ ~   //*´∇`*/ ['_']; o=(゚ー゚)  =_=3; c=(゚Θ゚) =(゚ー゚)-(゚ー゚); (゚Д゚) =(゚Θ゚)= (o^_^o)/ (o^_^o);(゚Д゚)={゚Θ゚: '_' ,゚ω゚ノ : ((゚ω゚ノ==3) +'_') [゚Θ゚] ,゚ー゚ノ :(゚ω゚ノ+ '_')[o^_^o -(゚Θ゚)] ,゚Д゚ノ:((゚ー゚==3) +'_')[゚ー゚] }; (゚Д゚) [゚Θ゚] =((゚ω゚ノ==3) +'_') [c^_^o];(゚Д゚) ['c'] = ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ];(゚Д゚) ['o'] = ((゚Д゚)+'_') [゚Θ゚];(゚o゚)=(゚Д゚) ['c']+(゚Д゚) ['o']+(゚ω゚ノ +'_')[゚Θ゚]+ ((゚ω゚ノ==3) +'_') [゚ー゚] + ((゚Д゚) +'_') [(゚ー゚)+(゚ー゚)]+ ((゚ー゚==3) +'_') [゚Θ゚]+((゚ー゚==3) +'_') [(゚ー゚) - (゚Θ゚)]+(゚Д゚) ['c']+((゚Д゚)+'_') [(゚ー゚)+(゚ー゚)]+ (゚Д゚) ['o']+((゚ー゚==3) +'_') [゚Θ゚];(゚Д゚) ['_'] =(o^_^o) [゚o゚] [゚o゚];(゚ε゚)=((゚ー゚==3) +'_') [゚Θ゚]+ (゚Д゚) .゚Д゚ノ+((゚Д゚)+'_') [(゚ー゚) + (゚ー゚)]+((゚ー゚==3) +'_') [o^_^o -゚Θ゚]+((゚ー゚==3) +'_') [゚Θ゚]+ (゚ω゚ノ +'_') [゚Θ゚]; (゚ー゚)+=(゚Θ゚); (゚Д゚)[゚ε゚]='\\'; (゚Д゚).゚Θ゚ノ=(゚Д゚+ ゚ー゚)[o^_^o -(゚Θ゚)];(o゚ー゚o)=(゚ω゚ノ +'_')[c^_^o];(゚Д゚) [゚o゚]='\"';(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+(゚Д゚)[゚o゚]+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (+!+[])+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (+!+[])+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((c^_^o)+(c^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (o^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~1)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ (!+[]+!+[])+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((c^_^o)+(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((c^_^o)+(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ (!+[]+!+[])+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (o^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~1)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~1)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (-~-~1)+ (゚Д゚)[゚o゚]) (゚Θ゚)) ('_');

so decoded below;

$('#realdl a').attr("href", 'https://1fgm8g5.oloadcdn.net/dl/l/X0LcwitFo3U/kUEfGclsU9o/skyrim_no-audio_1080.mp4');

offline decoder e.g.

AADecode

aadecode.py

but unknown license both.

openload uses some obfuscators other section ... :-/

@cat-in-136
Copy link

I've clearfied the license of my aadecode program. Thanks.

But I think that it is difficult to use aadecode code. Because aadecode is written in JavaScript and uses eval() but youtube-dl is written in Python.

@Hrxn
Copy link

Hrxn commented Mar 1, 2016

Okay, code obfuscation is not exactly brand new, obviously.

But what really surprised me here is the fact you only used Node. Did not see that coming.
Why is it that Node can handle this obfuscation? Genuinely curious here.

The aadecode.py linked above, part of this XBMC/Kodi Addon is indeed used for Openload:
openload.py apparently uses AADecoder and JJDecoder together with and unpacker for Dean Edward's p.a.c.k.e.r, so, depending on how you count, 2-3 obfuscators so far. The question now is if that is really everything used by the site ;-)

This project has no license information (yet), so I just opened an issue there to clear that up.

Regarding the use of this aadecode written in Javascript or other external libraries or programs or whatever, I don't think that is really a problem. Right now, youtube-dl already has one external dependency which is basically essential: FFmpeg.

But that is easy to use, available on all platforms, and distributed as a single, simple static binary.
Turns out, we could use Node in the same way:

https://nodejs.org/en/download/

Binaries for all platforms ;-)

@yan12125
Copy link
Collaborator

yan12125 commented Mar 1, 2016

Since deobfuscation is possible with pure Python, it's better to do that with pure Python.


Node usage for Openload ends here. Here's some of my tries on Node. May benefit other sites:

  • My WIP youtube_dl/extractor/openload.py:
from __future__ import unicode_literals

from .common import InfoExtractor
from ..compat import subprocess_check_output


RUNNER_JS = '''
    // Simplified from the example on https://nodejs.org/api/vm.html
    var vm = require('vm'), fs = require('fs');

    var sandbox = {
        window: {},
    };

    (new vm.Script(fs.readFileSync('tmp2.js'))).runInNewContext(sandbox);

    console.log(sandbox.window.vr);
'''


class OpenloadIE(InfoExtractor):
    _VALID_URL = r'https://openload.co/f/(?P<id>[a-zA-Z0-9]+)'

    _TEST = {
        'url': 'https://openload.co/f/kUEfGclsU9o',
        'md5': 'bf1c059b004ebc7a256f89408e65c36e',
        'info_dict': {
            'id': 'kUEfGclsU9o',
            'ext': 'mp4',
            'title': 'skyrim_no-audio_1080.mp4',
        },
    }

    def _real_extract(self, url):
        video_id = self._match_id(url)
        webpage = self._download_webpage(url, video_id)
        code = self._search_regex(
            r'<video[^>]+>\s*<script[^>]+>([^<]+)</script>',
            webpage, 'JS code')

        with open('tmp2.js', 'wb') as f:
            f.write(code.encode('utf-8'))

        result = subprocess_check_output(['node', '-e', RUNNER_JS])
        return {
            'id': video_id,
            'title': self._og_search_title(webpage),
            'url': result.decode('utf-8').strip(),
        }
  • Notes for the snippet above:
    • Writing temporary files is bad
    • According to https://nodejs.org/api/vm.html, running untrusted codes in vm with a is safe, and I didn't find hacks breaking this assumption

Why is it that Node can handle this obfuscation?

I guess the obfuscated code is equivalent to:

eval("window.vr='https://1fgm8g5.oloadcdn.net/dl/l/LespohJ7Azk/kUEfGclsU9o/skyrim_no-audio_1080.mp4?mime=true';window.vt='video/mp4' ;");

@vitstradal
Copy link

Use eval() for string from the wild can be dangerous. Deobfuscation aaencode() can by done in pure python:

#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
def aadecode(txt):
  b = [ "(c^_^o)",
        "(゚Θ゚)",
        "((o^_^o) - (゚Θ゚))",
        "(o^_^o)",
        "(゚ー゚)",
        "((゚ー゚) + (゚Θ゚))",
        "((o^_^o) +(o^_^o))",
        "((゚ー゚) + (o^_^o))",
        "((゚ー゚) + (゚ー゚))",
        "((゚ー゚) + (゚ー゚) + (゚Θ゚))",
        "(゚Д゚) .゚ω゚ノ",
        "(゚Д゚) .゚Θ゚ノ",
        "(゚Д゚) ['c']",
        "(゚Д゚) .゚ー゚ノ",
        "(゚Д゚) .゚Д゚ノ",
        "(゚Д゚) [゚Θ゚]"
        ];
  delim   = "(゚Д゚)[゚ε゚]+"
  hexpref = "(o゚ー゚o)"

  ret =''
  for aachar in txt.split(delim):
    for i in (2, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 1, 0):
      aachar = aachar.replace(b[i], format(i, 'x'))
    aachar = aachar.replace('+ ', '')
    if aachar.find(hexpref) == 0:
      m = re.search(r'[a-f\d]+', aachar)
      if m:
        ret += unichr(int(m.group(0), 16))
    else:
      m = re.match(r'^\d+', aachar)
      if m:
        ret += chr(int(m.group(0), 8))
  return ret

@yan12125
Copy link
Collaborator

yan12125 commented Mar 6, 2016

@vitstradal It would be great if youtube-dl can exploit this aadecode. Here's one thing I'd like to confirm: is this function written by you? If so, please add a declaration that you grant youtube-dl to use this function. If not, either the original author declares this snippet with a UNLICENSE compatible statement, for example Public Domain, or you have to ask the original author for explicit permissions for use in youtube-dl.

@vitstradal
Copy link

Public domain it is. Yes, I wrote it by my bare hands! To be exact I borrow array b from be http://utf-8.jp/public/aaencode.html. To be sure they not sue you, rename it :-)

@yan12125
Copy link
Collaborator

yan12125 commented Mar 6, 2016

I've tried the obfuscated code mentioned above:

$ python2 aadecode.py test/testdata/aaencoded_js.txt
゚ω゚ノ= /`m´)ノ ~┻━┻   //*´∇`*/ ['_']; o=(゚ー゚)  =_=3; c=(゚Θ゚) =(゚ー゚)-(゚ー゚); (゚Д゚) =(゚Θ゚)= (o^_^o)/ (o^_^o);(゚Д゚)={゚Θ゚: '_' ,゚ω゚ノ : ((゚ω゚ノ==3) +'_') [゚Θ゚] ,゚ー゚ノ :(゚ω゚ノ+ '_')[o^_^o -(゚Θ゚)] ,゚Д゚ノ:((゚ー゚==3) +'_')[゚ー゚] }; (゚Д゚) [゚Θ゚] =((゚ω゚ノ==3) +'_') [c^_^o];(゚Д゚) ['c'] = ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ];(゚Д゚) ['o'] = ((゚Д゚)+'_') [゚Θ゚];(゚o゚)=(゚Д゚) ['c']+(゚Д゚) ['o']+(゚ω゚ノ +'_')[゚Θ゚]+ ((゚ω゚ノ==3) +'_') [゚ー゚] + ((゚Д゚) +'_') [(゚ー゚)+(゚ー゚)]+ ((゚ー゚==3) +'_') [゚Θ゚]+((゚ー゚==3) +'_') [(゚ー゚) - (゚Θ゚)]+(゚Д゚) ['c']+((゚Д゚)+'_') [(゚ー゚)+(゚ー゚)]+ (゚Д゚) ['o']+((゚ー゚==3) +'_') [゚Θ゚];(゚Д゚) ['_'] =(o^_^o) [゚o゚] [゚o゚];(゚ε゚)=((゚ー゚==3) +'_') [゚Θ゚]+ (゚Д゚) .゚Д゚ノ+((゚Д゚)+'_') [(゚ー゚) + (゚ー゚)]+((゚ー゚==3) +'_') [o^_^o -゚Θ゚]+((゚ー゚==3) +'_') [゚Θ゚]+ (゚ω゚ノ +'_') [゚Θ゚]; (゚ー゚)+=(゚Θ゚); (゚Д゚)[゚ε゚]='\\'; (゚Д゚).゚Θ゚ノ=(゚Д゚+ ゚ー゚)[o^_^o -(゚Θ゚)];(o゚ー゚o)=(゚ω゚ノ +'_')[c^_^o];(゚Д゚) [゚o゚]='\"';(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+(゚Д゚)[゚o゚]+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (+!+[])+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (+!+[])+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((c^_^o)+(c^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (o^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~1)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ (!+[]+!+[])+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((c^_^o)+(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((c^_^o)+(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ (!+[]+!+[])+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (o^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~1)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~1)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (-~-~1)+ (゚Д゚)[゚o゚]) (゚Θ゚)) ('_');


Traceback (most recent call last):
  File "aadecode.py", line 44, in <module>
    print(aadecode(code))
  File "aadecode.py", line 28, in aadecode
    for aachar in txt.split(delim):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 1: ordinal not in range(128)

$ python3 aadecode.py test/testdata/aaencoded_js.txt
゚ω゚ノ= /`m´)ノ ~┻━┻   //*´∇`*/ ['_']; o=(゚ー゚)  =_=3; c=(゚Θ゚) =(゚ー゚)-(゚ー゚); (゚Д゚) =(゚Θ゚)= (o^_^o)/ (o^_^o);(゚Д゚)={゚Θ゚: '_' ,゚ω゚ノ : ((゚ω゚ノ==3) +'_') [゚Θ゚] ,゚ー゚ノ :(゚ω゚ノ+ '_')[o^_^o -(゚Θ゚)] ,゚Д゚ノ:((゚ー゚==3) +'_')[゚ー゚] }; (゚Д゚) [゚Θ゚] =((゚ω゚ノ==3) +'_') [c^_^o];(゚Д゚) ['c'] = ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ];(゚Д゚) ['o'] = ((゚Д゚)+'_') [゚Θ゚];(゚o゚)=(゚Д゚) ['c']+(゚Д゚) ['o']+(゚ω゚ノ +'_')[゚Θ゚]+ ((゚ω゚ノ==3) +'_') [゚ー゚] + ((゚Д゚) +'_') [(゚ー゚)+(゚ー゚)]+ ((゚ー゚==3) +'_') [゚Θ゚]+((゚ー゚==3) +'_') [(゚ー゚) - (゚Θ゚)]+(゚Д゚) ['c']+((゚Д゚)+'_') [(゚ー゚)+(゚ー゚)]+ (゚Д゚) ['o']+((゚ー゚==3) +'_') [゚Θ゚];(゚Д゚) ['_'] =(o^_^o) [゚o゚] [゚o゚];(゚ε゚)=((゚ー゚==3) +'_') [゚Θ゚]+ (゚Д゚) .゚Д゚ノ+((゚Д゚)+'_') [(゚ー゚) + (゚ー゚)]+((゚ー゚==3) +'_') [o^_^o -゚Θ゚]+((゚ー゚==3) +'_') [゚Θ゚]+ (゚ω゚ノ +'_') [゚Θ゚]; (゚ー゚)+=(゚Θ゚); (゚Д゚)[゚ε゚]='\\'; (゚Д゚).゚Θ゚ノ=(゚Д゚+ ゚ー゚)[o^_^o -(゚Θ゚)];(o゚ー゚o)=(゚ω゚ノ +'_')[c^_^o];(゚Д゚) [゚o゚]='\"';(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+(゚Д゚)[゚o゚]+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (+!+[])+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (+!+[])+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((c^_^o)+(c^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (o^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~1)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ (!+[]+!+[])+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((c^_^o)+(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((c^_^o)+(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ (!+[]+!+[])+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (o^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~1)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~1)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (+!+[])+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (!+[]+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (-~-~1)+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((o^_^o) +(o^_^o) +(c^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ (+!+[])+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(+!+[])+ (-~-~(!+[]+!+[]))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(+!+[])+ ((o^_^o) +(o^_^o) +(c^_^o))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((o^_^o) +(o^_^o) +(c^_^o))+ (-~-~(!+[]+!+[]))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(-~-~(!+[]+!+[]))+ ((c^_^o)+(c^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (-~-~1)+ (゚Д゚)[゚o゚]) (゚Θ゚)) ('_');


=///////-?==/

Am I missing something?

@vitstradal
Copy link

Sorry, I was misled by noromanba's comment. My aadecode() is reverse to http://utf-8.jp/public/aaencode.html, which looks similar (and probably based on), but not the same as obfuscation used in openload.

@vitstradal
Copy link

Second try:

#!/usr/bin/python
# -*- coding: utf-8 -*-
# autor: [email protected]
# licence: public domain
import re
import sys
def aadecode(txt):
  c = [
        ('7', '((゚ー゚) + (o^_^o))'),
        ('6', '((o^_^o) +(o^_^o) +(c^_^o))'),
        ('5', '((゚ー゚) + (゚Θ゚))'),
        ('4', '(-~-~(!+[]+!+[]))'),
        ('3', '(-~-~1)'),
        ('2', '(!+[]+!+[])'),
        ('1', '(+!+[])'),
        ('0', '((c^_^o)+(c^_^o))'),
  ]
  delim   = "(゚Д゚)[゚ε゚]+"

  ret =''
  for aachar in txt.split(delim):
    for i in range(len(c)):
      val,pat = c[i]
      aachar = aachar.replace(pat, val)
    aachar = aachar.replace('+ ', '')
    #print aachar
    m = re.match(r'^\d+', aachar)
    if m:
      ret += chr(int(m.group(0), 8))
  return ret

s = sys.stdin.read()
print aadecode(s)

@kasper93
Copy link
Contributor

kasper93 commented Mar 7, 2016

FYI here is working plugin for openload for kodi. https://github.com/Zanzibar82/plugin.video.streamondemand/blob/master/servers/openload.py

@yan12125
Copy link
Collaborator

Many thanks to @vitstradal for the hard work on working for Openload Javascript deobfuscation. A quick try 4 days ago works for me. However, openload has improved its technique as well. We may need to reconsider use external Javascript interpreter like node. Though I'm not sure whether it's acceptable by other developers or not.

@vitstradal
Copy link

No big deal, they have only small imagination:

#!/usr/bin/python
# -*- coding: utf-8 -*-
# autor: [email protected]
# licence: public domain

import re
import sys

# no `itoa` in python, really?
# itoa stolen from: http://www.codecodex.com/wiki/Base_conversion
# We have to write our own function for outputting to string with arbitrary base
def itoa(num, radix):
  result = ""
  while num > 0:
    result = "0123456789abcdefghijklmnopqrstuvwxyz"[num % radix] + result
    num /= radix
  return result

def openload_level2_debase(m):
  radix, num = int(m.group(1)) + 27 , int(m.group(2))
  return '"' + itoa(num, radix) + '"'

def openload_level2(txt):
  return re.sub(r'\((\d+),(\d+)\)', openload_level2_debase, txt).replace('"+"', '')

def openload_decode(txt):
  c = [
        ('7', '((゚ー゚) + (o^_^o))'),
        ('6', '((o^_^o) +(o^_^o) +(c^_^o))'),
        ('5', '((゚ー゚) + (゚Θ゚))'),
        ('4', '(-~3)'),
        ('3', '(-~-~1)'),
        ('2', '(-~1)'),
        ('1', '(-~0)'),
        ('0', '((c^_^o)-(c^_^o))'),
  ]
  delim = "(゚Д゚)[゚ε゚]+"
  ret   = ''
  for aachar in txt.split(delim):
    for i in range(len(c)):
      val,pat = c[i]
      aachar = aachar.replace(pat, val)
    aachar = aachar.replace('+ ', '')
    m = re.match(r'^\d+', aachar)
    if m:
      ret += chr(int(m.group(0), 8))
  return openload_level2(ret)

s = sys.stdin.read()
print openload_decode(s)

@yan12125
Copy link
Collaborator

Thanks for the fix. Here's a minor issue. Your decode function gives:

window.vs=(function(){function (a,b){return b.toString(a+27)}return (3,14579878)+"://"+(3,1230068)+(3,485)+"."+(3,20028913)+(3,11213)+"."+(3,21149)+"/"+(3,411)+"/"+(3,21)+"/HJ"+(3,23)+"GQB"+"0"+"J"+(3,22)+"HE/"+(3,20)+"UE"+(3,15)+"G"+(3,11458)+"U"+(3,294)+"/"+(9,48007422)+(3,22)+"_"+(3,714)+"-"+(9,18213360)+"_"+(3,27240)+"."+(3,20554)+"?"+(3,610874)+"="+(9,1389110)}());window.vt='video/mp4' ;

While node.js gives:

window.vs=(function(){function ǃ(a,b){return b.toString(a+27)}return ǃ(3,14579878)+"://"+ǃ(3,1230068)+ǃ(3,485)+"."+ǃ(3,20028913)+ǃ(3,11213)+"."+ǃ(3,21149)+"/"+ǃ(3,411)+"/"+ǃ(3,21)+"/HJ"+ǃ(3,23)+"GQB"+"0"+"J"+ǃ(3,22)+"HE/"+ǃ(3,20)+"UE"+ǃ(3,15)+"G"+ǃ(3,11458)+"U"+ǃ(3,294)+"/"+ǃ(9,48007422)+ǃ(3,22)+"_"+ǃ(3,714)+"-"+ǃ(9,18213360)+"_"+ǃ(3,27240)+"."+ǃ(3,20554)+"?"+ǃ(3,610874)+"="+ǃ(9,1389110)}());window.vt='video/mp4' ;

The function name ǃ is missing. In this case information extraction is not affected, while I guess preserve valid Javascripts is a good idea.

@vitstradal
Copy link

Ok, little improvement:
openloaddecode.py
But I don't know how they encode numbers 9 and 8, since they are used only to encode unicode characters, and only unicode character is \u01c3 (== 'ǃ').

yan12125 pushed a commit that referenced this issue Mar 20, 2016
* Add thumbnail
* Detect errors (#6469)
* Match more (#6469, #8489)
@yan12125
Copy link
Collaborator

Thanks to @vitstradal openload.co/openload.io will be supported in the next version.

@vitstradal Would you like to be listed in AUTHORS? If so, under what name?

@vitstradal
Copy link

@yan12125: I'll be honored. But I thing they change it little bit in month or so. My name is Viťas Strádal.

yan12125 pushed a commit that referenced this issue Mar 20, 2016
@yan12125
Copy link
Collaborator

Done in 7caae12.

But I thing they change it little bit in month or so.

It's OK as youtube-dl has a rapid release schedule.

@knife-s
Copy link

knife-s commented Apr 1, 2016

Is it working?

@yan12125
Copy link
Collaborator

yan12125 commented Apr 1, 2016

@d4rkuzs It's still working. Please open a new issue if you have problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-support-request Add extractor(s) for a new domain
Projects
None yet
Development

No branches or pull requests

10 participants