Security and Cryptography
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationSecurity and Cryptography

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 26th, 2000, 07:08 PM
Pingo Pingo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Falun, Sweden
Posts: 1 Pingo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I am trying to solve this problem I had for a while, but can't find any useful info anywhere.

I am running/helping with several websites using the .htpasswd for user-access.

I recently got a huge ASCII-file with usernames/passwords, looking like this:

--- CUT ---
username1,password1
usernname2,password2
...
--- CUT ---

And this goes on for about 12Kb, so You can imagine, it's not a fun thing to type in to htpasswd. :-)

What I need is some sort of encryption-program for either Mac (OS7.1 or lower) or Win98 that I can just run this little text-file through, and get an complete encrypted (of the passwords only of course) version of it on "the other side".

I do *not* want a perl-script or any script I have to run on the UNIX-machine, since the only UNIX-machine I have telnet-access to doesn't have Perl installed (please don't ask me about this - it's a Swedish provider, and I've been trying to solve this... )

I am very happy for any help in this matter!

Thank You!

------------------
/ Pingo - www.penguinfilms.com

Reply With Quote
  #2  
Old July 26th, 2000, 10:06 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>I do *not* want a perl-script or any script I have to run on the UNIX-machine

You have no choice!

>>I've been trying to solve this

Open an account at http://www.hypermart.net (free) just to run this script once.

#!/usr/local/bin/perl

$ascii_file = "/path/to/password.txt";
$htpasswd_file = "/path/to/.htpasswd"; #chmod666

open(ASCII,"$ascii_file");
@lines = <ASCII>;
close(ASCII);
foreach $line (@lines) {
chomp $line;
($username,$password) = split(/,/,$line);
$salt = substr($username,0,2);
$encrypted_password = crypt($password,$salt);
open(HTPASSWD,">>$htpasswd_file");
print HTPASSWD "$username:$encrypted_passwordn";
close(HTPASSWD);
}
print "Content-type: text/htmlnn";
print "Done!n";

Reply With Quote
  #3  
Old July 27th, 2000, 04:09 PM
RyanP
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
or just download activeperl and run the script on your own system

... or send the file to me and i'll do it for you and send the new file with encrypted passwords back to you

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationSecurity and Cryptography > .htpasswd & password-file problem.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT