News for hackers. Stuff that matters.
Re:JSFuck (2012) by hungryforcodes on Saturday September 25, 2021 @11:24PM (#28658155)
Why are you reverse engineering my code in the first place?
Re:JSFuck (2012) by TeMPOraL on Sunday September 26, 2021 @04:27AM (#28659300)
Because you gave it to me to run it. I want to know what is it exactly that I'm running.

Also, why do you mind me doing that?

Re:JSFuck (2012) by hungryforcodes on Sunday September 26, 2021 @04:57AM (#28659417)
No, I didn't give it to you to run. It's explained below if you read the whole thread.
Re:JSFuck (2012) by 8note on Saturday September 25, 2021 @11:53PM (#28658257)
Because it's broken for my usecase, and I need to do something slightly different on the webpage
Re:JSFuck (2012) by hungryforcodes on Sunday September 26, 2021 @12:05AM (#28658315)
You shouldn't have access to it -- it's on my private servers doing stuff for me. How did you get it?

I think the problem with this thread is people think I am writing browser code, or code that is going to be shared on GitHub.

I am not.

Also I'm only half joking as I've indicated with the "/s" below.

Re:JSFuck (2012) by lillesvin on Sunday September 26, 2021 @03:46AM (#28659150)
> You shouldn't have access to it -- it's on my private servers doing stuff for me. How did you get it?

Seems like the logical solution would be to restrict access to it then, rather than obfuscate it making it harder for yourself to maintain. But hey, you do you.

Re:JSFuck (2012) by hungryforcodes on Sunday September 26, 2021 @03:49AM (#28659161)
At the bottom of the thread I explain the intention is to protect against unauthorized access.

I also wouldn't obviously edit the obfuscated production code, so it wouldn't really be a problem.

Re:JSFuck (2012) by Dylan16807 on Sunday September 26, 2021 @01:20AM (#28658605)
> You shouldn't have access to it -- it's on my private servers doing stuff for me. How did you get it?

Well thanks for chiming in about a completely unrelated topic from website javascript. My comment wasn't getting downvoted until your slapfight with oauea blew up.

Re:JSFuck (2012) by hungryforcodes on Sunday September 26, 2021 @01:31AM (#28658649)
Specifically from the web page:

"It does not depend on a browser, so you can even run it on Node.js."

Re:JSFuck (2012) by howaboutnope on Sunday September 26, 2021 @01:42AM (#28658697)
That wasn't a top level question though, it was a question to a commenter saying "We wanted to obfuscate this bit of code, to make life just a little bit harder for reverse engineers." That you obfuscate code nobody other than you can even access is completely irrelevant as a reply to that question.
Re:JSFuck (2012) by hungryforcodes on Sunday September 26, 2021 @01:52AM (#28658732)
So then you should ignore the entire thread and move on. Why are you wasting time on this?
Re:JSFuck (2012) by oauea on Saturday September 25, 2021 @11:26PM (#28658161)
To figure out what it's doing, obviously.
Re:JSFuck (2012) by hungryforcodes on Saturday September 25, 2021 @11:42PM (#28658221)
Please STOP that.
Re:JSFuck (2012) by cybernautique on Saturday September 25, 2021 @11:47PM (#28658239)
I'll make you a promise: if your code never ends up on my machine, I will never try to reverse it.

Otherwise, all bets are off.

Re:JSFuck (2012) by squeaky-clean on Sunday September 26, 2021 @12:13AM (#28658345)
Don't request it then :p
Re:JSFuck (2012) by cybernautique on Sunday September 26, 2021 @12:18AM (#28658363)
If it's not part of any service that's marketed to me, I won't. However, if some vendor wants to run code on my machine, I _will_ be inspecting it.
Re:JSFuck (2012) by hungryforcodes on Saturday September 25, 2021 @11:53PM (#28658256)
Why would I put it on YOUR machine? It's my code. Don't hack my servers, or all bets are off. /s
Re:JSFuck (2012) by quickthrower2 on Sunday September 26, 2021 @12:09AM (#28658332)
JS is often (but not always) transmitted from the server to execute on the client machine
Re:JSFuck (2012) by hungryforcodes on Sunday September 26, 2021 @12:37AM (#28658432)
You've never heard of NodeJS?
Re:JSFuck (2012) by quickthrower2 on Sunday September 26, 2021 @01:24AM (#28658631)
(but not always) <~ this includes nodejs
Re:JSFuck (2012) by cybernautique on Sunday September 26, 2021 @12:09AM (#28658334)
Friend, I'd love to come to an agreement that your code won't end up on my machine. I'm buying beers when we get together.
Re:JSFuck (2012) by oauea on Sunday September 26, 2021 @12:01AM (#28658296)
No thanks. Anything you submit to run on my machine is fair play :-)
Re:JSFuck (2012) by hungryforcodes on Sunday September 26, 2021 @12:07AM (#28658324)
This code should never run on your machine. :P
Re:JSFuck (2012) by oauea on Sunday September 26, 2021 @12:21AM (#28658369)
Then why are you obfuscating it or even worried about people deobfuscating it? This thread is about Javascript.
Re:JSFuck (2012) by hungryforcodes on Sunday September 26, 2021 @12:33AM (#28658417)
Dude, I write financial applications in Node. Node IS javascript.

These applications run on the back end. Some of the API facing VMs have been attacked and so to be honest I've configured them so that if someone did get access to them, they wouldn't find much. Maybe just some API keys I can invalidate. Although I probably won't do it -- an obfuscator like this could be very handy here.

Re:JSFuck (2012) by Madeindjs on Sunday September 26, 2021 @09:51AM (#28660885)
Did you give a try of Deno. This is a JavaScript runtime but it produce a single binary. This would make sense in your case because it can be harder to inspect it.