Home Message Board SBN Chat SBN Articles Bike Specs Register Pictures Classifieds Forum Rules Advertise Contact Us

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

» Insurance


» Site Sponsors
Corbin Pacific Inc.
SportbikeTrackGearAnnitori DistributingMcCoyMotorsportsGravesMotorsportsBluTek HelmetsSoupy's PerformanceAdvanstarMotorcycleShowsMotoworld IncSee your ad here!
Reply
 
LinkBack Thread Tools Display Modes
Old 03-03-2006, 05:32 PM   #1 (permalink)
vaulter721
World Superbike Champion
 
vaulter721's Avatar
 

Join Date: Aug 2004
Location: Milwaukee, WI
Age: 28
Posts: 652
Casino Cash: $1496
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, 05:42 PM   #2 (permalink)
cycledesign
Superbike Racer
 
cycledesign's Avatar
 

Join Date: Dec 2005
Location: Los Angeles, CA
Posts: 229
Casino Cash: $16103
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, 12:00 PM   #3 (permalink)
Hagios
Sport Tourer
 
Hagios's Avatar
 

Join Date: Jun 2004
Location: Montana
Age: 24
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, 01:09 PM   #4 (permalink)
Maichena
I made your Ipod
 
Maichena's Avatar
 

Join Date: Nov 2005
Location: Springfield, USA
Age: 35
Posts: 2,140
Casino Cash: $18457
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.
__________________
<coffee>
OMG OMG I HAF D GREEN FONT HERE! LUKZ @ ME! WHEEEEEE!
</coffee>



..zzzzzz
Maichena is offline   Reply With Quote
Old 03-20-2006, 01:14 PM   #5 (permalink)
Mr. Lesbian
PORN? Huh? Where? When?
 
Mr. Lesbian's Avatar
 

Join Date: Jun 2004
Location: Canada, eh?
Age: 30
Posts: 2,764
Casino Cash: $711
Sportbike: '99 ZX-6R - SOLD! '02 Gixxxer 750 (Temporary)
Mr. Lesbian is a jewel in the rough Mr. Lesbian is a jewel in the rough Mr. Lesbian is a jewel in the rough Mr. 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, 01:23 PM   #6 (permalink)
bush
Shitbike
 
bush's Avatar
 

Join Date: Nov 2005
Location: BFE
Posts: 9,737
Casino Cash: $20185
Sportbike: 2017 Ducati Desmosidouchey
bush is just really nice bush is just really nice bush is just really nice bush is just really nice
Default

.htaccess files and some elementary PHP scripting.
bush is offline   Reply With Quote
Old 03-20-2006, 01:33 PM   #7 (permalink)
Hagios
Sport Tourer
 
Hagios's Avatar
 

Join Date: Jun 2004
Location: Montana
Age: 24
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 01:28 PM.

Motorcycle News, Videos and Reviews
Harley Davidson Suzuki GSXR Ducati Forum Kawasaki Forum
V-Rod Forum GSXR Forum Ducati Monster Vulcan Forums
Harley Forum Suzuki SV Honda 600RR Kawasaki ZX Forum
Buell Forum Yamaha R1 Honda 1000RR Kawasaki ZX-10R
KTM Forum Yamaha R6 Honda Fury Forums Triumph Forum
Victory Forums YZF-R6 Forum Honda Goldwing Triumph 675
Can Am Spyder Aprilia Forum Sportbikes Forum BMW S1000RR Forum

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