Know any htpasswd encryptor?

  • Thread starter Thread starter Midhun K Menon
  • Start date Start date
M

Midhun K Menon

I'm looking for a htpasswd encryptor which can encrypt a batch of
records at a time.
I found this: http://webcab.de/htpasswd.htm

But in this webbased form, I need to manually enter username and
password to encrypt. Is there any free software which can do this for
me?
 
Midhun said:
I'm looking for a htpasswd encryptor which can encrypt a batch of
records at a time.
I found this: http://webcab.de/htpasswd.htm

But in this webbased form, I need to manually enter username and
password to encrypt. Is there any free software which can do this for
me?

Midhun,

How's your Dutch?

(http://users.vrc.be/beveilig.php)

I have used htpw-win.exe and htpw-dos.exe to create/add to the .htpasswd
file. You may be able to put them into a batch file. The .htaccess and
..htgroup files are both all ASCII/ANSI. You can create/edit them anyway
that you want. Search for these executables, and perhaps htpw.exe, and
see what you can find. Keep your translator handy. ;-)

Ron
 
How can i do it in batch mode? :-s
what i have now is a text file with few words as a list (unnumbered). I
would like to encrypt these words(strings) so as to make it work as
htpasswd passwords, and possibly store there encrypted values to a new
file!
Any ideas...?

The text file which contains the words are in pass.txt..

I tried the php script posted by Mel. infact modified it a bit too:

<?
# **************************************************************
# make htaccess !
#
# 1. set all rights (chmod 777)
# 2. place this file into the directory you want to protect
# 3. start the script (http://..../make_htaccess.php
# 4. enter login and password
# 5. press the button 'make'
# 6. ready
#
# Lars Brinkmann
# email: (e-mail address removed)
#
# **************************************************************


$pass=file("pass.txt");
foreach ($pass as $line_num => $line) {
$htpasswd_txt = crypt($passw[$line], CRYPT_STD_DES)."\n";

# save files

$htpasswd= fopen(".htpasswd", "a");


fputs($htpasswd, $htpasswd_txt);
fclose($htpasswd);
}
echo "done"."\n"; //when the entire thing is encrypted!

?>

I can see the .htpasswd file, and it seems to be encrypted as well..
but i do not know why, all the encrypted values are the same (means
encrypted values for all the words are same.. I'm sure it's not any
logical error with the loop or anything as i'm getting different
encrypted values when i use
$htpasswd_txt = crypt($passw[$line])."\n"; instead of
$htpasswd_txt = crypt($passw[$line], CRYPT_STD_DES)."\n";
But the latter seems to be producing a longer code (MD5 i believe)...

So what could be it? Any help is appreciated!
 
i made a spelling mistake..
initial variable is $passw, not $pass
but, still that doesn't solve the issue (SAME PROBLEM)
 
Midhun said:
How can i do it in batch mode? :-s
what i have now is a text file with few words as a list (unnumbered). I
would like to encrypt these words(strings) so as to make it work as
htpasswd passwords, and possibly store there encrypted values to a new
file!
Any ideas...?

The text file which contains the words are in pass.txt..

I tried the php script posted by Mel. infact modified it a bit too:

<?
# **************************************************************
# make htaccess !
#
# 1. set all rights (chmod 777)
# 2. place this file into the directory you want to protect
# 3. start the script (http://..../make_htaccess.php
# 4. enter login and password
# 5. press the button 'make'
# 6. ready
#
# Lars Brinkmann
# email: (e-mail address removed)
#
# **************************************************************


$pass=file("pass.txt");
foreach ($pass as $line_num => $line) {
$htpasswd_txt = crypt($passw[$line], CRYPT_STD_DES)."\n";

# save files

$htpasswd= fopen(".htpasswd", "a");


fputs($htpasswd, $htpasswd_txt);
fclose($htpasswd);
}
echo "done"."\n"; //when the entire thing is encrypted!

?>

I can see the .htpasswd file, and it seems to be encrypted as well..
but i do not know why, all the encrypted values are the same (means
encrypted values for all the words are same.. I'm sure it's not any
logical error with the loop or anything as i'm getting different
encrypted values when i use
$htpasswd_txt = crypt($passw[$line])."\n"; instead of
$htpasswd_txt = crypt($passw[$line], CRYPT_STD_DES)."\n";
But the latter seems to be producing a longer code (MD5 i believe)...

So what could be it? Any help is appreciated!

Midhun,

I think you are getting into stuff that I can't help you with (it's been
10 years since I wrote a UNIX script), but I think that you need an HT
Password command line generator to do something like:

htpasswd_generator.exe username, password, password

Set up your script to pass the arguments to your generator, and then
direct the output to where you want it. You can run the script on your
system and then upload it, or run it on the server.

BTW, the .htpasswd file is also an ASCII/ANSI file that lists users as
user:password with the password being encripted. When I create/add to
the file on my WinXP system, I use htpw-win.exe from a command prompt
and save the file as htpasswd.txt, and then rename it to .htpasswd as I
move (FTP) it to the server.

Try to generate a couple of passwords without the script, to make sure
that that your generator is working properly. Here is part of my current
..htpasswd file (munged of course):

-----------------------------------------------
Valid Users

tom:Q/XPTR1Z6pi
bob:pWHFIHqO3fI
lorna:VPoGdkpYeEM
ken:UK0kby0a206
ron:kldRniMewEA
dan:jMkcY/hRWjw
brian:xtjHbQ9duLY
chas:2AJtsZO.2ek
jeremy:41p5UDJHBF.
ed:eF.wMcd8CM.
byron:B5z2glxYLgQ ' for people who leave their
BYRON:WabyIgDZqdE ' caps lock on all day - LOL
bryan:d7jfU/PVRqE
guest:PARo0ZEfAu.
 
Well... it's for a project! And i'm working on a WinXP system... I
downloaded the htpw-win.exe but still not sure how to make it produce
any result. My dutch is zero as well...
i need to have around 1000 user:encrypted_passwords as an output... And
i have such a list of user:unencrypted_password in my system.. How can
i use this htpw-win.exe to make the desired output?
Thnx in advance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top