Javascript Obfuscators

K

korund

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)
 
J

Julian Turner

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
 
K

korund

Julian Turner пиÑал(а):
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.


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.
 
J

Julian Turner

(e-mail address removed) 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
 
L

Lasse Reichstein Nielsen

Julian Turner said:
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
 
E

electrician

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.
 
J

Julian Turner

Lasse said:
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
 
K

korund

Lasse said:
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
 
E

electrician

<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?
 
R

Randy Webb

(e-mail address removed) 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.
 
E

electrician

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.
 
E

electrician

<Are you replying to something, or just trolling again?>
The heading was to Randy not you, so butt out!
 
J

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.

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
 
K

korund

Julian Turner пиÑал(а):
(e-mail address removed) 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.
 
J

Julian Turner

(e-mail address removed) 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
 
K

korund

Julian Turner пиÑал(а):
(e-mail address removed) 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.
It is pretty rough, and the variable replacement names are a bit long,
but feel free to try it.

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

Regards,
korund
 
J

Julian Turner

(e-mail address removed) 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top