Another way to login to directory?

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
theblitzrocks
-


Joined: 28 Jan 2004
Posts: 9

PostPosted: Wed Jan 04, 2006 2:28 am    Post subject: Another way to login to directory? Reply with quote

I would like to find a way to login to a password protected directory using a form instead of the ugly login box that comes up... I found a way to do it but it only works on xp systems.. On windows 2000 it comes up as "Page cannot be displayed" after it redirects...

The code I use now takes the username and password from a form, and redirects it to "user:pass@site.com/site" (site being the protected directory):
Code:

<?php
$username = $_REQUEST['username'];
$password = $_REQUEST['password'];
?>
<HTML>
<body bgcolor="black">
<font color=white>
<h3>Please Wait...  Logging In...</h3>

<meta http-equiv="refresh" content="2; url=http://
<?php echo "$username:$password"?>
@site.com/site/">
</BODY></HTML>


Is there another way to do this so it will work on all operating systems?
_________________
EAT EAT EAT, EAT THE MEAT!!!
HOT, SPICY, BURN YOUR GUTS!!!
BURN BURN BURN, HOT HOT HOT!!!
FIRE UP THE BBQ!!!
SENOR PAIN NOW COME FOR YOU!!!
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Wed Jan 04, 2006 3:05 am    Post subject: Reply with quote

Try this PHP code instead

Code:

<?php
 $username = $_POST["username"];
 $password = $_POST["password"];

 header("Location: http://$username:$password@www.your-site.com/path");
 exit;
?>
Back to top View user's profile Send private message Visit poster's website
theblitzrocks
-


Joined: 28 Jan 2004
Posts: 9

PostPosted: Wed Jan 04, 2006 3:28 am    Post subject: thanks Reply with quote

thank you very much...
_________________
EAT EAT EAT, EAT THE MEAT!!!
HOT, SPICY, BURN YOUR GUTS!!!
BURN BURN BURN, HOT HOT HOT!!!
FIRE UP THE BBQ!!!
SENOR PAIN NOW COME FOR YOU!!!
Back to top View user's profile Send private message
theblitzrocks
-


Joined: 28 Jan 2004
Posts: 9

PostPosted: Wed Jan 04, 2006 4:19 am    Post subject: another problem Reply with quote

it works fine in firefox... not in IE though...

The login box pops up in IE...

Is there another way of doing it without sending the username and password in the URL
_________________
EAT EAT EAT, EAT THE MEAT!!!
HOT, SPICY, BURN YOUR GUTS!!!
BURN BURN BURN, HOT HOT HOT!!!
FIRE UP THE BBQ!!!
SENOR PAIN NOW COME FOR YOU!!!
Back to top View user's profile Send private message
cmxflash
-


Joined: 11 Dec 2004
Posts: 872

PostPosted: Wed Jan 04, 2006 4:42 am    Post subject: Reply with quote

This is a pretty unsafe method to use. If the client is on a wireless network, it's very easy to sniff the username and password. I've done it myself many times in my college. I recommend you using a hash-algorithm, such as MD5 or SHA1.
Back to top View user's profile Send private message
theblitzrocks
-


Joined: 28 Jan 2004
Posts: 9

PostPosted: Wed Jan 04, 2006 5:31 am    Post subject: ? Reply with quote

How do i do that? The directory is password protected... i want to bypass the ugly popup login box... how would i use one of these "MD5" or "SHA1" algorithms?
_________________
EAT EAT EAT, EAT THE MEAT!!!
HOT, SPICY, BURN YOUR GUTS!!!
BURN BURN BURN, HOT HOT HOT!!!
FIRE UP THE BBQ!!!
SENOR PAIN NOW COME FOR YOU!!!
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group