Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 09-21-2005, 10:08 AM   #1
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
how do i hide or encrypt a java script?

I have a javascript and want to hide or encrypt the source of it. Whats the easist way to do this?
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 10:27 AM   #2
leenks
Registered User
 
Join Date: Jun 2005
Posts: 17
You don't.
leenks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 10:31 AM   #3
u-Bob
there's no $$$ in porn
 
u-Bob's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: icq: 195./568.-230 (btw: not getting offline msgs)
Posts: 33,063
javascript -> clientside.

you can only obfuscate it...
u-Bob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 10:32 AM   #4
emthree
Dialer Kingpin
 
Join Date: Jun 2003
Location: New York
Posts: 10,816
cheater!!!!!!!!!!1
You encrypt js w/ js..
__________________

Sell Patches & Pills
emthree is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 10:47 AM   #5
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
im not cheating, i am hiding the script i paid $50 for from other's trying to steal it it
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 10:48 AM   #6
Thurbs
The Thrilla in Manila
 
Join Date: Sep 2004
Location: Thurbs' Lagoon, Christmas Island
Posts: 4,785
rewrite it into php and use config.inc to hide it =p
Thurbs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 10:51 AM   #7
gornyhuy
Chafed.
 
gornyhuy's Avatar
 
Join Date: May 2002
Location: Face Down in Pussy
Posts: 18,041
you could also source it (script src=____) and then put htaccess restrictions on the src file so that the referrer has to come from your server.. That way they won't be able to read it inline and they wont be able to download the src file.
__________________

icq:159548293
gornyhuy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 11:02 AM   #8
Coyote
Drinker of Scotch
 
Industry Role:
Join Date: May 2003
Location: Texas
Posts: 242
Once upon a time, a long time ago, I ran accross a script that I wanted to view. When trying to 'copy' the script to a temporary location in order to view it, I instead got an error that I was not authorized. Even though the script appeared in the temporary internet directory I was unable to access it. I believe the server admin had apparently setup the htaccess to only allow the script from the host url.

At least on a winders box, you first have to copy the file from the temp inet dir to a location where you can view the content. That 'copy' attempt appears to retrieve the original file from the server, hence the htaccess solution. I don't know if this is correct because I never pursued it, nor tested it. But you rekindled my interest. I'd appreciate you lettin' me know if get it to work.
Coyote is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 11:16 AM   #9
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
Quote:
Originally Posted by gornyhuy
you could also source it (script src=____) and then put htaccess restrictions on the src file so that the referrer has to come from your server.. That way they won't be able to read it inline and they wont be able to download the src file.
what htaccess commands should I put on it? i know what you mean about the server thing, can you post the code so I can add it to the .htaccess file?
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 02:43 PM   #10
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
bump 8
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 02:44 PM   #11
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
you can't, anyone that's been on the internet for more than 2 days will be able to decrypt no matter what you do in 5 mins...
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 04:35 PM   #12
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
how about the htaccess command
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 04:37 PM   #13
Theo
HAL 9000
 
Industry Role:
Join Date: May 2001
Posts: 34,515
Quote:
Originally Posted by woj
you can't, anyone that's been on the internet for more than 2 days will be able to decrypt no matter what you do in 5 mins...
wanna take a bet? lol
Theo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 05:15 PM   #14
sleazybunny
Confirmed User
 
sleazybunny's Avatar
 
Join Date: Feb 2005
Location: uk
Posts: 239
whats the internet again ????
sleazybunny is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 05:53 PM   #15
gambino
Confirmed User
 
Industry Role:
Join Date: Sep 2005
Posts: 2,326
The definite answer is: there is no 100% safe method for encrypting or hiding your javascript or html code.
Why? These are scripting and markup languages which means that for any browser to understand, display and/or run them it MUST have the source, and if there is a way for the browser to get it, there sure is a way for a (experienced) user to get it!

However, this doesn't mean that you can't make code-stealing (much) more difficult:
1) You can use javascript to disable the right mouse button (easily disabled in some browsers)
2) You can use the .htaccess file to limit the referer (again, some browsers can fake the referer variable, or a simple php script will do the trick of fooling the server that the allowed referer was used)
3) You can encrypt your script using a javascript function, add the encrypted script along with a decryption function to your html, but have that function written 'escaped' and than just "eval(unescape(name_of_your_decrypting_function)); " -- If you want to see how this works look at the source of http://www.protware.com/e_demo.htm (Personally, I find this solution to take most time to 'break' especially is customized encryption script is used, but again a not so complex js will "decrypt" this in a snap)
...) can't think of any more right now

Using 1+2+3+... obviously is the best solution if you're willing to spend that much time on hiding the code. Besides, if you bought that code, there is probably hundreds of other sites where someone can find that code -- this is actually something the maker/owner of the code should worry about.

Regards
gambino is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-21-2005, 08:36 PM   #16
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
Quote:
Originally Posted by Soul_Rebel
wanna take a bet? lol
I may have exagurated the 5 mins, but any javascript protection method can be cracked fairly quickly. Normally I would be willing to take a bet, but I don't really have time to mess around with it now.
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.