By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,718 Members | 1,220 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,718 IT Pros & Developers. It's quick & easy.

Hide javascript from client? i think i've done it!

P: 4
Hello all,

I belive i found a way to hide javascript from the client.. i use php.. page referral and sessions to restrict access, run the code and then run a fake code to clean the script file.

I've already done some tests and didn't found a way to view the javascript code.

if anyone want's to give it a try, i made a testpage just for that purpose: http://prtg.eu/lockedscript/testpage/

on the scriptfile i have a line that says:
Expand|Select|Wrap|Line Numbers
  1. // Here is the code you need to proof you where here --> ######
if you can view the script, tell me that code and how did you found your way around the protection to view the script.
May 26 '11 #1
Share this Question
Share on Google+
6 Replies


Dormilich
Expert Mod 5K+
P: 8,639
that one?
Expand|Select|Wrap|Line Numbers
  1. /// ACCESS Granted http://prtg.eu/l// JavaScript Document
  2. // ########################################
  3. // # #################################### #
  4. // # # lockedscript 1.0 # #
  5. // # ######################################
  6. // # # Programer: Nelson Campos # #
  7. // # # Mail: thessnake@gmail.com # #
  8. // # # Website: www.prtg.eu # #
  9. // # ######################################
  10. // ########################################
  11. // Now if you can see this than you found a way around this lock..
  12. document.write('<br />');
  13. document.write('Can you find my script? i\'m around here somewhere!');
  14. document.write('<br />');
  15. // Here is the code you need to proof you where here --> 085609
FireBug > Script > lockedscript.php
May 26 '11 #2

P: 4
any particular configuration on firebug? i have firebug too and it doesn't show the script..
May 26 '11 #3

Dormilich
Expert Mod 5K+
P: 8,639
probably a combination of previously inactivated Javascript, empty cache, first visit and luck.
May 26 '11 #4

P: 4
i found some problems in the session vars wich are not working has supposed.. for the moment any tests made on the website might not work.. when i correct that ill post here again ather implement better security
May 26 '11 #5

P: 4
new security setting have been implemented, including a bug that has been solved on IE..

Dormilich: would you like to try and mimic that last shoot?

everyone else can try access the javascript file and tell how and give the new proof code
May 26 '11 #6

P: 2
Expand|Select|Wrap|Line Numbers
  1. /// ACCESS Granted http://prtg.eu/l// JavaScript Document
  2. // ########################################
  3. // # #################################### #
  4. // # # lockedscript 1.0 # #
  5. // # ######################################
  6. // # # Programer: Nelson Campos # #
  7. // # # Mail: thessnake@gmail.com # #
  8. // # # Website: www.prtg.eu # #
  9. // # ######################################
  10. // ########################################
  11. // Now if you can see this than you found a way around this lock..
  12. document.write('<br />');
  13. document.write('Can you find my script? i\'m around here somewhere!');
  14. document.write('<br />');
  15. // Here is the code you need to proof you where here --> 0632609/2
Jun 29 '11 #7

Post your reply

Sign in to post your reply or Sign up for a free account.