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

Defeats "stupider" obfuscation but can't deal simple html tags? STUPID! LOL! #24

Open
lvto2000 opened this issue Aug 24, 2021 · 2 comments

Comments

@lvto2000
Copy link

So this is supposed to be "a little project to undo several of the horrible things JavaScript build tools will do to JavaScript. In addition to undoing most minification, it reverses some of the stupider but surprisingly common "obfuscation" techniques used in the wild."

EXAMPLE Command>>> unminify test.html

test.html FILE CONTENTS FOR LINE 1

<script nonce="lGnaSYjF7VBCDwtjmM+Jrg">

var ytcfg={d:function(){return window.yt&&yt.config_||ytcfg.data_||(ytcfg.data_={})},get:function(k,o){return k in ytcfg.d()?ytcfg.d()[k]:o},set:function(){var a=arguments;if(a.length>1)ytcfg.d()[a[0]]=a[1];else for(var k in a[0])ytcfg.d
()[k]=a[0][k]}};

RESULTS:
/usr/local/lib/node_modules/unminify/node_modules/shift-parser/dist/parser.js:1831
throw this.createUnexpected(this.lookahead);
^
Error: [1:1]: Unexpected token "<"

LOL! So if I throw js into an html file with embedded scripts, then I defeat your neat app for finding "stupider" and "surprisingly common" obfuscation techniques?!!! Now that is more "stupider" than "stupider" so I CALL BS! If your program relies on a perfectly written JS file vs. the many more simplistic ways of obfuscating js code like just doing something stupid like putting it in the html vs. a js script, then it is utterly useless to anyone.

Before you go there and say that I should have converted my code to a clean JS file vs. where it lives, have a look at this website. They do it cleanly and without fail for both html and js. https://unminify.com/

This program is precisely the reason why I say free open source is not really free. We end up spending hours of our valuable time figuring out why buggy code does not work the way it is intended and pulling our hair out trying to read awful documentation with cryptic messages only the mother or father of these ugly babies could love.

@huglovefan
Copy link

@lvto2000
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants