JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 2nd, 2006, 01:43 AM
itsmerohi itsmerohi is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Posts: 1 itsmerohi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 42 sec
Reputation Power: 0
Javascript encryption

how can i encrypt a javascript.. not the whole html page. i want only the js file to be encrypted.

Reply With Quote
  #2  
Old June 2nd, 2006, 11:52 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 10
I'm not sure why anyone would want to... buy try searching google for obfuscated javascript
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter!
DevArticles Forum Moderator

"The net is a waste of time, and that's exactly what's right about it." -- William Gibson

Reply With Quote
  #3  
Old June 2nd, 2006, 01:26 PM
Kravvitz Kravvitz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2005
Location: USA
Posts: 138 Kravvitz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 14 m 55 sec
Reputation Power: 5
Why?

Encrypting your code will only make it run slower.

Almost everyone I've encountered who wants to hide their code doesn't write very good code in the first place.
Comments on this post
MadCowDzz agrees:

Reply With Quote
  #4  
Old June 5th, 2006, 01:31 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 10
Quote:
Originally Posted by Kravvitz
Almost everyone I've encountered who wants to hide their code doesn't write very good code in the first place.

*amen*!

Reply With Quote
  #5  
Old June 5th, 2006, 09:47 PM
ravs ravs is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Location: gurgaon, haryana, india
Posts: 60 ravs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 44 m 29 sec
Reputation Power: 4
Send a message via Yahoo to ravs
hi
I also want to add something,
1) who the hrl is going to copy the code from a running website, there are lots and lots of tutorial sites, and fourms are available,
2) If you will copy somebodys code,( specially in javascript there are more than 2 ways to do any thing so it will take you to long to under stand what is done by other person.
3) I tried once the code of google i copied the JS of google but i was not able to under stand it tooks me 5 hour the format the code before i could start understanding it.
So whats the moral of the story.........

forget about the encryption of javascript, use that time develop something more awesome thing, still we are not utilizing the concept of web more than 20 - 30%

Reply With Quote
  #6  
Old June 6th, 2006, 03:10 PM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 553 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 9 h 1 m 33 sec
Reputation Power: 5
encryption

:twocents:
I can think of only 2 reasons why someone would want to encrypt javascript.
1. They (think they) have the greatest script going and don't want anyone else to have it. 2. They are trying to do something underhanded and don't want users to easily see what they're up to.
@itsmerohi, I will give you the benefit of doubt and assume that you don't want this for some evil purpose, (and I wouldn't help if you did).
Perhaps you do have some script that you worked hard on and now you're attached to it and want to "own" it. But consider that, as already said, there are many sources online for javascript. Prototype, Rico, Epoch, Scriptaculous, GreaseMonkey, and more to be sure, all do some amazing things and are Open Source and Free. Perhaps rather than "closet away" your script, you should make it available. Put in the typical "created by... use but keep this comment intact" type of comment in the script and get traffic to your site as a result. Who knows, you may end up having the site grow bigger than you alone can keep up with and have a growing community of users.

Reply With Quote
  #7  
Old June 13th, 2006, 10:01 AM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - *Local Friend*
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 475 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 34 m 8 sec
Warnings Level: 1
Reputation Power: 4
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
NOT ALL PEOPLE WHO ENCODE JAVASCRIPT ARE BAD PROGRAMMERS/HAVE BAD CODE
well not everytime because sometimes they are trying to save valuable information or src's

Reply With Quote
  #8  
Old June 13th, 2006, 10:07 AM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - *Local Friend*
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 475 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 34 m 8 sec
Warnings Level: 1
Reputation Power: 4
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
somewhat encoded text

within javascript you can call javascript files (.js) by the coding...
document.write('<SCRIPT LANGUAGE="JavaScript" SRC="file2call.js"><\/SCRIPT>');
and if you need to enscript a whole js file you may be able to use the escape() and unescape() encoders that is primarily used in cookies.

to use this, say we had the following....

//FILE NAME="test.js"
var songurl="http://www.songsrc.com/songsrc.mp3";

you can instead encode this and the result will be...

//FILE NAME="test.js"
var songurl=unescape("http%3A%2F%2Fwww.songsrc.com%2Fsongsrc.mp3");

a good place to encode stuff is...
http://www.yuki-onna.co.uk/html/encode.html

please email me

colton --myweb: http://www.freewebs.com/colton22

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Javascript encryption


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek