473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Javascript Obfuscators

I want encrypt javascript code in web page, however, browser need fully
recognize it.. There any many Javascript Obfuscators in the Net. Is
there some good and handy utility(or script) among them that can be
recommended?(freeware)

Apr 4 '06 #1
20 2125

ko****@hotmail.com wrote:
I want encrypt javascript code in web page, however, browser need fully
recognize it..
AFAIK, encryption (if that is what you mean) is not realistically
possible client side. After all the client needs the key as well to be
able to decrypt and run the code.

Obfuscators are different to encryption. Obfuscators do not encrypt,
they just make it harder to read.
There any many Javascript Obfuscators in the Net. Is
there some good and handy utility(or script) among them that can be
recommended?(freeware)


If you just search this newsgroup on the word "obfuscator", you will
find that plenty of people have asked this, and received plenty of
answers.

Also search under terms relating to compression or minimising the size
of JavaScript files.

You will find that obfuscators tend to be frowned upon, although
opinion does vary (as is the way with opinion). One common reason is
that if the script is that valuable, it is better to keep it on the
server.

If optimisation of file size is your aim, then you could look at
<URL:http://dean.edwards.name/packer/>

Regards

Julian Turner

Apr 4 '06 #2

Julian Turner писал(а):
ko****@hotmail.com wrote:
I want encrypt javascript code in web page, however, browser need fully
recognize it..
AFAIK, encryption (if that is what you mean) is not realistically
possible client side. After all the client needs the key as well to be
able to decrypt and run the code.

Obfuscators are different to encryption. Obfuscators do not encrypt,
they just make it harder to read.
There any many Javascript Obfuscators in the Net. Is
there some good and handy utility(or script) among them that can be
recommended?(freeware)


If you just search this newsgroup on the word "obfuscator", you will
find that plenty of people have asked this, and received plenty of
answers.

Also search under terms relating to compression or minimising the size
of JavaScript files.

You will find that obfuscators tend to be frowned upon, although
opinion does vary (as is the way with opinion). One common reason is
that if the script is that valuable, it is better to keep it on the
server.

If optimisation of file size is your aim, then you could look at
<URL:http://dean.edwards.name/packer/>

Regards

Julian Turner


----------
No, the purpose if obfuscate code(just make it harder to read), not
size optimisation.
AFAIK, encryption (if that is what you mean) is not realistically
possible client side. After all the client needs the key as well to be
able to decrypt and run the code.


There is a obfuscator that can encrypt and decrypt:
http://javascript.about.com/library/blenc.htm

Thanks.

Apr 4 '06 #3

ko****@hotmail.com wrote:

[snip]
There is a obfuscator that can encrypt and decrypt:
http://javascript.about.com/library/blenc.htm

Thanks.


[/snip]

Hmm, but I would think twice before using is. The following are quotes
from that page:-

<quote>Actually, the encryption of a page makes no difference at all to
how easily it can be stolen by knowledgeable thieves who can easily
bypass the encryption in seconds using nothing more than a web
browser</quote>

<quote>Please note that any web pages encrypted using this script (or
any encryption program that you purchase) can be easily decrypted in
under 30 seconds by anyone who knows how so don't blame us if
encrypting your page encourages its theft rather than stopping
it.</quote>

Regards

Julian Turner

Apr 4 '06 #4
"Julian Turner" <ju****@baconbutty.com> writes:
Hmm, but I would think twice before using is. The following are quotes
from that page:-

[protection can be broken]

