Advertise here as low as $250/month

Home Message Board SBN Articles User Reviews Bike Specs Register Pictures Classifieds Bike Project How To's
MarketPlace Dealers Chat Top Sites Links SBN Store Forum Rules Contributors Sponsors Contact Us Advertising Information

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
SuperbikeToyStore.com
Go Back   Sportbikes.net > Topic Discussions > Open Forums > Sportbike Cafe > Tech Support - Computer Geeks-R-Us
Register Subscribe Casino Garage FAQ Members List Calendar Arcade Search Today's Posts Mark Forums Read

Tech Support - Computer Geeks-R-Us Have a bad time with Win-Blows? Looking for parts? Chit chat about it here.

» Site Sponsors
D2MotoKomodoGear.comBazzaz PerformanceSixty61MotoGiya.comChainDrain.comNice CycleSumOfAllParts.netJazzMotorsports.comSuperbikeToyStore.comArnottAirRideWilzGarageSee your ad here!
Reply
 
LinkBack Thread Tools Display Modes
Old 03-03-2006, 04:32 PM   #1 (permalink)
vaulter721
World Superbike Champion
 
vaulter721's Avatar
 
Join Date: Aug 2004
Location: Milwaukee, WI
Age: 27
Posts: 647
Casino Cash: $1381
Sportbike: 01 GSX-R 750
vaulter721 is on a distinguished road
Default Need website help

I just designed my first website and it is nearly finished. I decided to create a password protected page so only certain people could view it. I used a javascript for the login page which links to a success page and a failure page. The problem I am running into is when someone is on the login page if they view the page source they can see the login and password information.

Is there a way I can make that section of the code invisible to everyone but myself??

I don't really want to create an .htaccess page like others have suggested, because I like the way this one works.

Thanks for any help!
__________________
The next time you're having a bad day, imagine this:

You're a Siamese twin.
Your brother, attached at your shoulder, is gay.
You're not.
He has a date coming over tonight.
You only have one ass.
Feel better...
vaulter721 is offline   Reply With Quote
Sponsored Links
Advertisement
 

Old 03-03-2006, 04:42 PM   #2 (permalink)
cycledesign
Superbike Racer
 
cycledesign's Avatar
 
Join Date: Dec 2005
Location: Los Angeles, CA
Posts: 215
Casino Cash: $3771
Sportbike: '04/Yamaha/FZ6 '90/Kawasaki/EX500
cycledesign is on a distinguished road
Awards Showcase
Green Token: Green SBN Token - Issue reason:  Yellow Token: Yellow SBN Token - Issue reason:  
Total Awards: 2
Default

I don't primarily work in the web area but couldn't you create a file that can only be read by the server and have the javascript load the username/password from that file so it's not available to the user?

If not, all I can recommend is a simple PHP solution or something.
cycledesign is offline   Reply With Quote
Old 03-20-2006, 11:00 AM   #3 (permalink)
Hagios
Sport Tourer
SBN Contributor
 
Hagios's Avatar
 
Join Date: Jun 2004
Location: Montana
Age: 22
Posts: 1,729
Casino Cash: $250
Sportbike: '06 VFR800
Hagios is on a distinguished road
Default

http://www.google.com/search?q=.htaccess

Hope you're using Apache. I have NO clue if IIS supports htaccess files (can't imagine that it doesn't, though...)
__________________
There's nothing ugly on two wheels.
Hagios is offline   Reply With Quote
Old 03-20-2006, 12:09 PM   #4 (permalink)
Maichena
I made your Ipod
SBN Contributor
 
Maichena's Avatar
 
Join Date: Nov 2005
Location: Springfield, USA
Age: 34
Posts: 2,001
Casino Cash: $14303
Sportbike: 2004 SV650 (SOLD), 2005 ZX-6R (SOLD) bikeless
Maichena is on a distinguished road
Awards Showcase
Yellow Token: Yellow SBN Token - Issue reason:  
Total Awards: 1
Default

Unfortunately, since you're using Javascript, there is no way of preventing the user from viewing the source. It's a client-side script, which means the source is downloaded onto the user's computer before it is executed. Unless you're using Ajax (that's another can of worms), it's probably not possible to prevent the user from viewing source.

Even if you use:
<script language=Javascript src="/login.js"></script>
users can view it by downloading the js script.

Disabling the right click to view source won't stop them from going to the menu bar and viewing the page source.

htaccess will be the easier and a more secure way to do it.
__________________
No.
Maichena is offline   Reply With Quote
Old 03-20-2006, 12:14 PM   #5 (permalink)
Mr. Lesbian
PORN? Huh? Where? When?
 
Mr. Lesbian's Avatar
 
Join Date: Jun 2004
Location: Canada, eh?
Age: 29
Posts: 2,764
Casino Cash: $711
Sportbike: '99 ZX-6R - SOLD! '02 Gixxxer 750 (Temporary)
Mr. Lesbian is a jewel in the roughMr. Lesbian is a jewel in the roughMr. Lesbian is a jewel in the roughMr. Lesbian is a jewel in the rough
Default

If your server doesn't have scripting... here is an easy but effective alternative.

http://javascript.internet.com/passw...keeper-in.html

Quote:
How to Determine Your Password:

The password for that password protection script isn't actually in the
code, it's just the filename of the protected page without the .html ending.

For example, if your protected file is called 'secret.html' the password
would be 'secret' (without quotes). It's relatively simple, but it works!

Also, make sure that that you have an 'index.html' page on your site, to
prevent people from defeating this script by getting your directly listing.
Mr. Lesbian is offline   Reply With Quote
Old 03-20-2006, 12:23 PM   #6 (permalink)
bush
What would NPH do?
 
bush's Avatar
 
Join Date: Nov 2005
Location: BFE
Posts: 8,309
Casino Cash: $12033
Sportbike: Katana - For the man who has nothing to prove
bush is just really nicebush is just really nicebush is just really nicebush is just really nice
Default

.htaccess files and some elementary PHP scripting.
bush is offline   Reply With Quote
Old 03-20-2006, 12:33 PM   #7 (permalink)
Hagios
Sport Tourer
SBN Contributor
 
Hagios's Avatar
 
Join Date: Jun 2004
Location: Montana
Age: 22
Posts: 1,729
Casino Cash: $250
Sportbike: '06 VFR800
Hagios is on a distinguished road
Default

Mr. Lesbian, that's the sort of protection that anyone intent on getting pas, can in a matter of moments.

One way to do it, if you are intent on using javascript, would be to check passwords the same way Unix systems do. Use a one-way hash, and check passwords, after having been hashed, against known values. Information on the most common algorithms (MD4, MD5, SHA-1) in JS can be found at http://www-adele.imag.fr/~donsez/cou...js_securehash/
__________________
There's nothing ugly on two wheels.
Hagios is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 10:52 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0
© 1997 - 2007 Sportbikes.net INC. All Rights Reserved.