That's actually refreshing honesty from someone making an obfuscator.
If I needed on (and I can't imagine for what), it would be one that
I would consider.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Apr 4 '06 #5
I purchased Jasob 1.8 from http://www.jasob.com and it works
excellently. It removes the comments and spaces and substitutes
letters for variables and function names. Since I write engineering
programs that have many long winded variable and function names to make
it easier to program, the obfuscation does an excellent job in reducing
size and making the program virtually unreadable. While many may be
able to extract the code, few will be able to determine what the heck
is going on with all the variable substitutions and no comments. It is
hard enough for me to write the code with the comments and long
variable names.

Apr 4 '06 #6

Lasse Reichstein Nielsen wrote:
That's actually refreshing honesty from someone making an obfuscator.
If I needed on (and I can't imagine for what), it would be one that
I would consider.


Thats true enough. Didn't mean to criticise the author as such. I
have come accross the author - Felgall, I think - in the
Webdeveloper.com forums, and (not that I have any right to judge) he
seemed very geniune.

Regards

Julian Turner

Apr 4 '06 #7
> Lasse Reichstein Nielsen wrote:
That's actually refreshing honesty from someone making an obfuscator.
If I needed on (and I can't imagine for what), it would be one that
I would consider.


Thats true enough. Didn't mean to criticise the author as such. I
have come accross the author - Felgall, I think - in the
Webdeveloper.com forums, and (not that I have any right to judge) he
seemed very geniune.

Regards

Julian Turner

-------
I tried few online javascript obfuscators, all of them generate fully
'garbage' obfuscated code, but no any javascripts work anymore..
Browser not recognize it..

Apr 4 '06 #8
el*********@electrician.com said the following on 4/4/2006 12:56 PM:
I purchased Jasob 1.8 from http://www.jasob.com and it works
excellently.
Then you really are as stupid as you seem.
It removes the comments and spaces and substitutes letters for variables
and function names.
JSMin is free.....

Since I write engineering programs that have many long winded variable and
function names to make it easier to program, the obfuscation does an excellent
job in reducing size and making the program virtually unreadable.
And you paid for a program to make what you write unreadable? It was
wasted money as 99.99999999999999999999% of what you write is unreadable
anyway.
While many may be able to extract the code, few will be able to determine
what the heck is going on with all the variable substitutions and no
comments.
You don't need the comments and lack of white space to make your code
worthless - it is already worthless.
It is hard enough for me to write the code with the comments and long
variable names.


Then learn to program and it becomes easy.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 4 '06 #9
<You don't need the comments and lack of white space to make your code
worthless - it is already worthless.>

Ahh chucks, Randy, we can't all be as smart as you. I think Jason
needed and deserved the $99 and I enjovyed paying him. He did a hell
of a job, in my opinion. Besides it is a tax write off, and do I ever
need tax write offs. Too many people give away programs on the
Internet, when people like myself are perfectly willing to pay for
them. It is all about marketing and making money. Do you have
anything for sale, or are you just another Net Whore that gives it all
away?

Apr 4 '06 #10
el*********@electrician.com said the following on 4/4/2006 3:33 PM:
<You don't need the comments and lack of white space to make your code
worthless - it is already worthless.>

Ahh chucks, Randy, we can't all be as smart as you.
Can't all be dumb either.
I think Jason needed and deserved the $99 and I enjovyed paying him.
Then you are both happy. Ira Baxter peddles the same crap though.
He did a hell of a job, in my opinion.
And that is your opinion and nothing more.
Besides it is a tax write off, and do I ever need tax write offs.
Then buy a boat for business. Its more pleasurable and a bigger write off.
Too many people give away programs on the Internet, when people like
myself are perfectly willing to pay for them. It is all about marketing
and making money.
If it were all about marketing and making money then why are so many
people giving it away? Think about that.

I wrote one myself (an obfuscator) that was totally, 100%, JS driven.
Why did I ditch it? It was useless and why waste my time on a useless
project?
Do you have anything for sale,
Yeah, a boat. You need another write off?
or are you just another Net Whore that gives it all away?


Being a whore gets you laid more often.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 4 '06 #11
el*********@electrician.com wrote:
or are you just another Net Whore that gives it all
away?


Umm - don't whores usually charge?
Apr 4 '06 #12
Randy,
There is fortune to be made on the Internet and I don't think you are
there yet. Furthermore, you are entirely too anal about programming.
Loosen up, kid and start getting in on the action. Use your time to
produce marketable products and quit playing around. People like me
are just waiting to buy! I spent 4 months last Fall hacking out a form
that emails itself and files itself using Perl and a Perl program that
searches 39 files including the filed form. I could not find a
reliable, cost effective and trustworthy Perl programmer within 350
mile of where I live and I live within 17 miles of a Cray super
computer center. I would have gladly paid $5k to have it done. The
only Perl programmer was the Cray guy and he wasn't interested.
Sometimes the same applies to JavaScript.

Apr 4 '06 #13
el*********@electrician.com wrote:
Randy,
There is fortune to be made on the Internet and I don't think you are
there yet. Furthermore, you are entirely too anal about programming.
Loosen up, kid and start getting in on the action. Use your time to
produce marketable products and quit playing around. People like me
are just waiting to buy! I spent 4 months last Fall hacking out a form
that emails itself and files itself using Perl and a Perl program that
searches 39 files including the filed form. I could not find a
reliable, cost effective and trustworthy Perl programmer within 350
mile of where I live and I live within 17 miles of a Cray super
computer center. I would have gladly paid $5k to have it done. The
only Perl programmer was the Cray guy and he wasn't interested.
Sometimes the same applies to JavaScript.

Are you replying to something, or just trolling again?

--
Ian Collins.
Apr 4 '06 #14
<Are you replying to something, or just trolling again?>
The heading was to Randy not you, so butt out!

Apr 4 '06 #15
el*********@electrician.com wrote:
I could not find a
reliable, cost effective and trustworthy Perl programmer within 350
mile of where I live and I live within 17 miles of a Cray super
computer center.


I can't find any reliable, cost effective, and trustworthy electricians
within 350 miles of where I live, and I live near Los Angeles. They all
want like $20/hour or more...
Apr 5 '06 #16

ko****@hotmail.com wrote:
I tried few online javascript obfuscators, all of them generate fully
'garbage' obfuscated code, but no any javascripts work anymore..
Browser not recognize it.


It is impossible for me to guess why any given obfuscator has failed
for any given script you are running or any given browser you are
using.

Debugging the reasons why you are getting an error from an obfuscator
can be very difficult, as there may be many different and subtle
reasons for the error, including problems with your original code.

For instance, if you do not terminate statements correctly, with
semi-colons where required, then the subsequent removal of line breaks
can cause statements to run into each other.

Ironically the more complex your code, the more difficult it can to use
an obfuscator.

Regards

Julian Turner

Apr 5 '06 #17
Julian Turner писал(а):
ko****@hotmail.com wrote:
I tried few online javascript obfuscators, all of them generate fully
'garbage' obfuscated code, but no any javascripts work anymore..
Browser not recognize it.
It is impossible for me to guess why any given obfuscator has failed
for any given script you are running or any given browser you are
using.

Debugging the reasons why you are getting an error from an obfuscator
can be very difficult, as there may be many different and subtle
reasons for the error, including problems with your original code.

For instance, if you do not terminate statements correctly, with
semi-colons where required, then the subsequent removal of line breaks
can cause statements to run into each other.

Ironically the more complex your code, the more difficult it can to use
an obfuscator.

Regards

Julian Turner


---------
I want to find an obfuscator, which works gently, for example, replaces
spaces some characters, etc, without a damaging a code itself. The
purpose is just make a code difficultly read, that a curious user which
will want to see a source get a problems, and did not spend its time
for further code research.. Script property does not matter for me.

Apr 5 '06 #18

ko****@hotmail.com wrote:

[snip]
I want to find an obfuscator, which works gently, for example, replaces
spaces some characters, etc, without a damaging a code itself. The
purpose is just make a code difficultly read, that a curious user which
will want to see a source get a problems, and did not spend its time
for further code research.. Script property does not matter for me.


There was something I wrote (about 5 years ago now), when I was lured
to the dark side for a while, before this group thankfully pointed out
the error of my ways.

I now hold to the view that obfuscation is often more trouble than it
is worth, unless perhaps file size optimisation is your geniune and
justified aim, and if I think I have written anything valuable, a quick
search of Google soon disabuses me of that delusion.

You can still find it however at
<URL:http://www.baconbutty.com/ObscuraButty(v2).htm>

It is pretty rough, and the variable replacement names are a bit long,
but feel free to try it.

Regards

Julian Turner

Apr 5 '06 #19
Julian Turner писал(а):
ko****@hotmail.com wrote: [snip]
I want to find an obfuscator, which works gently, for example, replaces
spaces some characters, etc, without a damaging a code itself. The
purpose is just make a code difficultly read, that a curious user which
will want to see a source get a problems, and did not spend its time
for further code research.. Script property does not matter for me.
There was something I wrote (about 5 years ago now), when I was lured
to the dark side for a while, before this group thankfully pointed out
the error of my ways. I now hold to the view that obfuscation is often more trouble than it
is worth, unless perhaps file size optimisation is your geniune and
justified aim, and if I think I have written anything valuable, a quick
search of Google soon disabuses me of that delusion. You can still find it however at
<URL:http://www.baconbutty.com/ObscuraButty(v2).htm> It is pretty rough, and the variable replacement names are a bit long,
but feel free to try it. Regards Julian Turner

--------------------------
Well, a full html page source can be used as input for text area there,
not javascript only?

Regards,
korund

Apr 5 '06 #20

ko****@hotmail.com wrote:

[snip]
Well, a full html page source can be used as input for text area there,
not javascript only?


If you read the instructions on the first page, you will see that it
should accept JavaScript only.

Its old stuff, so I am not going to defend it.

Regards

Julian Turner

Apr 5 '06 #21

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

41
by: Mr. x | last post by:
Hello, Can I make my java script code be invisible to other people who enter into my site by IE browser ? - How ? Thanks :)
8
by: Pjotr Wedersteers | last post by:
I am new to J(ava)Script, use PHP a lot and consider moving some stuff for a project over to the client side. Problem is part of the PHP code is copyrighted and the author would not be happy to see...
17
by: Matt Kruse | last post by:
I am far from a PHP expert, and I've been struggling to create a function which will take a javascript .js file and "compact" it as much as possible. Meaning, remove all comments and unnecessary...
5
by: Pete Davis | last post by:
This isn't directly a C# question, so I apologize for being somewhat off topic, but we have a project that is open source. When we release, the actual release builds will be obfuscated using string...
2
by: Luke Matuszewski | last post by:
Hi, Can anyone point me for some JavaScript Obfuscators ? I know one written by Dean Edwards (but it do not substitute variable names, which a would like to do). B.R. Luke Matuszewski
5
by: Eric Renken | last post by:
So I have a question we are looking at obfuscators. I am trying to push for dotfuscator from www.preemptive.com, but management is thinking about xenocode from www.xenocode.com. Has anyone used...
30
by: mistral | last post by:
Neeed good javascript unescape encoder, to protect javascript code. Some advices? Online tool, or ready javascript only. Any opinions about the Javascript Obfuscator:...
11
by: =?iso-8859-1?q?Martin_M=FCcke?= | last post by:
Hi, I am looking for a good javascript obfuscator - I found several on the web, but I am looking for one that can also handle javascript in jsp, html and java files - so I need a javascript...
4
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I protect my javascript code? ----------------------------------------------------------------------- ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.